Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.modelbuilder.ModelBuilder Class Reference

Classes

class  MismatchedArrayLengths
 
class  ModelBuilderException
 
class  WrongLength
 

Public Member Functions

 ModelBuilder ()
 
ModelBuilder getClone ()
 
Variable newVar (double lb, double ub, boolean isIntegral, String name)
 Integer variables.
 
Variable newNumVar (double lb, double ub, String name)
 
Variable newIntVar (double lb, double ub, String name)
 
Variable newBoolVar (String name)
 
Variable newConstant (double value)
 
Variable varFromIndex (int index)
 
LinearConstraint addLinearConstraint (LinearArgument expr, double lb, double ub)
 Linear constraints.
 
LinearConstraint addEquality (LinearArgument expr, double value)
 
LinearConstraint addEquality (LinearArgument left, LinearArgument right)
 
LinearConstraint addLessOrEqual (LinearArgument expr, double value)
 
LinearConstraint addLessOrEqual (LinearArgument left, LinearArgument right)
 
LinearConstraint addGreaterOrEqual (LinearArgument expr, double value)
 
LinearConstraint addGreaterOrEqual (LinearArgument left, LinearArgument right)
 
LinearConstraint constraintFromIndex (int index)
 
EnforcedLinearConstraint addEnforcedLinearConstraint (LinearArgument expr, double lb, double ub, Variable iVar, boolean iValue)
 Enforced Linear constraints.
 
EnforcedLinearConstraint addEnforcedEquality (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedEquality (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedLessOrEqual (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedLessOrEqual (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedGreaterOrEqual (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedGreaterOrEqual (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint enforcedConstraintFromIndex (int index)
 
void minimize (LinearArgument obj)
 
void maximize (LinearArgument obj)
 
void optimize (LinearArgument obj, boolean maximize)
 
int numVariables ()
 Model getters, import, export.
 
int numConstraints ()
 
String getName ()
 
void setName (String name)
 
boolean exportToFile (String file)
 
boolean importFromFile (String file)
 
String exportToMpsString (boolean obfuscate)
 
String exportToLpString (boolean obfuscate)
 
boolean writeToMpsFile (String filename, boolean obfuscate)
 
boolean importFromMpsString (String mpsString)
 
boolean importFromMpsFile (String mpsFile)
 
boolean importFromLpString (String lpString)
 
boolean importFromLpFile (String lpFile)
 
ModelBuilderHelper getHelper ()
 Getters.
 
 ModelBuilder ()
 
ModelBuilder getClone ()
 
Variable newVar (double lb, double ub, boolean isIntegral, String name)
 Integer variables.
 
Variable newNumVar (double lb, double ub, String name)
 
Variable newIntVar (double lb, double ub, String name)
 
Variable newBoolVar (String name)
 
Variable newConstant (double value)
 
Variable varFromIndex (int index)
 
LinearConstraint addLinearConstraint (LinearArgument expr, double lb, double ub)
 Linear constraints.
 
LinearConstraint addEquality (LinearArgument expr, double value)
 
LinearConstraint addEquality (LinearArgument left, LinearArgument right)
 
LinearConstraint addLessOrEqual (LinearArgument expr, double value)
 
LinearConstraint addLessOrEqual (LinearArgument left, LinearArgument right)
 
LinearConstraint addGreaterOrEqual (LinearArgument expr, double value)
 
LinearConstraint addGreaterOrEqual (LinearArgument left, LinearArgument right)
 
LinearConstraint constraintFromIndex (int index)
 
EnforcedLinearConstraint addEnforcedLinearConstraint (LinearArgument expr, double lb, double ub, Variable iVar, boolean iValue)
 Enforced Linear constraints.
 
EnforcedLinearConstraint addEnforcedEquality (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedEquality (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedLessOrEqual (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedLessOrEqual (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedGreaterOrEqual (LinearArgument expr, double value, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint addEnforcedGreaterOrEqual (LinearArgument left, LinearArgument right, Variable iVar, boolean iValue)
 
EnforcedLinearConstraint enforcedConstraintFromIndex (int index)
 
void minimize (LinearArgument obj)
 
void maximize (LinearArgument obj)
 
void optimize (LinearArgument obj, boolean maximize)
 
int numVariables ()
 Model getters, import, export.
 
int numConstraints ()
 
String getName ()
 
void setName (String name)
 
boolean exportToFile (String file)
 
boolean importFromFile (String file)
 
String exportToMpsString (boolean obfuscate)
 
String exportToLpString (boolean obfuscate)
 
boolean writeToMpsFile (String filename, boolean obfuscate)
 
boolean importFromMpsString (String mpsString)
 
boolean importFromMpsFile (String mpsFile)
 
boolean importFromLpString (String lpString)
 
boolean importFromLpFile (String lpFile)
 
ModelBuilderHelper getHelper ()
 Getters.
 

Detailed Description

Main modeling class.

Proposes a factory to create all modeling objects understood by the SAT solver.

Definition at line 24 of file ModelBuilder.java.

Constructor & Destructor Documentation

◆ ModelBuilder() [1/2]

com.google.ortools.modelbuilder.ModelBuilder.ModelBuilder ( )

Main constructor

Definition at line 47 of file ModelBuilder.java.

◆ ModelBuilder() [2/2]

com.google.ortools.modelbuilder.ModelBuilder.ModelBuilder ( )

Main constructor

Definition at line 47 of file ModelBuilder.java.

Member Function Documentation

◆ addEnforcedEquality() [1/4]

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.

◆ addEnforcedEquality() [2/4]

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.

◆ addEnforcedEquality() [3/4]

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.

◆ addEnforcedEquality() [4/4]

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.

◆ addEnforcedGreaterOrEqual() [1/4]

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.

◆ addEnforcedGreaterOrEqual() [2/4]

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.

◆ addEnforcedGreaterOrEqual() [3/4]

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.

◆ addEnforcedGreaterOrEqual() [4/4]

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.

◆ addEnforcedLessOrEqual() [1/4]

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.

◆ addEnforcedLessOrEqual() [2/4]

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.

◆ addEnforcedLessOrEqual() [3/4]

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.

◆ addEnforcedLessOrEqual() [4/4]

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.

◆ addEnforcedLinearConstraint() [1/2]

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.

◆ addEnforcedLinearConstraint() [2/2]

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.

◆ addEquality() [1/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality ( LinearArgument expr,
double value )

Adds expr == value.

Definition at line 121 of file ModelBuilder.java.

◆ addEquality() [2/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality ( LinearArgument expr,
double value )

Adds expr == value.

Definition at line 121 of file ModelBuilder.java.

◆ addEquality() [3/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality ( LinearArgument left,
LinearArgument right )

Adds left == right.

Definition at line 126 of file ModelBuilder.java.

◆ addEquality() [4/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addEquality ( LinearArgument left,
LinearArgument right )

Adds left == right.

Definition at line 126 of file ModelBuilder.java.

◆ addGreaterOrEqual() [1/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual ( LinearArgument expr,
double value )

Adds expr >= value.

Definition at line 147 of file ModelBuilder.java.

◆ addGreaterOrEqual() [2/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual ( LinearArgument expr,
double value )

Adds expr >= value.

Definition at line 147 of file ModelBuilder.java.

◆ addGreaterOrEqual() [3/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual ( LinearArgument left,
LinearArgument right )

Adds left >= right.

Definition at line 152 of file ModelBuilder.java.

◆ addGreaterOrEqual() [4/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addGreaterOrEqual ( LinearArgument left,
LinearArgument right )

Adds left >= right.

Definition at line 152 of file ModelBuilder.java.

◆ addLessOrEqual() [1/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual ( LinearArgument expr,
double value )

Adds expr <= value.

Definition at line 134 of file ModelBuilder.java.

◆ addLessOrEqual() [2/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual ( LinearArgument expr,
double value )

Adds expr <= value.

Definition at line 134 of file ModelBuilder.java.

◆ addLessOrEqual() [3/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual ( LinearArgument left,
LinearArgument right )

Adds left <= right.

Definition at line 139 of file ModelBuilder.java.

◆ addLessOrEqual() [4/4]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLessOrEqual ( LinearArgument left,
LinearArgument right )

Adds left <= right.

Definition at line 139 of file ModelBuilder.java.

◆ addLinearConstraint() [1/2]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLinearConstraint ( LinearArgument expr,
double lb,
double ub )

Linear constraints.

Adds lb <= expr <= ub.

Definition at line 100 of file ModelBuilder.java.

◆ addLinearConstraint() [2/2]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.addLinearConstraint ( LinearArgument expr,
double lb,
double ub )

Linear constraints.

Adds lb <= expr <= ub.

Definition at line 100 of file ModelBuilder.java.

◆ constraintFromIndex() [1/2]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.constraintFromIndex ( int index)

Rebuilds a linear constraint from its index.

Definition at line 160 of file ModelBuilder.java.

◆ constraintFromIndex() [2/2]

LinearConstraint com.google.ortools.modelbuilder.ModelBuilder.constraintFromIndex ( int index)

Rebuilds a linear constraint from its index.

Definition at line 160 of file ModelBuilder.java.

◆ enforcedConstraintFromIndex() [1/2]

EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.enforcedConstraintFromIndex ( int index)

Rebuilds a linear constraint from its index.

Definition at line 236 of file ModelBuilder.java.

◆ enforcedConstraintFromIndex() [2/2]

EnforcedLinearConstraint com.google.ortools.modelbuilder.ModelBuilder.enforcedConstraintFromIndex ( int index)

Rebuilds a linear constraint from its index.

Definition at line 236 of file ModelBuilder.java.

◆ exportToFile() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.exportToFile ( String file)

Write the model as a protocol buffer to 'file'.

Parameters
filefile 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.
Returns
true if the model was correctly written.

Definition at line 319 of file ModelBuilder.java.

◆ exportToFile() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.exportToFile ( String file)

Write the model as a protocol buffer to 'file'.

Parameters
filefile 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.
Returns
true if the model was correctly written.

Definition at line 319 of file ModelBuilder.java.

◆ exportToLpString() [1/2]

String com.google.ortools.modelbuilder.ModelBuilder.exportToLpString ( boolean obfuscate)

Definition at line 337 of file ModelBuilder.java.

◆ exportToLpString() [2/2]

String com.google.ortools.modelbuilder.ModelBuilder.exportToLpString ( boolean obfuscate)

Definition at line 337 of file ModelBuilder.java.

◆ exportToMpsString() [1/2]

String com.google.ortools.modelbuilder.ModelBuilder.exportToMpsString ( boolean obfuscate)

Definition at line 333 of file ModelBuilder.java.

◆ exportToMpsString() [2/2]

String com.google.ortools.modelbuilder.ModelBuilder.exportToMpsString ( boolean obfuscate)

Definition at line 333 of file ModelBuilder.java.

◆ getClone() [1/2]

ModelBuilder com.google.ortools.modelbuilder.ModelBuilder.getClone ( )

Returns a cloned model

Definition at line 53 of file ModelBuilder.java.

◆ getClone() [2/2]

ModelBuilder com.google.ortools.modelbuilder.ModelBuilder.getClone ( )

Returns a cloned model

Definition at line 53 of file ModelBuilder.java.

◆ getHelper() [1/2]

ModelBuilderHelper com.google.ortools.modelbuilder.ModelBuilder.getHelper ( )

Getters.

Returns the model builder helper.

Definition at line 363 of file ModelBuilder.java.

◆ getHelper() [2/2]

ModelBuilderHelper com.google.ortools.modelbuilder.ModelBuilder.getHelper ( )

Getters.

Returns the model builder helper.

Definition at line 363 of file ModelBuilder.java.

◆ getName() [1/2]

String com.google.ortools.modelbuilder.ModelBuilder.getName ( )

Returns the name of the model.

Definition at line 303 of file ModelBuilder.java.

◆ getName() [2/2]

String com.google.ortools.modelbuilder.ModelBuilder.getName ( )

Returns the name of the model.

Definition at line 303 of file ModelBuilder.java.

◆ importFromFile() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromFile ( String file)

import the model from protocol buffer 'file'.

Parameters
filefile to read the model from.
Returns
true if the model was correctly loaded.

Definition at line 329 of file ModelBuilder.java.

◆ importFromFile() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromFile ( String file)

import the model from protocol buffer 'file'.

Parameters
filefile to read the model from.
Returns
true if the model was correctly loaded.

Definition at line 329 of file ModelBuilder.java.

◆ importFromLpFile() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpFile ( String lpFile)

Definition at line 357 of file ModelBuilder.java.

◆ importFromLpFile() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpFile ( String lpFile)

Definition at line 357 of file ModelBuilder.java.

◆ importFromLpString() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpString ( String lpString)

Definition at line 353 of file ModelBuilder.java.

◆ importFromLpString() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromLpString ( String lpString)

Definition at line 353 of file ModelBuilder.java.

◆ importFromMpsFile() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsFile ( String mpsFile)

Definition at line 349 of file ModelBuilder.java.

◆ importFromMpsFile() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsFile ( String mpsFile)

Definition at line 349 of file ModelBuilder.java.

◆ importFromMpsString() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsString ( String mpsString)

Definition at line 345 of file ModelBuilder.java.

◆ importFromMpsString() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.importFromMpsString ( String mpsString)

Definition at line 345 of file ModelBuilder.java.

◆ maximize() [1/2]

void com.google.ortools.modelbuilder.ModelBuilder.maximize ( LinearArgument obj)

Minimize expression

Definition at line 246 of file ModelBuilder.java.

◆ maximize() [2/2]

void com.google.ortools.modelbuilder.ModelBuilder.maximize ( LinearArgument obj)

Minimize expression

Definition at line 246 of file ModelBuilder.java.

◆ minimize() [1/2]

void com.google.ortools.modelbuilder.ModelBuilder.minimize ( LinearArgument obj)

Minimize expression

Definition at line 241 of file ModelBuilder.java.

◆ minimize() [2/2]

void com.google.ortools.modelbuilder.ModelBuilder.minimize ( LinearArgument obj)

Minimize expression

Definition at line 241 of file ModelBuilder.java.

◆ newBoolVar() [1/2]

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.

◆ newBoolVar() [2/2]

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.

◆ newConstant() [1/2]

Variable com.google.ortools.modelbuilder.ModelBuilder.newConstant ( double value)

Creates a constant variable.

Definition at line 83 of file ModelBuilder.java.

◆ newConstant() [2/2]

Variable com.google.ortools.modelbuilder.ModelBuilder.newConstant ( double value)

Creates a constant variable.

Definition at line 83 of file ModelBuilder.java.

◆ newIntVar() [1/2]

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.

◆ newIntVar() [2/2]

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.

◆ newNumVar() [1/2]

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.

◆ newNumVar() [2/2]

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.

◆ newVar() [1/2]

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.

◆ newVar() [2/2]

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.

◆ numConstraints() [1/2]

int com.google.ortools.modelbuilder.ModelBuilder.numConstraints ( )

Returns the number of constraints in the model.

Definition at line 298 of file ModelBuilder.java.

◆ numConstraints() [2/2]

int com.google.ortools.modelbuilder.ModelBuilder.numConstraints ( )

Returns the number of constraints in the model.

Definition at line 298 of file ModelBuilder.java.

◆ numVariables() [1/2]

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.

◆ numVariables() [2/2]

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.

◆ optimize() [1/2]

void com.google.ortools.modelbuilder.ModelBuilder.optimize ( LinearArgument obj,
boolean maximize )

Sets the objective expression.

Definition at line 251 of file ModelBuilder.java.

◆ optimize() [2/2]

void com.google.ortools.modelbuilder.ModelBuilder.optimize ( LinearArgument obj,
boolean maximize )

Sets the objective expression.

Definition at line 251 of file ModelBuilder.java.

◆ setName() [1/2]

void com.google.ortools.modelbuilder.ModelBuilder.setName ( String name)

Sets the name of the model.

Definition at line 308 of file ModelBuilder.java.

◆ setName() [2/2]

void com.google.ortools.modelbuilder.ModelBuilder.setName ( String name)

Sets the name of the model.

Definition at line 308 of file ModelBuilder.java.

◆ varFromIndex() [1/2]

Variable com.google.ortools.modelbuilder.ModelBuilder.varFromIndex ( int index)

Rebuilds a variable from its index.

Definition at line 93 of file ModelBuilder.java.

◆ varFromIndex() [2/2]

Variable com.google.ortools.modelbuilder.ModelBuilder.varFromIndex ( int index)

Rebuilds a variable from its index.

Definition at line 93 of file ModelBuilder.java.

◆ writeToMpsFile() [1/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.writeToMpsFile ( String filename,
boolean obfuscate )

Definition at line 341 of file ModelBuilder.java.

◆ writeToMpsFile() [2/2]

boolean com.google.ortools.modelbuilder.ModelBuilder.writeToMpsFile ( String filename,
boolean obfuscate )

Definition at line 341 of file ModelBuilder.java.


The documentation for this class was generated from the following files: