|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.adapters.qsopt.QSOptProblemAsLPSolver
public class QSOptProblemAsLPSolver
| Field Summary | |
|---|---|
static byte |
QSOPT_DUAL_SIMPLEX
|
static byte |
QSOPT_PRIMAL_SIMPLEX
|
| Fields inherited from interface net.sourceforge.combean.interfaces.mathprog.lp.LPSolver |
|---|
LPOBJ_COUNT, LPOBJ_MAX, LPOBJ_MIN, LPOBJ_UNDEFINED, LPSTAT_COUNT, LPSTAT_FAILURE, LPSTAT_INFEASIBLE, LPSTAT_SOLVED, LPSTAT_UNBOUNDED, LPSTAT_UNDEFINED |
| Constructor Summary | |
|---|---|
QSOptProblemAsLPSolver()
|
|
QSOptProblemAsLPSolver(qs.Problem qsProblem)
|
|
| Method Summary | |
|---|---|
int |
addColumn(LPVariable variable,
SparseVector colVec)
Add a column to the LP problem. |
int |
addConstraint(LPConstraint constraint)
Add a constraint to the LP problem. |
int |
addRow(LPConstraint constraint,
SparseVector rowVec)
Add a row to the LP problem. |
int |
addVariable(LPVariable variable)
Add a variable to the LP problem. |
void |
freeze()
This method must be called after the LP has been constructed and before the solver is called. |
int |
getNumColumns()
The number of columns of the LP. |
int |
getNumRows()
The number of rows of the LP. |
byte |
getSimplexKind()
|
SparseVector |
getSolution()
Get the primal solution vector of LP. |
byte |
getSolutionStatus()
Return the status of the solver has attempted to solve the problem. |
double |
getSolutionValue()
Get value of objective function. |
void |
setInitialDimensions(int numRows,
int numColumns)
A hint to the memory management. |
void |
setObjective(byte objective)
Set the objective of the LP (min or max). |
void |
solve()
Solve the LP (usually from scratch). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte QSOPT_DUAL_SIMPLEX
public static final byte QSOPT_PRIMAL_SIMPLEX
| Constructor Detail |
|---|
public QSOptProblemAsLPSolver()
public QSOptProblemAsLPSolver(qs.Problem qsProblem)
| Method Detail |
|---|
public void setInitialDimensions(int numRows,
int numColumns)
LPSolver
setInitialDimensions in interface LPSolvernumRows - number of rows to be reserved.numColumns - number of columns to be reserved.public int addVariable(LPVariable variable)
LPSolver
addVariable in interface LPSolvervariable - the variable to be added.
public int addConstraint(LPConstraint constraint)
LPSolver
addConstraint in interface LPSolverconstraint - the constraint to be added.
public int addRow(LPConstraint constraint,
SparseVector rowVec)
LPSolver
addRow in interface LPSolverconstraint - the constraint of the row to be addedrowVec - the row vector of the constraint matrix to be added.
public int addColumn(LPVariable variable,
SparseVector colVec)
LPSolver
addColumn in interface LPSolvervariable - the variable of the column to be addedcolVec - the column vector of the constraint matrix to be added.
public void setObjective(byte objective)
LPSolver
setObjective in interface LPSolverobjective - the objectivepublic void freeze()
LPSolver
freeze in interface LPSolverpublic int getNumRows()
LPSolver
getNumRows in interface LPSolverpublic int getNumColumns()
LPSolver
getNumColumns in interface LPSolverpublic void solve()
LPSolver
solve in interface LPSolverpublic byte getSolutionStatus()
LPSolver
getSolutionStatus in interface LPSolverpublic double getSolutionValue()
LPSolver
getSolutionValue in interface LPSolverpublic SparseVector getSolution()
LPSolver
getSolution in interface LPSolverpublic String toString()
toString in class Objectpublic byte getSimplexKind()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||