public class Variable extends java.lang.Object implements LinearArgument
Modifier and Type | Field and Description |
---|---|
protected ModelBuilderHelper |
helper |
protected int |
index |
Modifier and Type | Method and Description |
---|---|
LinearExpr |
build()
Builds a linear expression.
|
int |
getIndex()
Returns the index of the variable in the underlying ModelBuilderHelper.
|
boolean |
getIntegrality()
Returns whether the variable is integral.
|
double |
getLowerBound()
Returns the lower bound of the variable.
|
java.lang.String |
getName()
Returns the name of the variable given upon creation.
|
double |
getObjectiveCoefficient()
Returns the objective coefficient of the variable.
|
double |
getUpperBound()
Returns the upper bound of the variable.
|
void |
setIntegrality(boolean isIntegral)
Sets the integrality of the variable.
|
void |
setLowerBound(double lowerBound)
Sets the lower bound of the variable.
|
void |
setName(java.lang.String name) |
void |
setObjectiveCoefficient(double objectiveCoefficient)
Sets the objective coefficient of the variable in the objective.
|
void |
setUpperBound(double upperBound)
Sets the upper bound of the variable.
|
java.lang.String |
toString() |
protected final ModelBuilderHelper helper
protected final int index
public int getIndex()
public LinearExpr build()
LinearArgument
build
in interface LinearArgument
public double getLowerBound()
public void setLowerBound(double lowerBound)
public double getUpperBound()
public void setUpperBound(double upperBound)
public boolean getIntegrality()
public void setIntegrality(boolean isIntegral)
public double getObjectiveCoefficient()
public void setObjectiveCoefficient(double objectiveCoefficient)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2025. All rights reserved.