| Package | Description |
|---|---|
| com.google.ortools.modelbuilder |
| Modifier and Type | Method and Description |
|---|---|
Variable |
EnforcedLinearConstraint.getIndicatorVariable()
Returns the indicator variable of the constraint/
|
Variable |
ModelBuilder.newBoolVar(java.lang.String name)
Creates a Boolean variable with the given name.
|
Variable |
ModelBuilder.newConstant(double value)
Creates a constant variable.
|
Variable |
ModelBuilder.newIntVar(double lb,
double ub,
java.lang.String name)
Creates an integer variable with domain [lb, ub].
|
Variable |
ModelBuilder.newNumVar(double lb,
double ub,
java.lang.String name)
Creates a continuous variable with domain [lb, ub].
|
Variable |
ModelBuilder.newVar(double lb,
double ub,
boolean isIntegral,
java.lang.String name)
Creates a variable with domain [lb, ub].
|
Variable |
ModelBuilder.varFromIndex(int index)
Rebuilds a variable from its index.
|
| Modifier and Type | Method and Description |
|---|---|
EnforcedLinearConstraint |
ModelBuilder.addEnforcedEquality(LinearArgument expr,
double value,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => expr == value. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedEquality(LinearArgument left,
LinearArgument right,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => left == right. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedGreaterOrEqual(LinearArgument expr,
double value,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => expr >= value. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedGreaterOrEqual(LinearArgument left,
LinearArgument right,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => left >= right. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedLessOrEqual(LinearArgument expr,
double value,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => expr <= value. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedLessOrEqual(LinearArgument left,
LinearArgument right,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => left <= right. |
EnforcedLinearConstraint |
ModelBuilder.addEnforcedLinearConstraint(LinearArgument expr,
double lb,
double ub,
Variable iVar,
boolean iValue)
Adds
ivar == iValue => lb <= expr <= ub. |
void |
LinearConstraint.addTerm(Variable v,
double coeff)
Adds var * coeff to the constraint.
|
void |
EnforcedLinearConstraint.addTerm(Variable v,
double coeff)
Adds var * coeff to the constraint.
|
double |
ModelSolver.getReducedCost(Variable var)
Checks that the solver has found a solution, and returns the reduced cost of the given
variable.
|
double |
ModelSolver.getValue(Variable var)
Checks that the solver has found a solution, and returns the value of the given variable.
|
void |
LinearConstraint.setCoefficient(Variable v,
double coeff)
Sets the coefficient of v to coeff, adding or removing a term if needed.
|
void |
EnforcedLinearConstraint.setCoefficient(Variable v,
double coeff)
Sets the coefficient of v to coeff, adding or removing a term if needed.
|
void |
EnforcedLinearConstraint.setIndicatorVariable(Variable v)
Sets the indicator variable of the constraint.
|
Copyright © 2024. All rights reserved.