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

Public Member Functions

synchronized void delete ()
 
void overwriteModel (ModelBuilderHelper other_helper)
 
boolean readModelFromProtoFile (String filename)
 
boolean writeModelToProtoFile (String filename)
 
boolean importFromMpsString (String mps_string)
 
boolean importFromMpsFile (String mps_file)
 
boolean importFromLpString (String lp_string)
 
boolean importFromLpFile (String lp_file)
 
int addVar ()
 
void setVarLowerBound (int var_index, double lb)
 
void setVarUpperBound (int var_index, double ub)
 
void setVarIntegrality (int var_index, boolean is_integer)
 
void setVarObjectiveCoefficient (int var_index, double coeff)
 
void setVarName (int var_index, String name)
 
double getVarLowerBound (int var_index)
 
double getVarUpperBound (int var_index)
 
boolean getVarIntegrality (int var_index)
 
double getVarObjectiveCoefficient (int var_index)
 
String getVarName (int var_index)
 
double getConstraintLowerBound (int ct_index)
 
double getConstraintUpperBound (int ct_index)
 
int addLinearConstraint ()
 
String getConstraintName (int ct_index)
 
double[] getConstraintCoefficients (int ct_index)
 
int[] getConstraintVarIndices (int ct_index)
 
void addConstraintTerm (int ct_index, int var_index, double coeff)
 
void clearConstraintTerms (int ct_index)
 
void safeAddConstraintTerm (int ct_index, int var_index, double coeff)
 
void setConstraintCoefficient (int ct_index, int var_index, double coeff)
 
void setConstraintLowerBound (int ct_index, double lb)
 
void setConstraintName (int ct_index, String name)
 
void setConstraintUpperBound (int ct_index, double ub)
 
boolean getEnforcedIndicatorValue (int ct_index)
 
boolean isEnforcedConstraint (int ct_index)
 
double getEnforcedConstraintLowerBound (int ct_index)
 
double getEnforcedConstraintUpperBound (int ct_index)
 
int addEnforcedLinearConstraint ()
 
int getEnforcedIndicatorVariableIndex (int ct_index)
 
String getEnforcedConstraintName (int ct_index)
 
double[] getEnforcedConstraintCoefficients (int ct_index)
 
int[] getEnforcedConstraintVarIndices (int ct_index)
 
void addEnforcedConstraintTerm (int ct_index, int var_index, double coeff)
 
void clearEnforcedConstraintTerms (int ct_index)
 
void safeAddEnforcedConstraintTerm (int ct_index, int var_index, double coeff)
 
void setEnforcedConstraintCoefficient (int ct_index, int var_index, double coeff)
 
void setEnforcedConstraintLowerBound (int ct_index, double lb)
 
void setEnforcedConstraintName (int ct_index, String name)
 
void setEnforcedConstraintUpperBound (int ct_index, double ub)
 
void setEnforcedIndicatorValue (int ct_index, boolean positive)
 
void setEnforcedIndicatorVariableIndex (int ct_index, int var_index)
 
int numConstraints ()
 
int numVariables ()
 
String getName ()
 
void setName (String name)
 
void clearObjective ()
 
boolean getMaximize ()
 
void setMaximize (boolean maximize)
 
double getObjectiveOffset ()
 
void setObjectiveOffset (double offset)
 
void clearHints ()
 
void addHint (int var_index, double var_value)
 
String exportToMpsString (boolean obfuscate)
 
String exportToLpString (boolean obfuscate)
 
boolean writeToMpsFile (String filename, boolean obfuscate)
 
 ModelBuilderHelper ()
 

Protected Member Functions

 ModelBuilderHelper (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (ModelBuilderHelper obj)
 
static long swigRelease (ModelBuilderHelper obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Definition at line 11 of file ModelBuilderHelper.java.

Constructor & Destructor Documentation

◆ ModelBuilderHelper() [1/2]

com.google.ortools.modelbuilder.ModelBuilderHelper.ModelBuilderHelper ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 15 of file ModelBuilderHelper.java.

◆ ModelBuilderHelper() [2/2]

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

Definition at line 303 of file ModelBuilderHelper.java.

Member Function Documentation

◆ addConstraintTerm()

void com.google.ortools.modelbuilder.ModelBuilderHelper.addConstraintTerm ( int ct_index,
int var_index,
double coeff )

Definition at line 147 of file ModelBuilderHelper.java.

◆ addEnforcedConstraintTerm()

void com.google.ortools.modelbuilder.ModelBuilderHelper.addEnforcedConstraintTerm ( int ct_index,
int var_index,
double coeff )

Definition at line 211 of file ModelBuilderHelper.java.

◆ addEnforcedLinearConstraint()

int com.google.ortools.modelbuilder.ModelBuilderHelper.addEnforcedLinearConstraint ( )

Definition at line 191 of file ModelBuilderHelper.java.

◆ addHint()

void com.google.ortools.modelbuilder.ModelBuilderHelper.addHint ( int var_index,
double var_value )

Definition at line 287 of file ModelBuilderHelper.java.

◆ addLinearConstraint()

int com.google.ortools.modelbuilder.ModelBuilderHelper.addLinearConstraint ( )

Definition at line 131 of file ModelBuilderHelper.java.

◆ addVar()

int com.google.ortools.modelbuilder.ModelBuilderHelper.addVar ( )

Definition at line 79 of file ModelBuilderHelper.java.

◆ clearConstraintTerms()

void com.google.ortools.modelbuilder.ModelBuilderHelper.clearConstraintTerms ( int ct_index)

Definition at line 151 of file ModelBuilderHelper.java.

◆ clearEnforcedConstraintTerms()

void com.google.ortools.modelbuilder.ModelBuilderHelper.clearEnforcedConstraintTerms ( int ct_index)

Definition at line 215 of file ModelBuilderHelper.java.

◆ clearHints()

void com.google.ortools.modelbuilder.ModelBuilderHelper.clearHints ( )

Definition at line 283 of file ModelBuilderHelper.java.

◆ clearObjective()

void com.google.ortools.modelbuilder.ModelBuilderHelper.clearObjective ( )

Definition at line 263 of file ModelBuilderHelper.java.

◆ delete()

synchronized void com.google.ortools.modelbuilder.ModelBuilderHelper.delete ( )

Definition at line 41 of file ModelBuilderHelper.java.

◆ exportToLpString()

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

Definition at line 295 of file ModelBuilderHelper.java.

◆ exportToMpsString()

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

Definition at line 291 of file ModelBuilderHelper.java.

◆ finalize()

void com.google.ortools.modelbuilder.ModelBuilderHelper.finalize ( )
protected

Definition at line 37 of file ModelBuilderHelper.java.

◆ getConstraintCoefficients()

double[] com.google.ortools.modelbuilder.ModelBuilderHelper.getConstraintCoefficients ( int ct_index)

Definition at line 139 of file ModelBuilderHelper.java.

◆ getConstraintLowerBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getConstraintLowerBound ( int ct_index)

Definition at line 123 of file ModelBuilderHelper.java.

◆ getConstraintName()

String com.google.ortools.modelbuilder.ModelBuilderHelper.getConstraintName ( int ct_index)

Definition at line 135 of file ModelBuilderHelper.java.

◆ getConstraintUpperBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getConstraintUpperBound ( int ct_index)

Definition at line 127 of file ModelBuilderHelper.java.

◆ getConstraintVarIndices()

int[] com.google.ortools.modelbuilder.ModelBuilderHelper.getConstraintVarIndices ( int ct_index)

Definition at line 143 of file ModelBuilderHelper.java.

◆ getCPtr()

static long com.google.ortools.modelbuilder.ModelBuilderHelper.getCPtr ( ModelBuilderHelper obj)
staticprotected

Definition at line 20 of file ModelBuilderHelper.java.

◆ getEnforcedConstraintCoefficients()

double[] com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedConstraintCoefficients ( int ct_index)

Definition at line 203 of file ModelBuilderHelper.java.

◆ getEnforcedConstraintLowerBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedConstraintLowerBound ( int ct_index)

Definition at line 183 of file ModelBuilderHelper.java.

◆ getEnforcedConstraintName()

String com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedConstraintName ( int ct_index)

Definition at line 199 of file ModelBuilderHelper.java.

◆ getEnforcedConstraintUpperBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedConstraintUpperBound ( int ct_index)

Definition at line 187 of file ModelBuilderHelper.java.

◆ getEnforcedConstraintVarIndices()

int[] com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedConstraintVarIndices ( int ct_index)

Definition at line 207 of file ModelBuilderHelper.java.

◆ getEnforcedIndicatorValue()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedIndicatorValue ( int ct_index)

Definition at line 175 of file ModelBuilderHelper.java.

◆ getEnforcedIndicatorVariableIndex()

int com.google.ortools.modelbuilder.ModelBuilderHelper.getEnforcedIndicatorVariableIndex ( int ct_index)

Definition at line 195 of file ModelBuilderHelper.java.

◆ getMaximize()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.getMaximize ( )

Definition at line 267 of file ModelBuilderHelper.java.

◆ getName()

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

Definition at line 255 of file ModelBuilderHelper.java.

◆ getObjectiveOffset()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getObjectiveOffset ( )

Definition at line 275 of file ModelBuilderHelper.java.

◆ getVarIntegrality()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.getVarIntegrality ( int var_index)

Definition at line 111 of file ModelBuilderHelper.java.

◆ getVarLowerBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getVarLowerBound ( int var_index)

Definition at line 103 of file ModelBuilderHelper.java.

◆ getVarName()

String com.google.ortools.modelbuilder.ModelBuilderHelper.getVarName ( int var_index)

Definition at line 119 of file ModelBuilderHelper.java.

◆ getVarObjectiveCoefficient()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getVarObjectiveCoefficient ( int var_index)

Definition at line 115 of file ModelBuilderHelper.java.

◆ getVarUpperBound()

double com.google.ortools.modelbuilder.ModelBuilderHelper.getVarUpperBound ( int var_index)

Definition at line 107 of file ModelBuilderHelper.java.

◆ importFromLpFile()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.importFromLpFile ( String lp_file)

Definition at line 75 of file ModelBuilderHelper.java.

◆ importFromLpString()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.importFromLpString ( String lp_string)

Definition at line 71 of file ModelBuilderHelper.java.

◆ importFromMpsFile()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.importFromMpsFile ( String mps_file)

Definition at line 67 of file ModelBuilderHelper.java.

◆ importFromMpsString()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.importFromMpsString ( String mps_string)

Definition at line 63 of file ModelBuilderHelper.java.

◆ isEnforcedConstraint()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.isEnforcedConstraint ( int ct_index)

Definition at line 179 of file ModelBuilderHelper.java.

◆ numConstraints()

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

Definition at line 247 of file ModelBuilderHelper.java.

◆ numVariables()

int com.google.ortools.modelbuilder.ModelBuilderHelper.numVariables ( )

Definition at line 251 of file ModelBuilderHelper.java.

◆ overwriteModel()

void com.google.ortools.modelbuilder.ModelBuilderHelper.overwriteModel ( ModelBuilderHelper other_helper)

Definition at line 51 of file ModelBuilderHelper.java.

◆ readModelFromProtoFile()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.readModelFromProtoFile ( String filename)

Definition at line 55 of file ModelBuilderHelper.java.

◆ safeAddConstraintTerm()

void com.google.ortools.modelbuilder.ModelBuilderHelper.safeAddConstraintTerm ( int ct_index,
int var_index,
double coeff )

Definition at line 155 of file ModelBuilderHelper.java.

◆ safeAddEnforcedConstraintTerm()

void com.google.ortools.modelbuilder.ModelBuilderHelper.safeAddEnforcedConstraintTerm ( int ct_index,
int var_index,
double coeff )

Definition at line 219 of file ModelBuilderHelper.java.

◆ setConstraintCoefficient()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setConstraintCoefficient ( int ct_index,
int var_index,
double coeff )

Definition at line 159 of file ModelBuilderHelper.java.

◆ setConstraintLowerBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setConstraintLowerBound ( int ct_index,
double lb )

Definition at line 163 of file ModelBuilderHelper.java.

◆ setConstraintName()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setConstraintName ( int ct_index,
String name )

Definition at line 167 of file ModelBuilderHelper.java.

◆ setConstraintUpperBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setConstraintUpperBound ( int ct_index,
double ub )

Definition at line 171 of file ModelBuilderHelper.java.

◆ setEnforcedConstraintCoefficient()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedConstraintCoefficient ( int ct_index,
int var_index,
double coeff )

Definition at line 223 of file ModelBuilderHelper.java.

◆ setEnforcedConstraintLowerBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedConstraintLowerBound ( int ct_index,
double lb )

Definition at line 227 of file ModelBuilderHelper.java.

◆ setEnforcedConstraintName()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedConstraintName ( int ct_index,
String name )

Definition at line 231 of file ModelBuilderHelper.java.

◆ setEnforcedConstraintUpperBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedConstraintUpperBound ( int ct_index,
double ub )

Definition at line 235 of file ModelBuilderHelper.java.

◆ setEnforcedIndicatorValue()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedIndicatorValue ( int ct_index,
boolean positive )

Definition at line 239 of file ModelBuilderHelper.java.

◆ setEnforcedIndicatorVariableIndex()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setEnforcedIndicatorVariableIndex ( int ct_index,
int var_index )

Definition at line 243 of file ModelBuilderHelper.java.

◆ setMaximize()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setMaximize ( boolean maximize)

Definition at line 271 of file ModelBuilderHelper.java.

◆ setName()

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

Definition at line 259 of file ModelBuilderHelper.java.

◆ setObjectiveOffset()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setObjectiveOffset ( double offset)

Definition at line 279 of file ModelBuilderHelper.java.

◆ setVarIntegrality()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setVarIntegrality ( int var_index,
boolean is_integer )

Definition at line 91 of file ModelBuilderHelper.java.

◆ setVarLowerBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setVarLowerBound ( int var_index,
double lb )

Definition at line 83 of file ModelBuilderHelper.java.

◆ setVarName()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setVarName ( int var_index,
String name )

Definition at line 99 of file ModelBuilderHelper.java.

◆ setVarObjectiveCoefficient()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setVarObjectiveCoefficient ( int var_index,
double coeff )

Definition at line 95 of file ModelBuilderHelper.java.

◆ setVarUpperBound()

void com.google.ortools.modelbuilder.ModelBuilderHelper.setVarUpperBound ( int var_index,
double ub )

Definition at line 87 of file ModelBuilderHelper.java.

◆ swigRelease()

static long com.google.ortools.modelbuilder.ModelBuilderHelper.swigRelease ( ModelBuilderHelper obj)
staticprotected

Definition at line 24 of file ModelBuilderHelper.java.

◆ writeModelToProtoFile()

boolean com.google.ortools.modelbuilder.ModelBuilderHelper.writeModelToProtoFile ( String filename)

Definition at line 59 of file ModelBuilderHelper.java.

◆ writeToMpsFile()

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

Definition at line 299 of file ModelBuilderHelper.java.

Member Data Documentation

◆ swigCMemOwn

transient boolean com.google.ortools.modelbuilder.ModelBuilderHelper.swigCMemOwn
protected

Definition at line 13 of file ModelBuilderHelper.java.


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