Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | MismatchedArrayLengths |
class | ModelBuilderException |
class | WrongLength |
Main modeling class.
Proposes a factory to create all modeling objects understood by the SAT solver.
Definition at line 24 of file ModelBuilder.java.
com.google.ortools.modelbuilder.ModelBuilder.ModelBuilder | ( | ) |
Main constructor
Definition at line 47 of file ModelBuilder.java.
com.google.ortools.modelbuilder.ModelBuilder.ModelBuilder | ( | ) |
Main constructor
Definition at line 47 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedEquality | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr == value
.
Definition at line 191 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedEquality | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr == value
.
Definition at line 191 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedEquality | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left == right
.
Definition at line 197 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedEquality | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left == right
.
Definition at line 197 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedGreaterOrEqual | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr >= value
.
Definition at line 221 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedGreaterOrEqual | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr >= value
.
Definition at line 221 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedGreaterOrEqual | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left >= right
.
Definition at line 227 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedGreaterOrEqual | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left >= right
.
Definition at line 227 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLessOrEqual | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr <= value
.
Definition at line 206 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLessOrEqual | ( | LinearArgument | expr, |
double | value, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => expr <= value
.
Definition at line 206 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLessOrEqual | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left <= right
.
Definition at line 212 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLessOrEqual | ( | LinearArgument | left, |
LinearArgument | right, | ||
Variable | iVar, | ||
boolean | iValue ) |
Adds ivar == iValue => left <= right
.
Definition at line 212 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLinearConstraint | ( | LinearArgument | expr, |
double | lb, | ||
double | ub, | ||
Variable | iVar, | ||
boolean | iValue ) |
Enforced Linear constraints.
Adds ivar == iValue => lb <= expr <= ub
.
Definition at line 167 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEnforcedLinearConstraint | ( | LinearArgument | expr, |
double | lb, | ||
double | ub, | ||
Variable | iVar, | ||
boolean | iValue ) |
Enforced Linear constraints.
Adds ivar == iValue => lb <= expr <= ub
.
Definition at line 167 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality | ( | LinearArgument | expr, |
double | value ) |
Adds expr == value
.
Definition at line 121 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality | ( | LinearArgument | expr, |
double | value ) |
Adds expr == value
.
Definition at line 121 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left == right
.
Definition at line 126 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left == right
.
Definition at line 126 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual | ( | LinearArgument | expr, |
double | value ) |
Adds expr >= value
.
Definition at line 147 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual | ( | LinearArgument | expr, |
double | value ) |
Adds expr >= value
.
Definition at line 147 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left >= right
.
Definition at line 152 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left >= right
.
Definition at line 152 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual | ( | LinearArgument | expr, |
double | value ) |
Adds expr <= value
.
Definition at line 134 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual | ( | LinearArgument | expr, |
double | value ) |
Adds expr <= value
.
Definition at line 134 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left <= right
.
Definition at line 139 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual | ( | LinearArgument | left, |
LinearArgument | right ) |
Adds left <= right
.
Definition at line 139 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLinearConstraint | ( | LinearArgument | expr, |
double | lb, | ||
double | ub ) |
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLinearConstraint | ( | LinearArgument | expr, |
double | lb, | ||
double | ub ) |
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.constraintFromIndex | ( | int | index | ) |
Rebuilds a linear constraint from its index.
Definition at line 160 of file ModelBuilder.java.
LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.constraintFromIndex | ( | int | index | ) |
Rebuilds a linear constraint from its index.
Definition at line 160 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.enforcedConstraintFromIndex | ( | int | index | ) |
Rebuilds a linear constraint from its index.
Definition at line 236 of file ModelBuilder.java.
EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.enforcedConstraintFromIndex | ( | int | index | ) |
Rebuilds a linear constraint from its index.
Definition at line 236 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.exportToFile | ( | String | file | ) |
Write the model as a protocol buffer to 'file'.
file | file to write the model to. If the filename ends with 'txt', the model will be written as a text file, otherwise, the binary format will be used. |
Definition at line 319 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.exportToFile | ( | String | file | ) |
Write the model as a protocol buffer to 'file'.
file | file to write the model to. If the filename ends with 'txt', the model will be written as a text file, otherwise, the binary format will be used. |
Definition at line 319 of file ModelBuilder.java.
String com.google.ortools.modelbuilder.ModelBuilder.exportToLpString | ( | boolean | obfuscate | ) |
Definition at line 337 of file ModelBuilder.java.
String com.google.ortools.modelbuilder.ModelBuilder.exportToLpString | ( | boolean | obfuscate | ) |
Definition at line 337 of file ModelBuilder.java.
String com.google.ortools.modelbuilder.ModelBuilder.exportToMpsString | ( | boolean | obfuscate | ) |
Definition at line 333 of file ModelBuilder.java.
String com.google.ortools.modelbuilder.ModelBuilder.exportToMpsString | ( | boolean | obfuscate | ) |
Definition at line 333 of file ModelBuilder.java.
ModelBuilder com.google.ortools.modelbuilder.ModelBuilder.getClone | ( | ) |
Returns a cloned model
Definition at line 53 of file ModelBuilder.java.
ModelBuilder com.google.ortools.modelbuilder.ModelBuilder.getClone | ( | ) |
Returns a cloned model
Definition at line 53 of file ModelBuilder.java.
ModelBuilderHelper com.google.ortools.modelbuilder.ModelBuilder.getHelper | ( | ) |
ModelBuilderHelper com.google.ortools.modelbuilder.ModelBuilder.getHelper | ( | ) |
String com.google.ortools.modelbuilder.ModelBuilder.getName | ( | ) |
Returns the name of the model.
Definition at line 303 of file ModelBuilder.java.
String com.google.ortools.modelbuilder.ModelBuilder.getName | ( | ) |
Returns the name of the model.
Definition at line 303 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromFile | ( | String | file | ) |
import the model from protocol buffer 'file'.
file | file to read the model from. |
Definition at line 329 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromFile | ( | String | file | ) |
import the model from protocol buffer 'file'.
file | file to read the model from. |
Definition at line 329 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpFile | ( | String | lpFile | ) |
Definition at line 357 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpFile | ( | String | lpFile | ) |
Definition at line 357 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpString | ( | String | lpString | ) |
Definition at line 353 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpString | ( | String | lpString | ) |
Definition at line 353 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsFile | ( | String | mpsFile | ) |
Definition at line 349 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsFile | ( | String | mpsFile | ) |
Definition at line 349 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsString | ( | String | mpsString | ) |
Definition at line 345 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsString | ( | String | mpsString | ) |
Definition at line 345 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.maximize | ( | LinearArgument | obj | ) |
Minimize expression
Definition at line 246 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.maximize | ( | LinearArgument | obj | ) |
Minimize expression
Definition at line 246 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.minimize | ( | LinearArgument | obj | ) |
Minimize expression
Definition at line 241 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.minimize | ( | LinearArgument | obj | ) |
Minimize expression
Definition at line 241 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newBoolVar | ( | String | name | ) |
Creates a Boolean variable with the given name.
Definition at line 78 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newBoolVar | ( | String | name | ) |
Creates a Boolean variable with the given name.
Definition at line 78 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newConstant | ( | double | value | ) |
Creates a constant variable.
Definition at line 83 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newConstant | ( | double | value | ) |
Creates a constant variable.
Definition at line 83 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newIntVar | ( | double | lb, |
double | ub, | ||
String | name ) |
Creates an integer variable with domain [lb, ub].
Definition at line 73 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newIntVar | ( | double | lb, |
double | ub, | ||
String | name ) |
Creates an integer variable with domain [lb, ub].
Definition at line 73 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newNumVar | ( | double | lb, |
double | ub, | ||
String | name ) |
Creates a continuous variable with domain [lb, ub].
Definition at line 68 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newNumVar | ( | double | lb, |
double | ub, | ||
String | name ) |
Creates a continuous variable with domain [lb, ub].
Definition at line 68 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newVar | ( | double | lb, |
double | ub, | ||
boolean | isIntegral, | ||
String | name ) |
Integer variables.
Creates a variable with domain [lb, ub].
Definition at line 63 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.newVar | ( | double | lb, |
double | ub, | ||
boolean | isIntegral, | ||
String | name ) |
Integer variables.
Creates a variable with domain [lb, ub].
Definition at line 63 of file ModelBuilder.java.
int com.google.ortools.modelbuilder.ModelBuilder.numConstraints | ( | ) |
Returns the number of constraints in the model.
Definition at line 298 of file ModelBuilder.java.
int com.google.ortools.modelbuilder.ModelBuilder.numConstraints | ( | ) |
Returns the number of constraints in the model.
Definition at line 298 of file ModelBuilder.java.
int com.google.ortools.modelbuilder.ModelBuilder.numVariables | ( | ) |
Model getters, import, export.
Returns the number of variables in the model.
Definition at line 293 of file ModelBuilder.java.
int com.google.ortools.modelbuilder.ModelBuilder.numVariables | ( | ) |
Model getters, import, export.
Returns the number of variables in the model.
Definition at line 293 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.optimize | ( | LinearArgument | obj, |
boolean | maximize ) |
Sets the objective expression.
Definition at line 251 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.optimize | ( | LinearArgument | obj, |
boolean | maximize ) |
Sets the objective expression.
Definition at line 251 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.setName | ( | String | name | ) |
Sets the name of the model.
Definition at line 308 of file ModelBuilder.java.
void com.google.ortools.modelbuilder.ModelBuilder.setName | ( | String | name | ) |
Sets the name of the model.
Definition at line 308 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.varFromIndex | ( | int | index | ) |
Rebuilds a variable from its index.
Definition at line 93 of file ModelBuilder.java.
Variable com.google.ortools.modelbuilder.ModelBuilder.varFromIndex | ( | int | index | ) |
Rebuilds a variable from its index.
Definition at line 93 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.writeToMpsFile | ( | String | filename, |
boolean | obfuscate ) |
Definition at line 341 of file ModelBuilder.java.
boolean com.google.ortools.modelbuilder.ModelBuilder.writeToMpsFile | ( | String | filename, |
boolean | obfuscate ) |
Definition at line 341 of file ModelBuilder.java.