Java Reference
Java Reference
Detailed Description
The class for variables of a Mathematical Programming (MP) model.
Definition at line 16 of file MPVariable.java.
Public Member Functions | |
| synchronized void | delete () |
| String | name () |
| Returns the name of the variable. More... | |
| void | setInteger (boolean integer) |
| Sets the integrality requirement of the variable. More... | |
| double | solutionValue () |
| Returns the value of the variable in the current solution. More... | |
| int | index () |
| Returns the index of the variable in the MPSolver::variables_. More... | |
| double | lb () |
| Returns the lower bound. More... | |
| double | ub () |
| Returns the upper bound. More... | |
| void | setLb (double lb) |
| Sets the lower bound. More... | |
| void | setUb (double ub) |
| Sets the upper bound. More... | |
| void | setBounds (double lb, double ub) |
| Sets both the lower and upper bounds. More... | |
| double | reducedCost () |
| Advanced usage: returns the reduced cost of the variable in the current solution (only available for continuous problems). More... | |
| MPSolver.BasisStatus | basisStatus () |
| Advanced usage: returns the basis status of the variable in the current solution (only available for continuous problems). More... | |
Protected Member Functions | |
| MPVariable (long cPtr, boolean cMemoryOwn) | |
Constructor & Destructor Documentation
◆ MPVariable()
|
inlineprotected |
Definition at line 20 of file MPVariable.java.
Member Function Documentation
◆ basisStatus()
|
inline |
Advanced usage: returns the basis status of the variable in the current
solution (only available for continuous problems).
Definition at line 123 of file MPVariable.java.
◆ delete()
|
inline |
Definition at line 34 of file MPVariable.java.
◆ index()
|
inline |
Returns the index of the variable in the MPSolver::variables_.
Definition at line 72 of file MPVariable.java.
◆ lb()
|
inline |
Returns the lower bound.
Definition at line 79 of file MPVariable.java.
◆ name()
|
inline |
Returns the name of the variable.
Definition at line 47 of file MPVariable.java.
◆ reducedCost()
|
inline |
Advanced usage: returns the reduced cost of the variable in the current
solution (only available for continuous problems).
Definition at line 115 of file MPVariable.java.
◆ setBounds()
|
inline |
Sets both the lower and upper bounds.
Definition at line 107 of file MPVariable.java.
◆ setInteger()
|
inline |
Sets the integrality requirement of the variable.
Definition at line 54 of file MPVariable.java.
◆ setLb()
|
inline |
Sets the lower bound.
Definition at line 93 of file MPVariable.java.
◆ setUb()
|
inline |
Sets the upper bound.
Definition at line 100 of file MPVariable.java.
◆ solutionValue()
|
inline |
Returns the value of the variable in the current solution.
If the variable is integer, then the value will always be an integer (the
underlying solver handles floating-point values only, but this function
automatically rounds it to the nearest integer; see: man 3 round).
Definition at line 65 of file MPVariable.java.
◆ ub()
|
inline |
Returns the upper bound.
Definition at line 86 of file MPVariable.java.
The documentation for this class was generated from the following file: