public class MPVariable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
swigCMemOwn |
Modifier | Constructor and Description |
---|---|
protected |
MPVariable(long cPtr,
boolean cMemoryOwn) |
Modifier and Type | Method and Description |
---|---|
MPSolver.BasisStatus |
basisStatus()
Advanced usage: returns the basis status of the variable in the current
solution (only available for continuous problems). |
void |
delete() |
protected void |
finalize() |
protected static long |
getCPtr(MPVariable obj) |
int |
index()
Returns the index of the variable in the MPSolver::variables_.
|
double |
lb()
Returns the lower bound.
|
java.lang.String |
name()
Returns the name of the variable.
|
double |
reducedCost()
Advanced usage: returns the reduced cost of the variable in the current
solution (only available for continuous problems). |
void |
setBounds(double lb,
double ub)
Sets both the lower and upper bounds.
|
void |
setInteger(boolean integer)
Sets the integrality requirement of the variable.
|
void |
setLb(double lb)
Sets the lower bound.
|
void |
setUb(double ub)
Sets the upper bound.
|
double |
solutionValue()
Returns the value of the variable in the current solution.
|
protected static long |
swigRelease(MPVariable obj) |
double |
ub()
Returns the upper bound.
|
protected static long getCPtr(MPVariable obj)
protected static long swigRelease(MPVariable obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public java.lang.String name()
public void setInteger(boolean integer)
public double solutionValue()
public int index()
public double lb()
public double ub()
public void setLb(double lb)
public void setUb(double ub)
public void setBounds(double lb, double ub)
public double reducedCost()
public MPSolver.BasisStatus basisStatus()
MPSolver#BasisStatus.
Copyright © 2025. All rights reserved.