|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lpsolve.LpSolve
Object wrapper for a problem structure of the lp_solve library. Offers access to all lp_solve methods.
Method Summary | |
void |
addColumn(double[] column)
Add a column to the problem. |
void |
addColumnex(int count,
double[] column,
int[] rowno)
Add a column to the problem. |
void |
addConstraint(double[] row,
int constrType,
double rh)
Add a constraint to the problem. |
void |
addConstraintex(int count,
double[] row,
int[] colno,
int constrType,
double rh)
Add a constraint to the problem. |
void |
addLagCon(double[] row,
int constrType,
double rh)
Add a Lagrangian constraint to the problem. |
void |
addSOS(java.lang.String name,
int sostype,
int priority,
int count,
int[] sosvars,
double[] weights)
Add a SOS constraint. |
int |
columnInLp(double[] column)
Check if a column is already present in the problem. |
LpSolve |
copyLp()
Copy an existing lprec structure to a new lprec structure. |
void |
defaultBasis()
Sets the starting base to an all slack basis (the default simplex starting basis). |
void |
delColumn(int columnnr)
Remove a column from the problem. |
void |
delConstraint(int rownr)
Remove a constraint from the problem. |
void |
deleteLp()
Frees all resources allocated to this problem. |
void |
dualizeLp()
Create the dual of the current model. |
protected void |
finalize()
|
int |
getAntiDegen()
Returns the used degeneracy rule. |
void |
getBasis(int[] bascolumn,
boolean nonbasic)
Returns the basis of the lp. |
int |
getBasiscrash()
Returns which basis crash mode must be used. |
int |
getBbDepthlimit()
Returns the maximum branch-and-bound depth. |
int |
getBbFloorfirst()
Returns which branch to take first in branch-and-bound algorithm. |
int |
getBbRule()
Returns the branch-and-bound rule. |
boolean |
getBoundsTighter()
Returns if set bounds may only be tighter or also less restrictive. |
double |
getBreakAtValue()
Returns the value at which the branch-and-bound algorithm stops when the object value is better than this value. |
java.lang.String |
getColName(int colnr)
Gets the name of a column in the problem. |
void |
getColumn(int colnr,
double[] column)
Get all column elements from the matrix. |
int |
getColumnex(int colnr,
double[] column,
int[] nzrows)
Get the non-zero column elements from the matrix. |
void |
getConstraints(double[] var)
Returns the values of the constraints. |
short |
getConstrType(int rownr)
Get the type of a constraint. |
double |
getConstrValue(int rownr,
int count,
double[] primsolution,
int[] nzindex)
Gets the value of a constraint according to provided variable values. |
void |
getDualSolution(double[] duals)
Returns the sensitivity of the constraints and the variables. |
double |
getEpsb()
Returns the value that is used as a tolerance for the Right Hand Side (RHS) to determine whether a value should be considered as 0. |
double |
getEpsd()
Returns the value that is used as a tolerance for the reduced costs to determine whether a value should be considered as 0. |
double |
getEpsel()
Returns the value that is used as a tolerance for rounding values to zero. |
double |
getEpsint()
Returns the tolerance that is used to determine whether a floating-point number is in fact an integer |
double |
getEpsperturb()
Returns the value that is used as perturbation scalar for degenerative problems. |
double |
getEpspivot()
Returns the value that is used as a tolerance pivot element to determine whether a value should be considered as 0. |
int |
getImprove()
Returns the iterative improvement level. |
double |
getInfinite()
Returns the value of "infinite". |
void |
getLambda(double[] lambda)
Returns the Lamdba vectors (Lagrangian optimization). |
double |
getLowbo(int colnr)
Get the lower bound of a variable. |
long |
getLp()
Return the value of the lp attribute. |
int |
getLpIndex(int index)
Returns the index in the lp of the original row/column. |
java.lang.String |
getLpName()
Get the name of the problem. |
int |
getLrows()
Returns the number of Lagrangian rows in the lp. |
double |
getMat(int row,
int column)
Get a single element from the matrix. |
int |
getMaxLevel()
Returns the deepest Branch-and-bound level of the last solution. |
int |
getMaxpivot()
Returns the maximum number of pivots between a reinversion of the matrix. |
double |
getMipGap(boolean absolute)
Returns the MIP gap value. |
int |
getNameindex(java.lang.String name,
boolean isRow)
Gets the index of a given column or row name in the lp. |
int |
getNcolumns()
Returns the number of columns (variables) in the problem. |
double |
getNegrange()
Returns the negative value below which variables are split into a negative and a positive part. |
int |
getNonzeros()
Returns the number of non-zero elements in the matrix. |
int |
getNorigColumns()
Returns the number of original columns (variables) in the problem. |
int |
getNorigRows()
Returns the number of original rows (constraints) in the problem. |
int |
getNrows()
Returns the number of rows (constraints) in the problem. |
double |
getObjBound()
Returns initial "at least better than" guess for objective function. |
double |
getObjective()
Returns the value of the objective function. |
java.lang.String |
getOrigcolName(int colnr)
Gets the name of a column in the problem. |
int |
getOrigIndex(int index)
Returns the original row/column where a constraint/variable was before presolve. |
java.lang.String |
getOrigrowName(int rownr)
Gets the name of a constraint (row) in the problem. |
int |
getPivoting()
Returns the pivot rule. |
int |
getPresolve()
Returns the current presolve setting. |
int |
getPresolveloops()
Returns the number of times presolve is done. |
void |
getPrimalSolution(double[] pv)
Returns the solution of the model. |
int |
getPrintSol()
Returns a flag if all intermediate valid solutions must be printed while solving. |
double[] |
getPtrColumn(int columnrnr)
Get all column elements from the matrix. |
double[] |
getPtrConstraints()
Returns the values of the constraints. |
double[] |
getPtrDualSolution()
Returns the sensitivity of the constraints and the variables. |
double[] |
getPtrLambda()
Returns the Lamdba vectors (Lagrangian optimization). |
double[] |
getPtrPrimalSolution()
Returns the solution of the model. |
double[] |
getPtrRow(int rownr)
Get all row elements from the matrix. |
double[][] |
getPtrSensitivityObj()
Returns the sensitivity of the objective function. |
double[][] |
getPtrSensitivityObjex()
Returns the sensitivity of the objective function. |
double[][] |
getPtrSensitivityRhs()
Returns the sensitivity of the constraints and the variables. |
double[] |
getPtrVariables()
Returns the values of the variables. |
double |
getRh(int row)
Get the value of the right hand side (RHS) vector (column 0) for one row. |
double |
getRhRange(int rownr)
Gets the range on a constraint. |
void |
getRow(int rownr,
double[] row)
Get all row elements from the matrix. |
int |
getRowex(int rownr,
double[] row,
int[] nzcols)
Get the non-zero row elements from the matrix. |
java.lang.String |
getRowName(int rownr)
Gets the name of a constraint (row) in the problem. |
double |
getScalelimit()
Returns the relative scaling convergence criterion for the active scaling mode; the integer part specifies the maximum number of iterations. |
int |
getScaling()
Specifies which scaling algorithm is used. |
void |
getSensitivityObj(double[] objfrom,
double[] objtill)
Returns the sensitivity of the objective function. |
void |
getSensitivityObjex(double[] objfrom,
double[] objtill,
double[] objfromvalue,
double[] objtillvalue)
Returns the sensitivity of the objective function. |
void |
getSensitivityRhs(double[] duals,
double[] dualsfrom,
double[] dualstill)
Returns the sensitivity of the constraints and the variables. |
int |
getSimplextype()
Returns the desired combination of primal and dual simplex algorithms. |
int |
getSolutioncount()
Returns the number of equal solutions. |
int |
getSolutionlimit()
Returns the solution number that must be returned. |
int |
getStatus()
Returns an extra status after a call to a function. |
java.lang.String |
getStatustext(int statuscode)
Returns the description of a returncode of the solve function. |
long |
getTimeout()
Gets the timout. |
long |
getTotalIter()
Returns the total number of iterations with Branch-and-bound of the last solution. |
long |
getTotalNodes()
Returns the total number of nodes processed in branch-and-bound. |
double |
getUpbo(int colnr)
Get the upper bound of a variable. |
int |
getVarBranch(int colnr)
Returns, for the specified variable, which branch to take first in branch-and-bound algorithm. |
double |
getVarDualresult(int index)
Returns the sensitivity of the constraints and the variables. |
void |
getVariables(double[] var)
Returns the values of the variables. |
double |
getVarPrimalresult(int index)
Returns the solution of the model. |
int |
getVarPriority(int colnr)
Returns, for the specified variable, the priority the variable has in the branch-and-bound algorithm. |
int |
getVerbose()
Returns the verbose level. |
double |
getWorkingObjective()
Returns the value of the objective function. |
void |
guessBasis(double[] guessvector, int[] basisvector)
Guess a basis for the lp. |
boolean |
hasBFP()
Returns if there is a basis factorization package (BFP) available. |
boolean |
hasXLI()
Returns if there is an external language interface (XLI) set. |
boolean |
isAddRowmode()
Returns a flag which of the add routines perform best. |
boolean |
isAntiDegen(int testmask)
Returns if the degeneracy rule specified in testmask is active. |
boolean |
isBinary(int colnr)
Gets the type of the variable. |
boolean |
isBreakAtFirst()
Returns if the branch-and-bound algorithm stops at first found solution. |
boolean |
isConstrType(int row,
int mask)
Returns if constraint type specified in mask is active. |
boolean |
isDebug()
Returns a flag if all intermediate results and the branch-and-bound decisions must be printed while solving. |
boolean |
isFeasible(double[] values,
double threshold)
Checks if provided solution is a feasible solution. |
boolean |
isInfinite(double value)
Checks if the provided absolute of the value is larger or equal to "infinite". |
boolean |
isInt(int colnr)
Get the type of the variable. |
boolean |
isIntegerscaling()
Specifies which scaling algorithm is used. |
boolean |
isLagTrace()
Returns a flag if Lagrangian progression must be printed while solving. |
boolean |
isMaxim()
Returns objective function direction. |
boolean |
isNativeBFP()
Returns if the native (build-in) basis factorization package (BFP) is used, or an external package. |
boolean |
isNativeXLI()
Returns if a build-in External Language Interfaces (XLI) is available or not. |
boolean |
isNegative(int colnr)
Returns if the variable is negative. |
boolean |
isPivMode(int testmask)
Returns if pivot strategy specified in testmask is active. |
boolean |
isPivRule(int rule)
Checks if the specified pivot rule is active. |
boolean |
isPresolve(int testmask)
Returns if presolve level specified in testmask is active. |
boolean |
isScalemode(int testmask)
Returns if scaling mode specified in testmask is active. |
boolean |
isScaletype(int scaletype)
Returns if scaling type specified in scaletype is active. |
boolean |
isSemicont(int colnr)
Get the type of the variable. semi-continious or not. |
boolean |
isSOSVar(int colnr)
Returns if the variable is SOS or not. |
boolean |
isTrace()
Returns a flag if pivot selection must be printed while solving. |
boolean |
isUnbounded(int colnr)
Returns if the variable is free. |
boolean |
isUseNames(boolean isRow)
Returns if variable or constraint names are used. |
static VersionInfo |
lpSolveVersion()
Returns the full version number of the underlying lp_solve library. |
static LpSolve |
makeLp(int rows,
int columns)
Creates a new problem. |
void |
printConstraints(int columns)
Prints the values of the constraints of the lp. |
void |
printDebugdump(java.lang.String filename)
Do a generic readable data dump of key lp_solve model variables; principally for run difference and debugging purposes. |
void |
printDuals()
Prints the values of the duals of the lp. |
void |
printLp()
Prints the lp model. |
void |
printObjective()
Prints the objective value of the lp. |
void |
printScales()
Prints the scales of the lp. |
void |
printSolution(int columns)
Prints the solution (variables) of the lp. |
void |
printStr(java.lang.String str)
Prints a string. |
void |
printTableau()
Prints the tableau. |
void |
putAbortfunc(AbortListener listener,
java.lang.Object userhandle)
Register an AbortListener for callback. |
void |
putBbBranchfunc(BbListener listener,
java.lang.Object userhandle)
Register an BbBranchListener for callback. |
void |
putBbNodefunc(BbListener listener,
java.lang.Object userhandle)
Register an BbNodeListener for callback. |
void |
putLogfunc(LogListener listener,
java.lang.Object userhandle)
Register an LogListener for callback. |
void |
putMsgfunc(MsgListener listener,
java.lang.Object userhandle,
int mask)
Register an MsgListener for callback. |
java.lang.String |
readBasis(java.lang.String filename)
Read basis from a file and set as default basis. |
static LpSolve |
readFreeMps(java.lang.String filename,
int verbose)
Read a model in free MPS format from file and create a new problem. |
static LpSolve |
readLp(java.lang.String filename,
int verbose,
java.lang.String lpName)
Read an lp model from file and create a new problem. |
static LpSolve |
readMps(java.lang.String filename,
int verbose)
Read an mps model from file and create a new problem. |
void |
readParams(java.lang.String filename,
java.lang.String options)
Read settings from a parameter file. |
static LpSolve |
readXLI(java.lang.String xliname,
java.lang.String modelname,
java.lang.String dataname,
java.lang.String options,
int verbose)
Read a model via the External Language Interface and create a new problem. |
void |
resetBasis()
Resets the basis to the initial basis. |
void |
resetParams()
Resets parameters back to their default values. |
boolean |
resizeLp(int rows,
int columns)
Allocate memory for the specified size. |
boolean |
setAddRowmode(boolean turnon)
Specifies which add routine performs best. |
void |
setAntiDegen(int antiDegen)
Specifies if special handling must be done to reduce degeneracy/cycling while solving. |
void |
setBasis(int[] bascolumn,
boolean nonbasic)
Sets an initial basis of the lp. |
void |
setBasiscrash(int mode)
Specifies which basis crash mode must be used. |
int |
setBasisvar(int basisPos,
int enteringCol)
This is an internal function that has been published for special purposes. It should generally not be used. |
void |
setBbDepthlimit(int bbMaxlevel)
Sets the maximum branch-and-bound depth. |
void |
setBbFloorfirst(int floorFirst)
Specifies which branch to take first in branch-and-bound algorithm. |
void |
setBbRule(int bbRule)
Specifies the branch-and-bound rule. |
void |
setBFP(java.lang.String filename)
Set basis factorization package. |
void |
setBinary(int colnr,
boolean mustBeBin)
Set the type of the variable. |
void |
setBounds(int colnr,
double lower,
double upper)
Set the upper and lower bound of a variable. |
void |
setBoundsTighter(boolean tighten)
Specifies if set bounds may only be tighter or also less restrictive. |
void |
setBreakAtFirst(boolean breakAtFirst)
Specifies if the branch-and-bound algorithm stops at first found solution. |
void |
setBreakAtValue(double breakAtValue)
Specifies if the branch-and-bound algorithm stops when the object value is better than a given value. |
void |
setColName(int colnr,
java.lang.String name)
Set the name of a column in the problem. |
void |
setColumn(int colno,
double[] column)
Set a column in the lp. |
void |
setColumnex(int colno,
int count,
double[] column,
int[] rowno)
Set a column in the lp. |
void |
setConstrType(int rownr,
int constrType)
Set the type of a constraint. |
void |
setDebug(boolean debug)
Sets a flag if all intermediate results and the branch-and-bound decisions must be printed while solving. |
void |
setEpsb(double value)
Specifies the value that is used as a tolerance for the Right Hand Side (RHS) to determine whether a value should be considered as 0 |
void |
setEpsd(double value)
Specifies the value that is used as a tolerance for reduced costs to determine whether a value should be considered as 0. |
void |
setEpsel(double value)
Specifies the value that is used as a tolerance for rounding values to zero. |
void |
setEpsint(double value)
Specifies the tolerance that is used to determine whether a floating-point number is in fact an integer. |
void |
setEpslevel(int epslevel)
This is a simplified way of specifying multiple eps thresholds that are "logically" consistent. |
void |
setEpsperturb(double value)
Specifies the value that is used as perturbation scalar for degenerative problems. |
void |
setEpspivot(double value)
Specifies the value that is used as a tolerance pivot element to determine whether a value should be considered as 0. |
void |
setImprove(int improve)
Specifies the iterative improvement level. |
void |
setInfinite(double value)
Specifies the practical value for "infinite". |
void |
setInt(int colnr,
boolean mustBeInteger)
Set the type of the variable. |
void |
setLagTrace(boolean lagTrace)
Sets a flag if Lagrangian progression must be printed while solving. |
void |
setLowbo(int colnr,
double value)
Set the lower bound of a variable. |
void |
setLpName(java.lang.String name)
Set the name of the problem. |
void |
setMat(int row,
int column,
double value)
Set a single element in the matrix. |
void |
setMaxim()
Set objective function to maximize. |
void |
setMaxpivot(int maxNumInv)
Sets the maximum number of pivots between a reinversion of the matrix. |
void |
setMinim()
Set objective function to minimize. |
void |
setMipGap(boolean absolute,
double value)
Specifies the MIP gap value. |
void |
setNegrange(double negRange)
Set negative value below which variables are split into a negative and a positive part. |
void |
setObj(int column,
double value)
Set the objective function (row 0) of the matrix. |
void |
setObjBound(double objBound)
Set initial "at least better than" guess for objective function. |
void |
setObjFn(double[] row)
Set the objective function (row 0) of the matrix. |
void |
setObjFnex(int count,
double[] row,
int[] colno)
Set the objective function (row 0) of the matrix. |
void |
setOutputfile(java.lang.String filename)
Defines the output for the print_* functions. |
void |
setPivoting(int pivRule)
Specifies the pivot rule. |
void |
setPreferdual(boolean dodual)
Sets the desired combination of primal and dual simplex algorithms. |
void |
setPresolve(int doPresolve,
int maxloops)
Specifies if a presolve must be done before solving. |
void |
setPrintSol(int printSol)
Sets a flag if all intermediate valid solutions must be printed while solving. |
void |
setRh(int row,
double value)
Set the value of the right hand side (RHS) vector (column 0) for one row. |
void |
setRhRange(int rownr,
double range)
Set the range on a constraint. |
void |
setRhVec(double[] rh)
Set the right hand side (RHS) vector (column 0). |
void |
setRow(int rowno,
double[] row)
Set a constraint in the lp. |
void |
setRowex(int rowno,
int count,
double[] row,
int[] colno)
Set a constraint in the lp. |
void |
setRowName(int rownr,
java.lang.String name)
Set the name of a constraint (row) in the problem. |
void |
setScalelimit(double scalelimit)
Sets the relative scaling convergence criterion for the active scaling mode; the integer part specifies the maximum number of iterations. |
void |
setScaling(int scalemode)
Specifies which scaling algorithm must be used. |
void |
setSemicont(int colnr,
boolean mustBeSc)
Set the type of the variable. semi-continious or not. |
void |
setSense(boolean maximize)
Set objective function sense. |
void |
setSimplextype(int simplextype)
Sets the desired combination of primal and dual simplex algorithms. |
void |
setSolutionlimit(int limit)
Sets the solution number that must be returned. |
void |
setTimeout(long timeout)
Set a timeout. |
void |
setTrace(boolean trace)
Sets a flag if pivot selection must be printed while solving. |
void |
setUnbounded(int colnr)
Sets if the variable is free. |
void |
setUpbo(int colnr,
double value)
Set the upper bound of a variable. |
void |
setUseNames(boolean isRow,
boolean useNames)
Sets if variable or constraint names are used. |
void |
setVarBranch(int colnr,
int branchMode)
Specifies, for the specified variable, which branch to take first in branch-and-bound algorithm. |
void |
setVarWeights(double[] weights)
Set the weights on variables. |
void |
setVerbose(int verbose)
Set the verbose level. |
void |
setXLI(java.lang.String filename)
Set External Language Interfaces package. |
int |
solve()
Solve the model. |
void |
strAddColumn(java.lang.String column)
Add a column to the problem. |
void |
strAddConstraint(java.lang.String row,
int constrType,
double rh)
Add a constraint to the problem. |
void |
strAddLagCon(java.lang.String row,
int constrType,
double rh)
Add a Lagrangian constraint to the problem. |
void |
strSetObjFn(java.lang.String row)
Set the objective function (row 0) of the matrix. |
void |
strSetRhVec(java.lang.String rh)
Set the right hand side (RHS) vector (column 0). |
double |
timeElapsed()
Gets the time elapsed since start of solve. |
void |
unscale()
Unscales the model. |
void |
writeBasis(java.lang.String filename)
Writes current basis to a file. |
void |
writeFreeMps(java.lang.String filename)
Write a model in free MPS format to a file. |
void |
writeLp(java.lang.String filename)
Write an lp model to a file. |
void |
writeMps(java.lang.String filename)
Write an mps model to a file. |
void |
writeParams(java.lang.String filename,
java.lang.String options)
Write settings to a parameter file. |
void |
writeXLI(java.lang.String filename,
java.lang.String options,
boolean results)
Write a model to a file via the External Language Interface. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FALSE
public static final int TRUE
public static final int AUTOMATIC
public static final int DYNAMIC
public static final int FR
public static final int LE
public static final int GE
public static final int EQ
public static final int OF
public static final int SIMPLEX_PRIMAL_PRIMAL
public static final int SIMPLEX_DUAL_PRIMAL
public static final int SIMPLEX_PRIMAL_DUAL
public static final int SIMPLEX_DUAL_DUAL
public static final int SIMPLEX_DEFAULT
public static final int PRESOLVE_NONE
public static final int PRESOLVE_ROWS
public static final int PRESOLVE_COLS
public static final int PRESOLVE_LINDEP
public static final int PRESOLVE_SOS
public static final int PRESOLVE_REDUCEMIP
public static final int PRESOLVE_KNAPSACK
public static final int PRESOLVE_ELIMEQ2
public static final int PRESOLVE_IMPLIEDFREE
public static final int PRESOLVE_REDUCEGCD
public static final int PRESOLVE_PROBEFIX
public static final int PRESOLVE_PROBEREDUCE
public static final int PRESOLVE_ROWDOMINATE
public static final int PRESOLVE_COLDOMINATE
public static final int PRESOLVE_MERGEROWS
public static final int PRESOLVE_IMPLIEDSLK
public static final int PRESOLVE_COLFIXDUAL
public static final int PRESOLVE_BOUNDS
public static final int PRESOLVE_DUALS
public static final int PRESOLVE_SENSDUALS
public static final int CRASH_NOTHING
public static final int CRASH_MOSTFEASIBLE
public static final int ANTIDEGEN_NONE
public static final int ANTIDEGEN_FIXEDVARS
public static final int ANTIDEGEN_COLUMNCHECK
public static final int ANTIDEGEN_STALLING
public static final int ANTIDEGEN_NUMFAILURE
public static final int ANTIDEGEN_LOSTFEAS
public static final int ANTIDEGEN_INFEASIBLE
public static final int ANTIDEGEN_DYNAMIC
public static final int ANTIDEGEN_DURINGBB
public static final int ANTIDEGEN_RHSPERTURB
public static final int ANTIDEGEN_BOUNDFLIP
public static final int NEUTRAL
public static final int CRITICAL
public static final int SEVERE
public static final int IMPORTANT
public static final int NORMAL
public static final int DETAILED
public static final int FULL
public static final int MSG_NONE
public static final int MSG_PRESOLVE
public static final int MSG_ITERATION
public static final int MSG_INVERT
public static final int MSG_LPFEASIBLE
public static final int MSG_LPOPTIMAL
public static final int MSG_LPEQUAL
public static final int MSG_LPBETTER
public static final int MSG_MILPFEASIBLE
public static final int MSG_MILPEQUAL
public static final int MSG_MILPBETTER
public static final int MSG_MILPSTRATEGY
public static final int MSG_MILPOPTIMAL
public static final int MSG_PERFORMANCE
public static final int MSG_INITPSEUDOCOST
public static final int IMPROVE_NONE
public static final int IMPROVE_SOLUTION
public static final int IMPROVE_DUALFEAS
public static final int IMPROVE_THETAGAP
public static final int IMPROVE_BBSIMPLEX
public static final int SCALE_NONE
public static final int SCALE_EXTREME
public static final int SCALE_RANGE
public static final int SCALE_MEAN
public static final int SCALE_GEOMETRIC
public static final int SCALE_CURTISREID
public static final int SCALE_LINEAR
public static final int SCALE_QUADRATIC
public static final int SCALE_LOGARITHMIC
public static final int SCALE_USERWEIGHT
public static final int SCALE_POWER2
public static final int SCALE_EQUILIBRATE
public static final int SCALE_INTEGERS
public static final int SCALE_DYNUPDATE
public static final int SCALE_ROWSONLY
public static final int SCALE_COLSONLY
public static final int PRICER_FIRSTINDEX
public static final int PRICER_DANTZIG
public static final int PRICER_DEVEX
public static final int PRICER_STEEPESTEDGE
public static final int PRICE_METHODDEFAULT
public static final int PRICE_PRIMALFALLBACK
public static final int PRICE_MULTIPLE
public static final int PRICE_PARTIAL
public static final int PRICE_ADAPTIVE
public static final int PRICE_HYBRID
public static final int PRICE_RANDOMIZE
public static final int PRICE_AUTOPARTIAL
public static final int PRICE_LOOPLEFT
public static final int PRICE_LOOPALTERNATE
public static final int PRICE_HARRISTWOPASS
public static final int PRICE_TRUENORMINIT
public static final int NODE_FIRSTSELECT
public static final int NODE_GAPSELECT
public static final int NODE_RANGESELECT
public static final int NODE_FRACTIONSELECT
public static final int NODE_PSEUDOCOSTSELECT
public static final int NODE_PSEUDONONINTSELECT
public static final int NODE_PSEUDORATIOSELECT
public static final int NODE_USERSELECT
public static final int NODE_WEIGHTREVERSEMODE
public static final int NODE_BRANCHREVERSEMODE
public static final int NODE_GREEDYMODE
public static final int NODE_PSEUDOCOSTMODE
public static final int NODE_DEPTHFIRSTMODE
public static final int NODE_RANDOMIZEMODE
public static final int NODE_DYNAMICMODE
public static final int NODE_RESTARTMODE
public static final int NODE_BREADTHFIRSTMODE
public static final int NODE_AUTOORDER
public static final int NODE_RCOSTFIXING
public static final int NODE_STRONGINIT
public static final int BRANCH_CEILING
public static final int BRANCH_FLOOR
public static final int BRANCH_AUTOMATIC
public static final int UNKNOWNERROR
public static final int DATAIGNORED
public static final int NOBFP
public static final int NOMEMORY
public static final int NOTRUN
public static final int OPTIMAL
public static final int SUBOPTIMAL
public static final int INFEASIBLE
public static final int UNBOUNDED
public static final int DEGENERATE
public static final int NUMFAILURE
public static final int USERABORT
public static final int TIMEOUT
public static final int RUNNING
public static final int FUTURESTATUS
public static final int PROCFAIL
public static final int PROCBREAK
public static final int FEASFOUND
public static final int NOFEASFOUND
Method Detail |
public static LpSolve makeLp(int rows, int columns) throws LpSolveException
lprec
structure.
rows
- Initial number of rows.columns
- Initial number of columns.
LpSolveException
- if lp_solve could not create the problempublic static LpSolve readLp(java.lang.String filename, int verbose, java.lang.String lpName) throws LpSolveException
LpSolveException
public static LpSolve readMps(java.lang.String filename, int verbose) throws LpSolveException
LpSolveException
public static LpSolve readFreeMps(java.lang.String filename, int verbose) throws LpSolveException
LpSolveException
public static LpSolve readXLI(java.lang.String xliname, java.lang.String modelname, java.lang.String dataname, java.lang.String options, int verbose) throws LpSolveException
LpSolveException
public static VersionInfo lpSolveVersion()
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public long getLp()
public LpSolve copyLp() throws LpSolveException
LpSolveException
public void resizeLp(int rows, int columns) throws LpSolveException
public void setLpName(java.lang.String name) throws LpSolveException
LpSolveException
public java.lang.String getLpName() throws LpSolveException
LpSolveException
public void addConstraint(double[] row, int constrType, double rh) throws LpSolveException
LpSolveException
public void strAddConstraint(java.lang.String row, int constrType, double rh) throws LpSolveException
LpSolveException
public void addConstraintex(int count, double[] row, int[] colno, int constrType, double rh) throws LpSolveException
LpSolveException
public void delConstraint(int rownr) throws LpSolveException
LpSolveException
public boolean isConstrType(int row, int mask)
public void addLagCon(double[] row, int constrType, double rh) throws LpSolveException
LpSolveException
public void strAddLagCon(java.lang.String row, int constrType, double rh) throws LpSolveException
LpSolveException
public void addColumn(double[] column) throws LpSolveException
LpSolveException
public void addColumnex(int count, double[] column, int[] rowno) throws LpSolveException
LpSolveException
public void strAddColumn(java.lang.String column) throws LpSolveException
LpSolveException
public void delColumn(int columnnr) throws LpSolveException
LpSolveException
public void setRow(int rowno, double[] row) throws LpSolveException
LpSolveException
public void setRowex(int rowno, int count, double[] row, int[] colno) throws LpSolveException
LpSolveException
public void setColumn(int colno, double[] column) throws LpSolveException
LpSolveException
public void setColumnex(int colno, int count, double[] column, int[] rowno) throws LpSolveException
LpSolveException
public int columnInLp(double[] column)
public void setRowName(int rownr, java.lang.String name) throws LpSolveException
LpSolveException
public java.lang.String getRowName(int rownr) throws LpSolveException
LpSolveException
public java.lang.String getOrigrowName(int rownr) throws LpSolveException
LpSolveException
public void setColName(int colnr, java.lang.String name) throws LpSolveException
LpSolveException
public java.lang.String getColName(int colnr) throws LpSolveException
LpSolveException
public java.lang.String getOrigcolName(int colnr) throws LpSolveException
LpSolveException
public void setRhVec(double[] rh) throws LpSolveException
LpSolveException
public void strSetRhVec(java.lang.String rh) throws LpSolveException
LpSolveException
public void setRh(int row, double value) throws LpSolveException
LpSolveException
public double getRh(int row)
public void setConstrType(int rownr, int constrType) throws LpSolveException
LpSolveException
public short getConstrType(int rownr) throws LpSolveException
LpSolveException
public void addSOS(java.lang.String name, int sostype, int priority, int count, int[] sosvars, double[] weights) throws LpSolveException
LpSolveException
public boolean isSOSVar(int colnr) throws LpSolveException
LpSolveException
public void setObjFn(double[] row) throws LpSolveException
LpSolveException
public void strSetObjFn(java.lang.String row) throws LpSolveException
LpSolveException
public void setObjFnex(int count, double[] row, int[] colno) throws LpSolveException
LpSolveException
public void setObj(int column, double value) throws LpSolveException
LpSolveException
public void setMat(int row, int column, double value) throws LpSolveException
LpSolveException
public double getMat(int row, int column)
public void getRow(int rownr, double[] row) throws LpSolveException
LpSolveException
public int getRowex(int rownr, double[] row, int[] nzcols) throws LpSolveException
LpSolveException
public double[] getPtrRow(int rownr) throws LpSolveException
LpSolveException
public void getColumn(int colnr, double[] column) throws LpSolveException
LpSolveException
public int getColumnex(int colnr, double[] column, int[] nzrows) throws LpSolveException
LpSolveException
public double[] getPtrColumn(int columnrnr) throws LpSolveException
LpSolveException
public void setMaxim()
public void setMinim()
public void setSense(boolean maximize)
public boolean isMaxim()
public void setLowbo(int colnr, double value) throws LpSolveException
LpSolveException
public double getLowbo(int colnr) throws LpSolveException
LpSolveException
public void setUpbo(int colnr, double value) throws LpSolveException
LpSolveException
public double getUpbo(int colnr) throws LpSolveException
LpSolveException
public void setUnbounded(int colnr) throws LpSolveException
LpSolveException
public boolean isUnbounded(int colnr)
public boolean isNegative(int colnr)
public void setBounds(int colnr, double lower, double upper) throws LpSolveException
LpSolveException
public void setBoundsTighter(boolean tighten)
public boolean getBoundsTighter()
public void setRhRange(int rownr, double range) throws LpSolveException
LpSolveException
public double getRhRange(int rownr) throws LpSolveException
LpSolveException
public void setInt(int colnr, boolean mustBeInteger) throws LpSolveException
LpSolveException
public boolean isInt(int colnr)
public void setBinary(int colnr, boolean mustBeBin) throws LpSolveException
LpSolveException
public boolean isBinary(int colnr)
public void setSemicont(int colnr, boolean mustBeSc) throws LpSolveException
LpSolveException
public boolean isSemicont(int colnr)
public void setInfinite(double value)
public double getInfinite()
public boolean isInfinite(double value)
public void setEpsint(double value)
public double getEpsint()
public void setEpsb(double value)
public double getEpsb()
public void setEpsd(double value)
public double getEpsd()
public void setEpsel(double value)
public double getEpsel()
public void setEpspivot(double value)
public double getEpspivot()
public void setEpsperturb(double value)
public double getEpsperturb()
public void setEpslevel(int epslevel) throws LpSolveException
LpSolveException
public int getStatus()
public void setMipGap(boolean absolute, double value)
public double getMipGap(boolean absolute)
public void setVerbose(int verbose)
public int getVerbose()
public void setTimeout(long timeout)
public long getTimeout()
public double timeElapsed()
public void setPrintSol(int printSol)
public int getPrintSol()
public void setDebug(boolean debug)
public boolean isDebug()
public void setTrace(boolean trace)
public boolean isTrace()
public void setLagTrace(boolean lagTrace)
public boolean isLagTrace()
public boolean setAddRowmode(boolean turnon)
public boolean isAddRowmode()
public void setAntiDegen(int antiDegen)
public boolean isAntiDegen(int testmask)
public int getAntiDegen()
public void setPresolve(int doPresolve, int maxloops)
public boolean isPresolve(int testmask)
public int getPresolve()
public int getPresolveloops()
public void setMaxpivot(int maxNumInv)
public int getMaxpivot()
public void setBbRule(int bbRule)
public int getBbRule()
public void setBbDepthlimit(int bbMaxlevel)
public int getBbDepthlimit()
public int getSolutioncount()
public void setSolutionlimit(int limit)
public int getSolutionlimit()
public void setObjBound(double objBound)
public double getObjBound()
public void setBbFloorfirst(int floorFirst)
public int getBbFloorfirst()
public void setVarBranch(int colnr, int branchMode) throws LpSolveException
LpSolveException
public int getVarBranch(int colnr) throws LpSolveException
LpSolveException
public void setVarWeights(double[] weights) throws LpSolveException
LpSolveException
public int getVarPriority(int colnr) throws LpSolveException
LpSolveException
public void setBreakAtFirst(boolean breakAtFirst)
public boolean isBreakAtFirst()
public void setBreakAtValue(double breakAtValue)
public double getBreakAtValue()
public void setScaling(int scalemode)
public int getScaling()
public boolean isScalemode(int testmask)
public boolean isScaletype(int scaletype)
public boolean isIntegerscaling()
public void setScalelimit(double scalelimit)
public double getScalelimit()
public void setImprove(int improve)
public int getImprove()
public void setPivoting(int pivRule)
public int getPivoting()
public boolean isPivMode(int testmask)
public boolean isPivRule(int rule)
public void setPreferdual(boolean dodual)
public void setSimplextype(int simplextype)
public int getSimplextype()
public void setNegrange(double negRange)
public double getNegrange()
public long getTotalIter()
public int getMaxLevel()
public long getTotalNodes()
public int getNrows()
public int getNorigRows()
public int getLrows()
public int getNcolumns()
public int getNorigColumns()
public int getNonzeros()
public int getOrigIndex(int index)
public int getLpIndex(int index)
public void setBasis(int[] bascolumn, boolean nonbasic) throws LpSolveException
LpSolveException
public void getBasis(int[] bascolumn, boolean nonbasic) throws LpSolveException
LpSolveException
public void resetBasis()
public void defaultBasis()
public void setBasiscrash(int mode)
public int getBasiscrash()
public void guessBasis(double[] guessvector, int[] basisvector) throws LpSolveException
LpSolveException
public void unscale()
public void setBFP(java.lang.String filename) throws LpSolveException
LpSolveException
public boolean isNativeBFP()
public boolean hasBFP()
public int solve() throws LpSolveException
LpSolveException
public java.lang.String getStatustext(int statuscode)
public boolean isFeasible(double[] values, double threshold) throws LpSolveException
LpSolveException
public double getObjective() throws LpSolveException
LpSolveException
public double getWorkingObjective() throws LpSolveException
LpSolveException
public void getVariables(double[] var) throws LpSolveException
LpSolveException
public double[] getPtrVariables() throws LpSolveException
LpSolveException
public void getConstraints(double[] var) throws LpSolveException
LpSolveException
public double[] getPtrConstraints() throws LpSolveException
LpSolveException
public void getPrimalSolution(double[] pv) throws LpSolveException
LpSolveException
public double[] getPtrPrimalSolution() throws LpSolveException
LpSolveException
public double getVarPrimalresult(int index) throws LpSolveException
LpSolveException
public void getSensitivityRhs(double[] duals, double[] dualsfrom, double[] dualstill) throws LpSolveException
LpSolveException
public double[][] getPtrSensitivityRhs() throws LpSolveException
LpSolveException
public void getDualSolution(double[] duals) throws LpSolveException
LpSolveException
public double[] getPtrDualSolution() throws LpSolveException
LpSolveException
public double getVarDualresult(int index) throws LpSolveException
LpSolveException
public void getSensitivityObj(double[] objfrom, double[] objtill) throws LpSolveException
LpSolveException
public double[][] getPtrSensitivityObj() throws LpSolveException
LpSolveException
public void getSensitivityObjex(double[] objfrom, double[] objtill, double[] objfromvalue, double[] objtillvalue) throws LpSolveException
LpSolveException
public double[][] getPtrSensitivityObjex() throws LpSolveException
LpSolveException
public void getLambda(double[] lambda) throws LpSolveException
LpSolveException
public double[] getPtrLambda() throws LpSolveException
LpSolveException
public void deleteLp()
public void writeLp(java.lang.String filename) throws LpSolveException
LpSolveException
public void writeMps(java.lang.String filename) throws LpSolveException
LpSolveException
public void writeFreeMps(java.lang.String filename) throws LpSolveException
LpSolveException
public java.lang.String readBasis(java.lang.String filename) throws LpSolveException
LpSolveException
public void writeBasis(java.lang.String filename) throws LpSolveException
LpSolveException
public void readParams(java.lang.String filename, java.lang.String options) throws LpSolveException
LpSolveException
public void writeParams(java.lang.String filename, java.lang.String options) throws LpSolveException
LpSolveException
public void resetParams()
public void printLp()
public void printConstraints(int columns)
public void printDuals()
public void printScales()
public void printTableau()
public void printObjective()
public void printSolution(int columns)
public void printStr(java.lang.String str)
public void setOutputfile(java.lang.String filename) throws LpSolveException
LpSolveException
public void printDebugdump(java.lang.String filename) throws LpSolveException
LpSolveException
public void setXLI(java.lang.String filename) throws LpSolveException
LpSolveException
public void writeXLI(java.lang.String filename, java.lang.String options, boolean results) throws LpSolveException
LpSolveException
public boolean hasXLI()
public boolean isNativeXLI()
public int getNameindex(java.lang.String name, boolean isRow)
public void dualizeLp() throws LpSolveException
LpSolveException
public boolean isUseNames(boolean isRow)
public void setUseNames(boolean isRow, boolean useNames)
public double getConstrValue(int rownr, int count, double[] primsolution, int[] nzindex)
public int setBasisvar(int basisPos, int enteringCol)
public void putAbortfunc(AbortListener listener, java.lang.Object userhandle) throws LpSolveException
AbortListener
for callback.
listener
- the listener that should be called by lp_solveuserhandle
- an arbitrary object that is passed to the listener on call
LpSolveException
public void putLogfunc(LogListener listener, java.lang.Object userhandle) throws LpSolveException
LogListener
for callback.
listener
- the listener that should be called by lp_solveuserhandle
- an arbitrary object that is passed to the listener on call
LpSolveException
public void putMsgfunc(MsgListener listener, java.lang.Object userhandle, int mask) throws LpSolveException
MsgListener
for callback.
listener
- the listener that should be called by lp_solveuserhandle
- an arbitrary object that is passed to the listener on call
LpSolveException
public void putBbBranchfunc(BbListener listener, java.lang.Object userhandle) throws LpSolveException
BbBranchListener
for callback.
listener
- the listener that should be called by lp_solveuserhandle
- an arbitrary object that is passed to the listener on call
LpSolveException
public void putBbNodefunc(BbListener listener, java.lang.Object userhandle) throws LpSolveException
BbNodeListener
for callback.
listener
- the listener that should be called by lp_solveuserhandle
- an arbitrary object that is passed to the listener on call
LpSolveException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |