|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.combean.adapters.drasys.lp.SizableProblemIAsLPSolver
public class SizableProblemIAsLPSolver
Field Summary |
---|
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 | |
---|---|
SizableProblemIAsLPSolver()
|
|
SizableProblemIAsLPSolver(drasys.or.mp.lp.LinearProgrammingI draLP)
|
|
SizableProblemIAsLPSolver(drasys.or.mp.lp.LinearProgrammingI draLP,
drasys.or.mp.SizableProblemI draProblem)
|
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. |
drasys.or.mp.lp.LinearProgrammingI |
getDraLP()
|
drasys.or.mp.SizableProblemI |
getDraProblem()
|
int |
getNumColumns()
The number of columns of the LP. |
int |
getNumRows()
The number of rows of the LP. |
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 |
Constructor Detail |
---|
public SizableProblemIAsLPSolver()
public SizableProblemIAsLPSolver(drasys.or.mp.lp.LinearProgrammingI draLP)
public SizableProblemIAsLPSolver(drasys.or.mp.lp.LinearProgrammingI draLP, drasys.or.mp.SizableProblemI draProblem)
Method Detail |
---|
public void setInitialDimensions(int numRows, int numColumns)
LPSolver
setInitialDimensions
in interface LPSolver
numRows
- number of rows to be reserved.numColumns
- number of columns to be reserved.public int addVariable(LPVariable variable)
LPSolver
addVariable
in interface LPSolver
variable
- the variable to be added.
public int addConstraint(LPConstraint constraint)
LPSolver
addConstraint
in interface LPSolver
constraint
- the constraint to be added.
public int addRow(LPConstraint constraint, SparseVector rowVec)
LPSolver
addRow
in interface LPSolver
constraint
- 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 LPSolver
variable
- 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 LPSolver
objective
- the objectivepublic void freeze()
LPSolver
freeze
in interface LPSolver
public int getNumColumns()
LPSolver
getNumColumns
in interface LPSolver
public int getNumRows()
LPSolver
getNumRows
in interface LPSolver
public byte getSolutionStatus()
LPSolver
getSolutionStatus
in interface LPSolver
public double getSolutionValue()
LPSolver
getSolutionValue
in interface LPSolver
public void solve()
LPSolver
solve
in interface LPSolver
public SparseVector getSolution()
LPSolver
getSolution
in interface LPSolver
public drasys.or.mp.lp.LinearProgrammingI getDraLP()
public drasys.or.mp.SizableProblemI getDraProblem()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |