Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lpsolve
Class LpSolve

    java.lang.Object
      lpsolve.LpSolve

public class LpSolve
extends java.lang.Object

Object wrapper for a problem structure of the lp_solve library. Offers access to all lp_solve methods.

Author:
  Juergen Ebert

Field Summary
`static int` | `ANTIDEGEN_BOUNDFLIP`
`static int` | `ANTIDEGEN_COLUMNCHECK`
`static int` | `ANTIDEGEN_DURINGBB`
`static int` | `ANTIDEGEN_DYNAMIC`
`static int` | `ANTIDEGEN_FIXEDVARS`
`static int` | `ANTIDEGEN_INFEASIBLE`
`static int` | `ANTIDEGEN_LOSTFEAS`
`static int` | `ANTIDEGEN_NONE`
`static int` | `ANTIDEGEN_NUMFAILURE`
`static int` | `ANTIDEGEN_RHSPERTURB`
`static int` | `ANTIDEGEN_STALLING`
`static int` | `AUTOMATIC`
`static int` | `BRANCH_AUTOMATIC`
`static int` | `BRANCH_CEILING`
`static int` | `BRANCH_FLOOR`
`static int` | `BRANCH_DEFAULT`
`static int` | `CRASH_MOSTFEASIBLE`
`static int` | `CRASH_NOTHING`
`static int` | `CRITICAL`
`static int` | `DATAIGNORED`
`static int` | `DEGENERATE`
`static int` | `DETAILED`
`static int` | `DYNAMIC`
`static int` | `EQ`
`static int` | `FALSE`
`static int` | `FEASFOUND`
`static int` | `FR`
`static int` | `FULL`
`static int` | `PRESOLVED`
`static int` | `GE`
`static int` | `IMPORTANT`
`static int` | `IMPROVE_BBSIMPLEX`
`static int` | `IMPROVE_DUALFEAS`
`static int` | `IMPROVE_NONE`
`static int` | `IMPROVE_SOLUTION`
`static int` | `IMPROVE_THETAGAP`
`static int` | `INFEASIBLE`
`static int` | `LE`
`static int` | `MSG_INITPSEUDOCOST`
`static int` | `MSG_INVERT`
`static int` | `MSG_ITERATION`
`static int` | `MSG_LPBETTER`
`static int` | `MSG_LPEQUAL`
`static int` | `MSG_LPFEASIBLE`
`static int` | `MSG_LPOPTIMAL`
`static int` | `MSG_MILPBETTER`
`static int` | `MSG_MILPEQUAL`
`static int` | `MSG_MILPFEASIBLE`
`static int` | `MSG_MILPOPTIMAL`
`static int` | `MSG_MILPSTRATEGY`
`static int` | `MSG_NONE`
`static int` | `MSG_PERFORMANCE`
`static int` | `MSG_PRESOLVE`
`static int` | `NEUTRAL`
`static int` | `NOBFP`
`static int` | `NODE_AUTOORDER`
`static int` | `NODE_BRANCHREVERSEMODE`
`static int` | `NODE_BREADTHFIRSTMODE`
`static int` | `NODE_DEPTHFIRSTMODE`
`static int` | `NODE_DYNAMICMODE`
`static int` | `NODE_FIRSTSELECT`
`static int` | `NODE_FRACTIONSELECT`
`static int` | `NODE_GAPSELECT`
`static int` | `NODE_GREEDYMODE`
`static int` | `NODE_PSEUDOCOSTMODE`
`static int` | `NODE_PSEUDOCOSTSELECT`
`static int` | `NODE_PSEUDONONINTSELECT`
`static int` | `NODE_PSEUDORATIOSELECT`
`static int` | `NODE_RANDOMIZEMODE`
`static int` | `NODE_RANGESELECT`
`static int` | `NODE_RCOSTFIXING`
`static int` | `NODE_RESTARTMODE`
`static int` | `NODE_STRONGINIT`
`static int` | `NODE_USERSELECT`
`static int` | `NODE_WEIGHTREVERSEMODE`
`static int` | `NOFEASFOUND`
`static int` | `NOMEMORY`
`static int` | `NORMAL`
`static int` | `NOTRUN`
`static int` | `NUMFAILURE`
`static int` | `OF`
`static int` | `OPTIMAL`
`static int` | `PRESOLVE_BOUNDS`
`static int` | `PRESOLVE_COLDOMINATE`
`static int` | `PRESOLVE_COLFIXDUAL`
`static int` | `PRESOLVE_COLS`
`static int` | `PRESOLVE_DUALS`
`static int` | `PRESOLVE_ELIMEQ2`
`static int` | `PRESOLVE_IMPLIEDFREE`
`static int` | `PRESOLVE_IMPLIEDSLK`
`static int` | `PRESOLVE_KNAPSACK`
`static int` | `PRESOLVE_LINDEP`
`static int` | `PRESOLVE_MERGEROWS`
`static int` | `PRESOLVE_NONE`
`static int` | `PRESOLVE_PROBEFIX`
`static int` | `PRESOLVE_PROBEREDUCE`
`static int` | `PRESOLVE_REDUCEGCD`
`static int` | `PRESOLVE_REDUCEMIP`
`static int` | `PRESOLVE_ROWDOMINATE`
`static int` | `PRESOLVE_ROWS`
`static int` | `PRESOLVE_SENSDUALS`
`static int` | `PRESOLVE_SOS`
`static int` | `PRICE_ADAPTIVE`
`static int` | `PRICE_AUTOPARTIAL`
`static int` | `PRICE_HARRISTWOPASS`
`static int` | `PRICE_HYBRID`
`static int` | `PRICE_LOOPALTERNATE`
`static int` | `PRICE_LOOPLEFT`
`static int` | `PRICE_METHODDEFAULT`
`static int` | `PRICE_MULTIPLE`
`static int` | `PRICE_PARTIAL`
`static int` | `PRICE_PRIMALFALLBACK`
`static int` | `PRICE_RANDOMIZE`
`static int` | `PRICE_TRUENORMINIT`
`static int` | `PRICER_DANTZIG`
`static int` | `PRICER_DEVEX`
`static int` | `PRICER_FIRSTINDEX`
`static int` | `PRICER_STEEPESTEDGE`
`static int` | `PROCBREAK`
`static int` | `PROCFAIL`
`static int` | `RUNNING`
`static int` | `SCALE_COLSONLY`
`static int` | `SCALE_CURTISREID`
`static int` | `SCALE_DYNUPDATE`
`static int` | `SCALE_EQUILIBRATE`
`static int` | `SCALE_EXTREME`
`static int` | `SCALE_GEOMETRIC`
`static int` | `SCALE_INTEGERS`
`static int` | `SCALE_LINEAR`
`static int` | `SCALE_LOGARITHMIC`
`static int` | `SCALE_MEAN`
`static int` | `SCALE_NONE`
`static int` | `SCALE_POWER2`
`static int` | `SCALE_QUADRATIC`
`static int` | `SCALE_RANGE`
`static int` | `SCALE_ROWSONLY`
`static int` | `SCALE_USERWEIGHT`
`static int` | `SEVERE`
`static int` | `SIMPLEX_DEFAULT`
`static int` | `SIMPLEX_DUAL_DUAL`
`static int` | `SIMPLEX_DUAL_PRIMAL`
`static int` | `SIMPLEX_PRIMAL_DUAL`
`static int` | `SIMPLEX_PRIMAL_PRIMAL`
`static int` | `SUBOPTIMAL`
`static int` | `TIMEOUT`
`static int` | `TRUE`
`static int` | `UNBOUNDED`
`static int` | `UNKNOWNERROR`
`static int` | `USERABORT`

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

### FALSE

    public static final int FALSE

See Also:
  Constant Field Values

### TRUE

    public static final int TRUE

See Also:
  Constant Field Values

### AUTOMATIC

    public static final int AUTOMATIC

See Also:
  Constant Field Values

### DYNAMIC

    public static final int DYNAMIC

See Also:
  Constant Field Values

### FR

    public static final int FR

See Also:
  Constant Field Values

### LE

    public static final int LE

See Also:
  Constant Field Values

### GE

    public static final int GE

See Also:
  Constant Field Values

### EQ

    public static final int EQ

See Also:
  Constant Field Values

### OF

    public static final int OF

See Also:
  Constant Field Values

### SIMPLEX_PRIMAL_PRIMAL

    public static final int SIMPLEX_PRIMAL_PRIMAL

See Also:
  Constant Field Values

### SIMPLEX_DUAL_PRIMAL

    public static final int SIMPLEX_DUAL_PRIMAL

See Also:
  Constant Field Values

### SIMPLEX_PRIMAL_DUAL

    public static final int SIMPLEX_PRIMAL_DUAL

See Also:
  Constant Field Values

### SIMPLEX_DUAL_DUAL

    public static final int SIMPLEX_DUAL_DUAL

See Also:
  Constant Field Values

### SIMPLEX_DEFAULT

    public static final int SIMPLEX_DEFAULT

See Also:
  Constant Field Values

### PRESOLVE_NONE

    public static final int PRESOLVE_NONE

See Also:
  Constant Field Values

### PRESOLVE_ROWS

    public static final int PRESOLVE_ROWS

See Also:
  Constant Field Values

### PRESOLVE_COLS

    public static final int PRESOLVE_COLS

See Also:
  Constant Field Values

### PRESOLVE_LINDEP

    public static final int PRESOLVE_LINDEP

See Also:
  Constant Field Values

### PRESOLVE_SOS

    public static final int PRESOLVE_SOS

See Also:
  Constant Field Values

### PRESOLVE_REDUCEMIP

    public static final int PRESOLVE_REDUCEMIP

See Also:
  Constant Field Values

### PRESOLVE_KNAPSACK

    public static final int PRESOLVE_KNAPSACK

See Also:
  Constant Field Values

### PRESOLVE_ELIMEQ2

    public static final int PRESOLVE_ELIMEQ2

See Also:
  Constant Field Values

### PRESOLVE_IMPLIEDFREE

    public static final int PRESOLVE_IMPLIEDFREE

See Also:
  Constant Field Values

### PRESOLVE_REDUCEGCD

    public static final int PRESOLVE_REDUCEGCD

See Also:
  Constant Field Values

### PRESOLVE_PROBEFIX

    public static final int PRESOLVE_PROBEFIX

See Also:
  Constant Field Values

### PRESOLVE_PROBEREDUCE

    public static final int PRESOLVE_PROBEREDUCE

See Also:
  Constant Field Values

### PRESOLVE_ROWDOMINATE

    public static final int PRESOLVE_ROWDOMINATE

See Also:
  Constant Field Values

### PRESOLVE_COLDOMINATE

    public static final int PRESOLVE_COLDOMINATE

See Also:
  Constant Field Values

### PRESOLVE_MERGEROWS

    public static final int PRESOLVE_MERGEROWS

See Also:
  Constant Field Values

### PRESOLVE_IMPLIEDSLK

    public static final int PRESOLVE_IMPLIEDSLK

See Also:
  Constant Field Values

### PRESOLVE_COLFIXDUAL

    public static final int PRESOLVE_COLFIXDUAL

See Also:
  Constant Field Values

### PRESOLVE_BOUNDS

    public static final int PRESOLVE_BOUNDS

See Also:
  Constant Field Values

### PRESOLVE_DUALS

    public static final int PRESOLVE_DUALS

See Also:
  Constant Field Values

### PRESOLVE_SENSDUALS

    public static final int PRESOLVE_SENSDUALS

See Also:
  Constant Field Values

### CRASH_NOTHING

    public static final int CRASH_NOTHING

See Also:
  Constant Field Values

### CRASH_MOSTFEASIBLE

    public static final int CRASH_MOSTFEASIBLE

See Also:
  Constant Field Values

### ANTIDEGEN_NONE

    public static final int ANTIDEGEN_NONE

See Also:
  Constant Field Values

### ANTIDEGEN_FIXEDVARS

    public static final int ANTIDEGEN_FIXEDVARS

See Also:
  Constant Field Values

### ANTIDEGEN_COLUMNCHECK

    public static final int ANTIDEGEN_COLUMNCHECK

See Also:
  Constant Field Values

### ANTIDEGEN_STALLING

    public static final int ANTIDEGEN_STALLING

See Also:
  Constant Field Values

### ANTIDEGEN_NUMFAILURE

    public static final int ANTIDEGEN_NUMFAILURE

See Also:
  Constant Field Values

### ANTIDEGEN_LOSTFEAS

    public static final int ANTIDEGEN_LOSTFEAS

See Also:
  Constant Field Values

### ANTIDEGEN_INFEASIBLE

    public static final int ANTIDEGEN_INFEASIBLE

See Also:
  Constant Field Values

### ANTIDEGEN_DYNAMIC

    public static final int ANTIDEGEN_DYNAMIC

See Also:
  Constant Field Values

### ANTIDEGEN_DURINGBB

    public static final int ANTIDEGEN_DURINGBB

See Also:
  Constant Field Values

### ANTIDEGEN_RHSPERTURB

    public static final int ANTIDEGEN_RHSPERTURB

See Also:
  Constant Field Values

### ANTIDEGEN_BOUNDFLIP

    public static final int ANTIDEGEN_BOUNDFLIP

See Also:
  Constant Field Values

### NEUTRAL

    public static final int NEUTRAL

See Also:
  Constant Field Values

### CRITICAL

    public static final int CRITICAL

See Also:
  Constant Field Values

### SEVERE

    public static final int SEVERE

See Also:
  Constant Field Values

### IMPORTANT

    public static final int IMPORTANT

See Also:
  Constant Field Values

### NORMAL

    public static final int NORMAL

See Also:
  Constant Field Values

### DETAILED

    public static final int DETAILED

See Also:
  Constant Field Values

### FULL

    public static final int FULL

See Also:
  Constant Field Values

### MSG_NONE

    public static final int MSG_NONE

See Also:
  Constant Field Values

### MSG_PRESOLVE

    public static final int MSG_PRESOLVE

See Also:
  Constant Field Values

### MSG_ITERATION

    public static final int MSG_ITERATION

See Also:
  Constant Field Values

### MSG_INVERT

    public static final int MSG_INVERT

See Also:
  Constant Field Values

### MSG_LPFEASIBLE

    public static final int MSG_LPFEASIBLE

See Also:
  Constant Field Values

### MSG_LPOPTIMAL

    public static final int MSG_LPOPTIMAL

See Also:
  Constant Field Values

### MSG_LPEQUAL

    public static final int MSG_LPEQUAL

See Also:
  Constant Field Values

### MSG_LPBETTER

    public static final int MSG_LPBETTER

See Also:
  Constant Field Values

### MSG_MILPFEASIBLE

    public static final int MSG_MILPFEASIBLE

See Also:
  Constant Field Values

### MSG_MILPEQUAL

    public static final int MSG_MILPEQUAL

See Also:
  Constant Field Values

### MSG_MILPBETTER

    public static final int MSG_MILPBETTER

See Also:
  Constant Field Values

### MSG_MILPSTRATEGY

    public static final int MSG_MILPSTRATEGY

See Also:
  Constant Field Values

### MSG_MILPOPTIMAL

    public static final int MSG_MILPOPTIMAL

See Also:
  Constant Field Values

### MSG_PERFORMANCE

    public static final int MSG_PERFORMANCE

See Also:
  Constant Field Values

### MSG_INITPSEUDOCOST

    public static final int MSG_INITPSEUDOCOST

See Also:
  Constant Field Values

### IMPROVE_NONE

    public static final int IMPROVE_NONE

See Also:
  Constant Field Values

### IMPROVE_SOLUTION

    public static final int IMPROVE_SOLUTION

See Also:
  Constant Field Values

### IMPROVE_DUALFEAS

    public static final int IMPROVE_DUALFEAS

See Also:
  Constant Field Values

### IMPROVE_THETAGAP

    public static final int IMPROVE_THETAGAP

See Also:
  Constant Field Values

### IMPROVE_BBSIMPLEX

    public static final int IMPROVE_BBSIMPLEX

See Also:
  Constant Field Values

### SCALE_NONE

    public static final int SCALE_NONE

See Also:
  Constant Field Values

### SCALE_EXTREME

    public static final int SCALE_EXTREME

See Also:
  Constant Field Values

### SCALE_RANGE

    public static final int SCALE_RANGE

See Also:
  Constant Field Values

### SCALE_MEAN

    public static final int SCALE_MEAN

See Also:
  Constant Field Values

### SCALE_GEOMETRIC

    public static final int SCALE_GEOMETRIC

See Also:
  Constant Field Values

### SCALE_CURTISREID

    public static final int SCALE_CURTISREID

See Also:
  Constant Field Values

### SCALE_LINEAR

    public static final int SCALE_LINEAR

See Also:
  Constant Field Values

### SCALE_QUADRATIC

    public static final int SCALE_QUADRATIC

See Also:
  Constant Field Values

### SCALE_LOGARITHMIC

    public static final int SCALE_LOGARITHMIC

See Also:
  Constant Field Values

### SCALE_USERWEIGHT

    public static final int SCALE_USERWEIGHT

See Also:
  Constant Field Values

### SCALE_POWER2

    public static final int SCALE_POWER2

See Also:
  Constant Field Values

### SCALE_EQUILIBRATE

    public static final int SCALE_EQUILIBRATE

See Also:
  Constant Field Values

### SCALE_INTEGERS

    public static final int SCALE_INTEGERS

See Also:
  Constant Field Values

### SCALE_DYNUPDATE

    public static final int SCALE_DYNUPDATE

See Also:
  Constant Field Values

### SCALE_ROWSONLY

    public static final int SCALE_ROWSONLY

See Also:
  Constant Field Values

### SCALE_COLSONLY

    public static final int SCALE_COLSONLY

See Also:
  Constant Field Values

### PRICER_FIRSTINDEX

    public static final int PRICER_FIRSTINDEX

See Also:
  Constant Field Values

### PRICER_DANTZIG

    public static final int PRICER_DANTZIG

See Also:
  Constant Field Values

### PRICER_DEVEX

    public static final int PRICER_DEVEX

See Also:
  Constant Field Values

### PRICER_STEEPESTEDGE

    public static final int PRICER_STEEPESTEDGE

See Also:
  Constant Field Values

### PRICE_METHODDEFAULT

    public static final int PRICE_METHODDEFAULT

See Also:
  Constant Field Values

### PRICE_PRIMALFALLBACK

    public static final int PRICE_PRIMALFALLBACK

See Also:
  Constant Field Values

### PRICE_MULTIPLE

    public static final int PRICE_MULTIPLE

See Also:
  Constant Field Values

### PRICE_PARTIAL

    public static final int PRICE_PARTIAL

See Also:
  Constant Field Values

### PRICE_ADAPTIVE

    public static final int PRICE_ADAPTIVE

See Also:
  Constant Field Values

### PRICE_HYBRID

    public static final int PRICE_HYBRID

See Also:
  Constant Field Values

### PRICE_RANDOMIZE

    public static final int PRICE_RANDOMIZE

See Also:
  Constant Field Values

### PRICE_AUTOPARTIAL

    public static final int PRICE_AUTOPARTIAL

See Also:
  Constant Field Values

### PRICE_LOOPLEFT

    public static final int PRICE_LOOPLEFT

See Also:
  Constant Field Values

### PRICE_LOOPALTERNATE

    public static final int PRICE_LOOPALTERNATE

See Also:
  Constant Field Values

### PRICE_HARRISTWOPASS

    public static final int PRICE_HARRISTWOPASS

See Also:
  Constant Field Values

### PRICE_TRUENORMINIT

    public static final int PRICE_TRUENORMINIT

See Also:
  Constant Field Values

### NODE_FIRSTSELECT

    public static final int NODE_FIRSTSELECT

See Also:
  Constant Field Values

### NODE_GAPSELECT

    public static final int NODE_GAPSELECT

See Also:
  Constant Field Values

### NODE_RANGESELECT

    public static final int NODE_RANGESELECT

See Also:
  Constant Field Values

### NODE_FRACTIONSELECT

    public static final int NODE_FRACTIONSELECT

See Also:
  Constant Field Values

### NODE_PSEUDOCOSTSELECT

    public static final int NODE_PSEUDOCOSTSELECT

See Also:
  Constant Field Values

### NODE_PSEUDONONINTSELECT

    public static final int NODE_PSEUDONONINTSELECT

See Also:
  Constant Field Values

### NODE_PSEUDORATIOSELECT

    public static final int NODE_PSEUDORATIOSELECT

See Also:
  Constant Field Values

### NODE_USERSELECT

    public static final int NODE_USERSELECT

See Also:
  Constant Field Values

### NODE_WEIGHTREVERSEMODE

    public static final int NODE_WEIGHTREVERSEMODE

See Also:
  Constant Field Values

### NODE_BRANCHREVERSEMODE

    public static final int NODE_BRANCHREVERSEMODE

See Also:
  Constant Field Values

### NODE_GREEDYMODE

    public static final int NODE_GREEDYMODE

See Also:
  Constant Field Values

### NODE_PSEUDOCOSTMODE

    public static final int NODE_PSEUDOCOSTMODE

See Also:
  Constant Field Values

### NODE_DEPTHFIRSTMODE

    public static final int NODE_DEPTHFIRSTMODE

See Also:
  Constant Field Values

### NODE_RANDOMIZEMODE

    public static final int NODE_RANDOMIZEMODE

See Also:
  Constant Field Values

### NODE_DYNAMICMODE

    public static final int NODE_DYNAMICMODE

See Also:
  Constant Field Values

### NODE_RESTARTMODE

    public static final int NODE_RESTARTMODE

See Also:
  Constant Field Values

### NODE_BREADTHFIRSTMODE

    public static final int NODE_BREADTHFIRSTMODE

See Also:
  Constant Field Values

### NODE_AUTOORDER

    public static final int NODE_AUTOORDER

See Also:
  Constant Field Values

### NODE_RCOSTFIXING

    public static final int NODE_RCOSTFIXING

See Also:
  Constant Field Values

### NODE_STRONGINIT

    public static final int NODE_STRONGINIT

See Also:
  Constant Field Values

### BRANCH_CEILING

    public static final int BRANCH_CEILING

See Also:
  Constant Field Values

### BRANCH_FLOOR

    public static final int BRANCH_FLOOR

See Also:
  Constant Field Values

### BRANCH_AUTOMATIC

    public static final int BRANCH_AUTOMATIC

See Also:
  Constant Field Values

### BRANCH_DEFAULT

    public static final int BRANCH_DEFAULT

See Also:
  Constant Field Values

### UNKNOWNERROR

    public static final int UNKNOWNERROR

See Also:
  Constant Field Values

### DATAIGNORED

    public static final int DATAIGNORED

See Also:
  Constant Field Values

### NOBFP

    public static final int NOBFP

See Also:
  Constant Field Values

### NOMEMORY

    public static final int NOMEMORY

See Also:
  Constant Field Values

### NOTRUN

    public static final int NOTRUN

See Also:
  Constant Field Values

### OPTIMAL

    public static final int OPTIMAL

See Also:
  Constant Field Values

### SUBOPTIMAL

    public static final int SUBOPTIMAL

See Also:
  Constant Field Values

### INFEASIBLE

    public static final int INFEASIBLE

See Also:
  Constant Field Values

### UNBOUNDED

    public static final int UNBOUNDED

See Also:
  Constant Field Values

### DEGENERATE

    public static final int DEGENERATE

See Also:
  Constant Field Values

### NUMFAILURE

    public static final int NUMFAILURE

See Also:
  Constant Field Values

### USERABORT

    public static final int USERABORT

See Also:
  Constant Field Values

### TIMEOUT

    public static final int TIMEOUT

See Also:
  Constant Field Values

### RUNNING

    public static final int RUNNING

See Also:
  Constant Field Values

### PRESOLVED

    public static final int PRESOLVED

See Also:
  Constant Field Values

### PROCFAIL

    public static final int PROCFAIL

See Also:
  Constant Field Values

### PROCBREAK

    public static final int PROCBREAK

See Also:
  Constant Field Values

### FEASFOUND

    public static final int FEASFOUND

See Also:
  Constant Field Values

### NOFEASFOUND

    public static final int NOFEASFOUND

See Also:
  Constant Field Values

Method Detail

### makeLp

    public static LpSolve makeLp(int rows,
                                 int columns)
                          throws LpSolveException

  Creates a new problem. Upon successful completion, the lprec attribute in this class contains the value of the pointer to the `lprec` structure.

  Parameters:
    `rows` - Initial number of rows.
    `columns` - Initial number of columns.
  Throws:
    `LpSolveException` - if lp_solve could not create the problem

### readLp

    public static LpSolve readLp(java.lang.String filename,
                                 int verbose,
                                 java.lang.String lpName)
                          throws LpSolveException

  Read an lp model from file and create a new problem.

  Throws:
    `LpSolveException`

### readMps

    public static LpSolve readMps(java.lang.String filename,
                                  int verbose)
                           throws LpSolveException

  Read an mps model from file and create a new problem.

  Throws:
    `LpSolveException`

### readFreeMps

    public static LpSolve readFreeMps(java.lang.String filename,
                                      int verbose)
                               throws LpSolveException

  Read a model in free MPS format from file and create a new problem.

  Throws:
    `LpSolveException`

### readXLI

    public static LpSolve readXLI(java.lang.String xliname,
                                  java.lang.String modelname,
                                  java.lang.String dataname,
                                  java.lang.String options,
                                  int verbose)
                           throws LpSolveException

  Read a model via the External Language Interface and create a new problem.

  Throws:
    `LpSolveException`

### lpSolveVersion

    public static VersionInfo lpSolveVersion()

  Returns the full version number of the underlying lp_solve library.

  Returns:
    VersionInfo object with full version info

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### getLp

    public long getLp()

  Return the value of the lp attribute.

  Returns:
    the value of the lp attribute

### copyLp

    public LpSolve copyLp()
                   throws LpSolveException

  Copy an existing lprec structure to a new lprec structure. Creates an independent new problem.

  Throws:
    `LpSolveException`

### resizeLp

    public void resizeLp(int rows,
                         int columns)
                       throws LpSolveException

  Allocate memory for the specified size.

### setLpName

    public void setLpName(java.lang.String name)
                   throws LpSolveException

  Set the name of the problem.

  Throws:
    `LpSolveException`

### getLpName

    public java.lang.String getLpName()
                               throws LpSolveException

  Get the name of the problem.

  Throws:
    `LpSolveException`

### addConstraint

    public void addConstraint(double[] row,
                              int constrType,
                              double rh)
                       throws LpSolveException

  Add a constraint to the problem.

  Throws:
    `LpSolveException`

### strAddConstraint

    public void strAddConstraint(java.lang.String row,
                                 int constrType,
                                 double rh)
                          throws LpSolveException

  Add a constraint to the problem.

  Throws:
    `LpSolveException`

### addConstraintex

    public void addConstraintex(int count,
                                double[] row,
                                int[] colno,
                                int constrType,
                                double rh)
                         throws LpSolveException

  Add a constraint to the problem.

  Throws:
    `LpSolveException`

### delConstraint

    public void delConstraint(int rownr)
                       throws LpSolveException

  Remove a constraint from the problem.

  Throws:
    `LpSolveException`

### isConstrType

    public boolean isConstrType(int row,
                                int mask)

  Returns if constraint type specified in mask is active.

### addLagCon

    public void addLagCon(double[] row,
                          int constrType,
                          double rh)
                   throws LpSolveException

  Add a Lagrangian constraint to the problem.

  Throws:
    `LpSolveException`

### strAddLagCon

    public void strAddLagCon(java.lang.String row,
                             int constrType,
                             double rh)
                      throws LpSolveException

  Add a Lagrangian constraint to the problem.

  Throws:
    `LpSolveException`

### addColumn

    public void addColumn(double[] column)
                   throws LpSolveException

  Add a column to the problem.

  Throws:
    `LpSolveException`

### addColumnex

    public void addColumnex(int count,
                            double[] column,
                            int[] rowno)
                     throws LpSolveException

  Add a column to the problem.

  Throws:
    `LpSolveException`

### strAddColumn

    public void strAddColumn(java.lang.String column)
                      throws LpSolveException

  Add a column to the problem.

  Throws:
    `LpSolveException`

### delColumn

    public void delColumn(int columnnr)
                   throws LpSolveException

  Remove a column from the problem.

  Throws:
    `LpSolveException`

### setRow

    public void setRow(int rowno,
                       double[] row)
                throws LpSolveException

  Set a constraint in the lp.

  Throws:
    `LpSolveException`

### setRowex

    public void setRowex(int rowno,
                         int count,
                         double[] row,
                         int[] colno)
                  throws LpSolveException

  Set a constraint in the lp.

  Throws:
    `LpSolveException`

### setColumn

    public void setColumn(int colno,
                          double[] column)
                   throws LpSolveException

  Set a column in the lp.

  Throws:
    `LpSolveException`

### setColumnex

    public void setColumnex(int colno,
                            int count,
                            double[] column,
                            int[] rowno)
                     throws LpSolveException

  Set a column in the lp.

  Throws:
    `LpSolveException`

### columnInLp

    public int columnInLp(double[] column)

  Check if a column is already present in the problem.

### setRowName

    public void setRowName(int rownr,
                           java.lang.String name)
                    throws LpSolveException

  Set the name of a constraint (row) in the problem.

  Throws:
    `LpSolveException`

### getRowName

    public java.lang.String getRowName(int rownr)
                                throws LpSolveException

  Gets the name of a constraint (row) in the problem.

  Throws:
    `LpSolveException`

### getOrigrowName

    public java.lang.String getOrigrowName(int rownr)
                                    throws LpSolveException

  Gets the name of a constraint (row) in the problem.

  Throws:
    `LpSolveException`

### setColName

    public void setColName(int colnr,
                           java.lang.String name)
                    throws LpSolveException

  Set the name of a column in the problem.

  Throws:
    `LpSolveException`

### getColName

    public java.lang.String getColName(int colnr)
                                throws LpSolveException

  Gets the name of a column in the problem.

  Throws:
    `LpSolveException`

### getOrigcolName

    public java.lang.String getOrigcolName(int colnr)
                                    throws LpSolveException

  Gets the name of a column in the problem.

  Throws:
    `LpSolveException`

### setRhVec

    public void setRhVec(double[] rh)
                  throws LpSolveException

  Set the right hand side (RHS) vector (column 0).

  Throws:
    `LpSolveException`

### strSetRhVec

    public void strSetRhVec(java.lang.String rh)
                     throws LpSolveException

  Set the right hand side (RHS) vector (column 0).

  Throws:
    `LpSolveException`

### setRh

    public void setRh(int row,
                      double value)
               throws LpSolveException

  Set the value of the right hand side (RHS) vector (column 0) for one row.

  Throws:
    `LpSolveException`

### getRh

    public double getRh(int row)

  Get the value of the right hand side (RHS) vector (column 0) for one row. NOTE: Returns 0 even if the row index is out of bounds, in accordance to the behaviour of the lp_solve routine!

### setConstrType

    public void setConstrType(int rownr,
                              int constrType)
                       throws LpSolveException

  Set the type of a constraint.

  Throws:
    `LpSolveException`

### getConstrType

    public short getConstrType(int rownr)
                        throws LpSolveException

  Get the type of a constraint.

  Throws:
    `LpSolveException`

### addSOS

    public void addSOS(java.lang.String name,
                       int sostype,
                       int priority,
                       int count,
                       int[] sosvars,
                       double[] weights)
                throws LpSolveException

  Add a SOS constraint.

  Throws:
    `LpSolveException`

### isSOSVar

    public boolean isSOSVar(int colnr)
                     throws LpSolveException

  Returns if the variable is SOS or not.

  Throws:
    `LpSolveException`

### setObjFn

    public void setObjFn(double[] row)
                  throws LpSolveException

  Set the objective function (row 0) of the matrix.

  Throws:
    `LpSolveException`

### strSetObjFn

    public void strSetObjFn(java.lang.String row)
                     throws LpSolveException

  Set the objective function (row 0) of the matrix.

  Throws:
    `LpSolveException`

### setObjFnex

    public void setObjFnex(int count,
                           double[] row,
                           int[] colno)
                    throws LpSolveException

  Set the objective function (row 0) of the matrix.

  Throws:
    `LpSolveException`

### setObj

    public void setObj(int column,
                       double value)
                throws LpSolveException

  Set the objective function (row 0) of the matrix.

  Throws:
    `LpSolveException`

### setMat

    public void setMat(int row,
                       int column,
                       double value)
                throws LpSolveException

  Set a single element in the matrix.

  Throws:
    `LpSolveException`

### getMat

    public double getMat(int row,
                         int column)

  Get a single element from the matrix.

### getRow

    public void getRow(int rownr,
                       double[] row)
                throws LpSolveException

  Get all row elements from the matrix. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getRowex

    public int getRowex(int rownr,
                        double[] row,
                        int[] nzcols)
                 throws LpSolveException

  Get the non-zero row elements from the matrix. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrRow

    public double[] getPtrRow(int rownr)
                       throws LpSolveException

  Get all row elements from the matrix. Returned array is allocated by the method. This is an additional method which is not implemented by lp_solve. Internally, get_row is used.

  Throws:
    `LpSolveException`

### getColumn

    public void getColumn(int colnr,
                          double[] column)
                   throws LpSolveException

  Get all column elements from the matrix. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getColumnex

    public int getColumnex(int colnr,
                           double[] column,
                           int[] nzrows)
                    throws LpSolveException

  Get the non-zero column elements from the matrix. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrColumn

    public double[] getPtrColumn(int columnrnr)
                          throws LpSolveException

  Get all column elements from the matrix. Returned array is allocated by the method. This is an additional method which is not implemented by lp_solve. Internally, get_column is used.

  Throws:
    `LpSolveException`

### setMaxim

    public void setMaxim()

  Set objective function to maximize.

### setMinim

    public void setMinim()

  Set objective function to minimize.

### setSense

    public void setSense(boolean maximize)

  Set objective function sense.

### isMaxim

    public boolean isMaxim()

  Returns objective function direction.

### setLowbo

    public void setLowbo(int colnr,
                         double value)
                  throws LpSolveException

  Set the lower bound of a variable.

  Throws:
    `LpSolveException`

### getLowbo

    public double getLowbo(int colnr)
                    throws LpSolveException

  Get the lower bound of a variable.

  Throws:
    `LpSolveException`

### setUpbo

    public void setUpbo(int colnr,
                        double value)
                 throws LpSolveException

  Set the upper bound of a variable.

  Throws:
    `LpSolveException`

### getUpbo

    public double getUpbo(int colnr)
                   throws LpSolveException

  Get the upper bound of a variable.

  Throws:
    `LpSolveException`

### setUnbounded

    public void setUnbounded(int colnr)
                      throws LpSolveException

  Sets if the variable is free.

  Throws:
    `LpSolveException`

### isUnbounded

    public boolean isUnbounded(int colnr)

  Returns if the variable is free.

### isNegative

    public boolean isNegative(int colnr)

  Returns if the variable is negative.

### setBounds

    public void setBounds(int colnr,
                          double lower,
                          double upper)
                   throws LpSolveException

  Set the upper and lower bound of a variable.

  Throws:
    `LpSolveException`

### setBoundsTighter

    public void setBoundsTighter(boolean tighten)

  Specifies if set bounds may only be tighter or also less restrictive.

### getBoundsTighter

    public boolean getBoundsTighter()

  Returns if set bounds may only be tighter or also less restrictive.

### setRhRange

    public void setRhRange(int rownr,
                           double range)
                    throws LpSolveException

  Set the range on a constraint.

  Throws:
    `LpSolveException`

### getRhRange

    public double getRhRange(int rownr)
                      throws LpSolveException

  Gets the range on a constraint.

  Throws:
    `LpSolveException`

### setInt

    public void setInt(int colnr,
                       boolean mustBeInteger)
                throws LpSolveException

  Set the type of the variable. Integer or floating point.

  Throws:
    `LpSolveException`

### isInt

    public boolean isInt(int colnr)

  Get the type of the variable. Integer or floating point.

### setBinary

    public void setBinary(int colnr,
                          boolean mustBeBin)
                   throws LpSolveException

  Set the type of the variable. Binary or floating point.

  Throws:
    `LpSolveException`

### isBinary

    public boolean isBinary(int colnr)

  Gets the type of the variable. Binary integer or floating point.

### setSemicont

    public void setSemicont(int colnr,
                            boolean mustBeSc)
                     throws LpSolveException

  Set the type of the variable. semi-continious or not.

  Throws:
    `LpSolveException`

### isSemicont

    public boolean isSemicont(int colnr)

  Get the type of the variable. semi-continious or not.

### setInfinite

    public void setInfinite(double value)

  Specifies the practical value for "infinite".

### getInfinite

    public double getInfinite()

  Returns the value of "infinite".

### isInfinite

    public boolean isInfinite(double value)

  Checks if the provided absolute of the value is larger or equal to "infinite".

### setEpsint

    public void setEpsint(double value)

  Specifies the tolerance that is used to determine whether a floating-point number is in fact an integer.

### getEpsint

    public double getEpsint()

  Returns the tolerance that is used to determine whether a floating-point number is in fact an integer

### setEpsb

    public 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

### getEpsb

    public 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.

### setEpsd

    public 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.

### getEpsd

    public 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.

### setEpsel

    public void setEpsel(double value)

  Specifies the value that is used as a tolerance for rounding values to zero.

### getEpsel

    public double getEpsel()

  Returns the value that is used as a tolerance for rounding values to zero.

### setEpspivot

    public 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.

### getEpspivot

    public double getEpspivot()

  Returns the value that is used as a tolerance pivot element to determine whether a value should be considered as 0.

### setEpsperturb

    public void setEpsperturb(double value)

  Specifies the value that is used as perturbation scalar for degenerative problems.

### getEpsperturb

    public double getEpsperturb()

  Returns the value that is used as perturbation scalar for degenerative problems.

### setEpslevel

    public void setEpslevel(int epslevel)
                     throws LpSolveException

  This is a simplified way of specifying multiple eps thresholds that are "logically" consistent.

  Throws:
    `LpSolveException`

### getStatus

    public int getStatus()

  Returns an extra status after a call to a function.

### setMipGap

    public void setMipGap(boolean absolute,
                          double value)

  Specifies the MIP gap value.

### getMipGap

    public double getMipGap(boolean absolute)

  Returns the MIP gap value.

### setVerbose

    public void setVerbose(int verbose)

  Set the verbose level.

### getVerbose

    public int getVerbose()

  Returns the verbose level.

### setTimeout

    public void setTimeout(long timeout)

  Set a timeout.

### getTimeout

    public long getTimeout()

  Gets the timout.

### timeElapsed

    public double timeElapsed()

  Gets the time elapsed since start of solve.

### setPrintSol

    public void setPrintSol(int printSol)

  Sets a flag if all intermediate valid solutions must be printed while solving.

### getPrintSol

    public int getPrintSol()

  Returns a flag if all intermediate valid solutions must be printed while solving.

### setDebug

    public void setDebug(boolean debug)

  Sets a flag if all intermediate results and the branch-and-bound decisions must be printed while solving.

### isDebug

    public boolean isDebug()

  Returns a flag if all intermediate results and the branch-and-bound decisions must be printed while solving.

### setTrace

    public void setTrace(boolean trace)

  Sets a flag if pivot selection must be printed while solving.

### isTrace

    public boolean isTrace()

  Returns a flag if pivot selection must be printed while solving.

### setLagTrace

    public void setLagTrace(boolean lagTrace)

  Sets a flag if Lagrangian progression must be printed while solving.

### isLagTrace

    public boolean isLagTrace()

  Returns a flag if Lagrangian progression must be printed while solving.

### setAddRowmode

    public boolean setAddRowmode(boolean turnon)

  Specifies which add routine performs best.

### isAddRowmode

    public boolean isAddRowmode()

  Returns a flag which of the add routines perform best.

### setAntiDegen

    public void setAntiDegen(int antiDegen)

  Specifies if special handling must be done to reduce degeneracy/cycling while solving.

### isAntiDegen

    public boolean isAntiDegen(int testmask)

  Returns if the degeneracy rule specified in testmask is active.

### getAntiDegen

    public int getAntiDegen()

  Returns the used degeneracy rule.

### setPresolve

    public void setPresolve(int doPresolve,
                            int maxloops)

  Specifies if a presolve must be done before solving.

### isPresolve

    public boolean isPresolve(int testmask)

  Returns if presolve level specified in testmask is active.

### getPresolve

    public int getPresolve()

  Returns the current presolve setting.

### getPresolveloops

    public int getPresolveloops()

  Returns the number of times presolve is done.

### setMaxpivot

    public void setMaxpivot(int maxNumInv)

  Sets the maximum number of pivots between a reinversion of the matrix.

### getMaxpivot

    public int getMaxpivot()

  Returns the maximum number of pivots between a reinversion of the matrix.

### setBbRule

    public void setBbRule(int bbRule)

  Specifies the branch-and-bound rule.

### getBbRule

    public int getBbRule()

  Returns the branch-and-bound rule.

### setBbDepthlimit

    public void setBbDepthlimit(int bbMaxlevel)

  Sets the maximum branch-and-bound depth.

### getBbDepthlimit

    public int getBbDepthlimit()

  Returns the maximum branch-and-bound depth.

### getSolutioncount

    public int getSolutioncount()

  Returns the number of equal solutions.

### setSolutionlimit

    public void setSolutionlimit(int limit)

  Sets the solution number that must be returned.

### getSolutionlimit

    public int getSolutionlimit()

  Returns the solution number that must be returned.

### setObjBound

    public void setObjBound(double objBound)

  Set initial "at least better than" guess for objective function.

### getObjBound

    public double getObjBound()

  Returns initial "at least better than" guess for objective function.

### setBbFloorfirst

    public void setBbFloorfirst(int floorFirst)

  Specifies which branch to take first in branch-and-bound algorithm.

### getBbFloorfirst

    public int getBbFloorfirst()

  Returns which branch to take first in branch-and-bound algorithm.

### setVarBranch

    public void setVarBranch(int colnr,
                             int branchMode)
                      throws LpSolveException

  Specifies, for the specified variable, which branch to take first in branch-and-bound algorithm.

  Throws:
    `LpSolveException`

### getVarBranch

    public int getVarBranch(int colnr)
                     throws LpSolveException

  Returns, for the specified variable, which branch to take first in branch-and-bound algorithm.

  Throws:
    `LpSolveException`

### setVarWeights

    public void setVarWeights(double[] weights)
                       throws LpSolveException

  Set the weights on variables.

  Throws:
    `LpSolveException`

### getVarPriority

    public int getVarPriority(int colnr)
                       throws LpSolveException

  Returns, for the specified variable, the priority the variable has in the branch-and-bound algorithm.

  Throws:
    `LpSolveException`

### setBreakAtFirst

    public void setBreakAtFirst(boolean breakAtFirst)

  Specifies if the branch-and-bound algorithm stops at first found solution.

### isBreakAtFirst

    public boolean isBreakAtFirst()

  Returns if the branch-and-bound algorithm stops at first found solution.

### setBreakAtValue

    public void setBreakAtValue(double breakAtValue)

  Specifies if the branch-and-bound algorithm stops when the object value is better than a given value.

### getBreakAtValue

    public double getBreakAtValue()

  Returns the value at which the branch-and-bound algorithm stops when the object value is better than this value.

### setScaling

    public void setScaling(int scalemode)

  Specifies which scaling algorithm must be used.

### getScaling

    public int getScaling()

  Specifies which scaling algorithm is used.

### isScalemode

    public boolean isScalemode(int testmask)

  Returns if scaling mode specified in testmask is active.

### isScaletype

    public boolean isScaletype(int scaletype)

  Returns if scaling type specified in scaletype is active.

### isIntegerscaling

    public boolean isIntegerscaling()

  Specifies which scaling algorithm is used.

### setScalelimit

    public void setScalelimit(double scalelimit)

  Sets the relative scaling convergence criterion for the active scaling mode; the integer part specifies the maximum number of iterations.

### getScalelimit

    public double getScalelimit()

  Returns the relative scaling convergence criterion for the active scaling mode; the integer part specifies the maximum number of iterations.

### setImprove

    public void setImprove(int improve)

  Specifies the iterative improvement level.

### getImprove

    public int getImprove()

  Returns the iterative improvement level.

### setPivoting

    public void setPivoting(int pivRule)

  Specifies the pivot rule.

### getPivoting

    public int getPivoting()

  Returns the pivot rule.

### isPivMode

    public boolean isPivMode(int testmask)

  Returns if pivot strategy specified in testmask is active.

### isPivRule

    public boolean isPivRule(int rule)

  Checks if the specified pivot rule is active.

### setPreferdual

    public void setPreferdual(boolean dodual)

  Sets the desired combination of primal and dual simplex algorithms.

### setSimplextype

    public void setSimplextype(int simplextype)

  Sets the desired combination of primal and dual simplex algorithms.

### getSimplextype

    public int getSimplextype()

  Returns the desired combination of primal and dual simplex algorithms.

### setNegrange

    public void setNegrange(double negRange)

  Set negative value below which variables are split into a negative and a positive part.

### getNegrange

    public double getNegrange()

  Returns the negative value below which variables are split into a negative and a positive part.

### getTotalIter

    public long getTotalIter()

  Returns the total number of iterations with Branch-and-bound of the last solution.

### getMaxLevel

    public int getMaxLevel()

  Returns the deepest Branch-and-bound level of the last solution.

### getTotalNodes

    public long getTotalNodes()

  Returns the total number of nodes processed in branch-and-bound.

### getNrows

    public int getNrows()

  Returns the number of rows (constraints) in the problem.

### getNorigRows

    public int getNorigRows()

  Returns the number of original rows (constraints) in the problem.

### getLrows

    public int getLrows()

  Returns the number of Lagrangian rows in the lp.

### getNcolumns

    public int getNcolumns()

  Returns the number of columns (variables) in the problem.

### getNorigColumns

    public int getNorigColumns()

  Returns the number of original columns (variables) in the problem.

### getNonzeros

    public int getNonzeros()

  Returns the number of non-zero elements in the matrix.

### getOrigIndex

    public int getOrigIndex(int index)

  Returns the original row/column where a constraint/variable was before presolve.

### getLpIndex

    public int getLpIndex(int index)

  Returns the index in the lp of the original row/column.

### setBasis

    public void setBasis(int[] bascolumn,
                         boolean nonbasic)
                  throws LpSolveException

  Sets an initial basis of the lp.

  Throws:
    `LpSolveException`

### getBasis

    public void getBasis(int[] bascolumn,
                         boolean nonbasic)
                  throws LpSolveException

  Returns the basis of the lp.

  Throws:
    `LpSolveException`

### resetBasis

    public void resetBasis()

  Resets the basis to the initial basis.

### defaultBasis

    public void defaultBasis()

  Sets the starting base to an all slack basis (the default simplex starting basis).

### setBasiscrash

    public void setBasiscrash(int mode)

  Specifies which basis crash mode must be used.

### getBasiscrash

    public int getBasiscrash()

  Returns which basis crash mode must be used.

### guessBasis

    public void guessBasis(double[] guessvector, int[] basisvector)
                  throws LpSolveException

  Guess a basis for the lp.

  Throws:
    `LpSolveException`

### unscale

    public void unscale()

  Unscales the model.

### setBFP

    public void setBFP(java.lang.String filename)
                throws LpSolveException

  Set basis factorization package.

  Throws:
    `LpSolveException`

### isNativeBFP

    public boolean isNativeBFP()

  Returns if the native (build-in) basis factorization package (BFP) is used, or an external package.

### hasBFP

    public boolean hasBFP()

  Returns if there is a basis factorization package (BFP) available.

### solve

    public int solve()
              throws LpSolveException

  Solve the model.

  Throws:
    `LpSolveException`

### getStatustext

    public java.lang.String getStatustext(int statuscode)

  Returns the description of a returncode of the solve function.

### isFeasible

    public boolean isFeasible(double[] values,
                              double threshold)
                       throws LpSolveException

  Checks if provided solution is a feasible solution.

  Throws:
    `LpSolveException`

### getObjective

    public double getObjective()
                        throws LpSolveException

  Returns the value of the objective function.

  Throws:
    `LpSolveException`

### getWorkingObjective

    public double getWorkingObjective()
                               throws LpSolveException

  Returns the value of the objective function.

  Throws:
    `LpSolveException`

### getVariables

    public void getVariables(double[] var)
                      throws LpSolveException

  Returns the values of the variables. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrVariables

    public double[] getPtrVariables()
                             throws LpSolveException

  Returns the values of the variables. Returned array is allocated by the method.

  Throws:
    `LpSolveException`

### getConstraints

    public void getConstraints(double[] var)
                        throws LpSolveException

  Returns the values of the constraints. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrConstraints

    public double[] getPtrConstraints()
                               throws LpSolveException

  Returns the values of the constraints. Returned array is allocated by the method.

  Throws:
    `LpSolveException`

### getPrimalSolution

    public void getPrimalSolution(double[] pv)
                           throws LpSolveException

  Returns the solution of the model. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrPrimalSolution

    public double[] getPtrPrimalSolution()
                                  throws LpSolveException

  Returns the solution of the model. Returned array is allocated by the method.

  Throws:
    `LpSolveException`

### getVarPrimalresult

    public double getVarPrimalresult(int index)
                              throws LpSolveException

  Returns the solution of the model.

  Throws:
    `LpSolveException`

### getSensitivityRhs

    public void getSensitivityRhs(double[] duals,
                                  double[] dualsfrom,
                                  double[] dualstill)
                           throws LpSolveException

  Returns the sensitivity of the constraints and the variables. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrSensitivityRhs

    public double[][] getPtrSensitivityRhs()
                                    throws LpSolveException

  Returns the sensitivity of the constraints and the variables. Returned arrays are allocated by the method. The returned array contains two elements of type double[]. element [0] is the duals array, element [1] is the dualsfrom array, element [2] is the dualstill array.

  Throws:
    `LpSolveException`

### getDualSolution

    public void getDualSolution(double[] duals)
                         throws LpSolveException

  Returns the sensitivity of the constraints and the variables. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrDualSolution

    public double[] getPtrDualSolution()
                                throws LpSolveException

  Returns the sensitivity of the constraints and the variables. Returned array is allocated by the method.

  Throws:
    `LpSolveException`

### getVarDualresult

    public double getVarDualresult(int index)
                            throws LpSolveException

  Returns the sensitivity of the constraints and the variables.

  Throws:
    `LpSolveException`

### getSensitivityObj

    public void getSensitivityObj(double[] objfrom,
                                  double[] objtill)
                           throws LpSolveException

  Returns the sensitivity of the objective function. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrSensitivityObj

    public double[][] getPtrSensitivityObj()
                                    throws LpSolveException

  Returns the sensitivity of the objective function. Returned arrays are allocated by the method. The returned array contains two elements of type double[]. element [0] is the objfrom array, element [1] is the objtill array.

  Throws:
    `LpSolveException`

### getSensitivityObjex

    public void getSensitivityObjex(double[] objfrom,
                                    double[] objtill,
                                    double[] objfromvalue,
                                    double[] objtillvalue)
                             throws LpSolveException

  Returns the sensitivity of the objective function. Passed in arrays must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrSensitivityObjex

    public double[][] getPtrSensitivityObjex()
                                      throws LpSolveException

  Returns the sensitivity of the objective function. Returned arrays are allocated by the method. The returned array contains four elements of type double[]. element [0] is the objfrom array, element [1] is the objtill array, element [2] is the objfromvalue array, element [3] is the objtillvalue array.

  Throws:
    `LpSolveException`

### getLambda

    public void getLambda(double[] lambda)
                   throws LpSolveException

  Returns the Lamdba vectors (Lagrangian optimization). Passed in array must be allocated by the caller of the method.

  Throws:
    `LpSolveException`

### getPtrLambda

    public double[] getPtrLambda()
                          throws LpSolveException

  Returns the Lamdba vectors (Lagrangian optimization). Returned array is allocated by the method.

  Throws:
    `LpSolveException`

### deleteLp

    public void deleteLp()

  Frees all resources allocated to this problem.

### writeLp

    public void writeLp(java.lang.String filename)
                 throws LpSolveException

  Write an lp model to a file.

  Throws:
    `LpSolveException`

### writeMps

    public void writeMps(java.lang.String filename)
                  throws LpSolveException

  Write an mps model to a file.

  Throws:
    `LpSolveException`

### writeFreeMps

    public void writeFreeMps(java.lang.String filename)
                      throws LpSolveException

  Write a model in free MPS format to a file.

  Throws:
    `LpSolveException`

### readBasis

    public java.lang.String readBasis(java.lang.String filename)
                               throws LpSolveException

  Read basis from a file and set as default basis. The info text is returned as method result.

  Throws:
    `LpSolveException`

### writeBasis

    public void writeBasis(java.lang.String filename)
                    throws LpSolveException

  Writes current basis to a file.

  Throws:
    `LpSolveException`

### readParams

    public void readParams(java.lang.String filename,
                           java.lang.String options)
                    throws LpSolveException

  Read settings from a parameter file.

  Throws:
    `LpSolveException`

### writeParams

    public void writeParams(java.lang.String filename,
                            java.lang.String options)
                     throws LpSolveException

  Write settings to a parameter file.

  Throws:
    `LpSolveException`

### resetParams

    public void resetParams()

  Resets parameters back to their default values.

### printLp

    public void printLp()

  Prints the lp model. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printConstraints

    public void printConstraints(int columns)

  Prints the values of the constraints of the lp. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printDuals

    public void printDuals()

  Prints the values of the duals of the lp. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printScales

    public void printScales()

  Prints the scales of the lp. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printTableau

    public void printTableau()

  Prints the tableau. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printObjective

    public void printObjective()

  Prints the objective value of the lp. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printSolution

    public void printSolution(int columns)

  Prints the solution (variables) of the lp. This can only be done after a successful solve. This function is meant for debugging purposes. By default, the output is stdout. However this can be changed via a call to setOutputfile.

### printStr

    public void printStr(java.lang.String str)

  Prints a string.

### setOutputfile

    public void setOutputfile(java.lang.String filename)
                       throws LpSolveException

  Defines the output for the print_* functions.

  Throws:
    `LpSolveException`

### printDebugdump

    public void printDebugdump(java.lang.String filename)
                        throws LpSolveException

  Do a generic readable data dump of key lp_solve model variables; principally for run difference and debugging purposes.

  Throws:
    `LpSolveException`

### setXLI

    public void setXLI(java.lang.String filename)
                throws LpSolveException

  Set External Language Interfaces package.

  Throws:
    `LpSolveException`

### writeXLI

    public void writeXLI(java.lang.String filename,
                         java.lang.String options,
                         boolean results)
                  throws LpSolveException

  Write a model to a file via the External Language Interface.

  Throws:
    `LpSolveException`

### hasXLI

    public boolean hasXLI()

  Returns if there is an external language interface (XLI) set.

### isNativeXLI

    public boolean isNativeXLI()

  Returns if a build-in External Language Interfaces (XLI) is available or not.

### getNameindex

    public int getNameindex(java.lang.String name,
                            boolean isRow)

  Gets the index of a given column or row name in the lp. A return value of -1 indicates that the name does not exist.

### dualizeLp

    public void dualizeLp()
                   throws LpSolveException

  Create the dual of the current model.

  Throws:
    `LpSolveException`

### isUseNames

    public boolean isUseNames(boolean isRow)

  Returns if variable or constraint names are used.

### setUseNames

    public void setUseNames(boolean isRow,
                            boolean useNames)

  Sets if variable or constraint names are used.

### getConstrValue

    public double getConstrValue(int rownr,
                                 int count,
                                 double[] primsolution,
                                 int[] nzindex)

  Gets the value of a constraint according to provided variable values.

### setBasisvar

    public int setBasisvar(int basisPos,
                           int enteringCol)

  This is an internal function that has been published for special purposes. It should generally not be used.

### putAbortfunc

    public void putAbortfunc(AbortListener listener,
                             java.lang.Object userhandle)
                      throws LpSolveException

  Register an `AbortListener` for callback.

  Parameters:
    `listener` - the listener that should be called by lp_solve
    `userhandle` - an arbitrary object that is passed to the listener on call
  Throws:
    `LpSolveException`

### putLogfunc

    public void putLogfunc(LogListener listener,
                           java.lang.Object userhandle)
                    throws LpSolveException

  Register an `LogListener` for callback.

  Parameters:
    `listener` - the listener that should be called by lp_solve
    `userhandle` - an arbitrary object that is passed to the listener on call
  Throws:
    `LpSolveException`

### putMsgfunc

    public void putMsgfunc(MsgListener listener,
                           java.lang.Object userhandle,
                           int mask)
                    throws LpSolveException

  Register an `MsgListener` for callback.

  Parameters:
    `listener` - the listener that should be called by lp_solve
    `userhandle` - an arbitrary object that is passed to the listener on call
  Throws:
    `LpSolveException`

### putBbBranchfunc

    public void putBbBranchfunc(BbListener listener,
                                java.lang.Object userhandle)
                         throws LpSolveException

  Register an `BbBranchListener` for callback.

  Parameters:
    `listener` - the listener that should be called by lp_solve
    `userhandle` - an arbitrary object that is passed to the listener on call
  Throws:
    `LpSolveException`

### putBbNodefunc

    public void putBbNodefunc(BbListener listener,
                              java.lang.Object userhandle)
                       throws LpSolveException

  Register an `BbNodeListener` for callback.

  Parameters:
    `listener` - the listener that should be called by lp_solve
    `userhandle` - an arbitrary object that is passed to the listener on call
  Throws:
    `LpSolveException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 - Juergen Ebert