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

Public Member Functions

 EnforcedLinearConstraint (ModelBuilderHelper helper)
 
int getIndex ()
 
ModelBuilderHelper getHelper ()
 
double getLowerBound ()
 
void setLowerBound (double lb)
 
double getUpperBound ()
 
void setUpperBound (double ub)
 
String getName ()
 
void setName (String name)
 Sets the name of the constraint. *‍/.
 
void addTerm (Variable v, double coeff)
 
void setCoefficient (Variable v, double coeff)
 
void clearTerms ()
 
Variable getIndicatorVariable ()
 
void setIndicatorVariable (Variable v)
 
boolean getIndicatorValue ()
 
void setIndicatorValue (boolean b)
 
EnforcedLinearConstraint withName (String name)
 
 EnforcedLinearConstraint (ModelBuilderHelper helper)
 
int getIndex ()
 
ModelBuilderHelper getHelper ()
 
double getLowerBound ()
 
void setLowerBound (double lb)
 
double getUpperBound ()
 
void setUpperBound (double ub)
 
String getName ()
 
void setName (String name)
 Sets the name of the constraint. *‍/.
 
void addTerm (Variable v, double coeff)
 
void setCoefficient (Variable v, double coeff)
 
void clearTerms ()
 
Variable getIndicatorVariable ()
 
void setIndicatorVariable (Variable v)
 
boolean getIndicatorValue ()
 
void setIndicatorValue (boolean b)
 
EnforcedLinearConstraint withName (String name)
 

Detailed Description

Wrapper around a linear constraint stored in the ModelBuilderHelper instance.

Definition at line 17 of file EnforcedLinearConstraint.java.

Constructor & Destructor Documentation

◆ EnforcedLinearConstraint() [1/2]

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

Definition at line 18 of file EnforcedLinearConstraint.java.

◆ EnforcedLinearConstraint() [2/2]

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

Definition at line 18 of file EnforcedLinearConstraint.java.

Member Function Documentation

◆ addTerm() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.addTerm ( Variable v,
double coeff )

Adds var * coeff to the constraint.

Definition at line 73 of file EnforcedLinearConstraint.java.

◆ addTerm() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.addTerm ( Variable v,
double coeff )

Adds var * coeff to the constraint.

Definition at line 73 of file EnforcedLinearConstraint.java.

◆ clearTerms() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.clearTerms ( )

Clear all terms.

Definition at line 83 of file EnforcedLinearConstraint.java.

◆ clearTerms() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.clearTerms ( )

Clear all terms.

Definition at line 83 of file EnforcedLinearConstraint.java.

◆ getHelper() [1/2]

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

Returns the constraint builder.

Definition at line 38 of file EnforcedLinearConstraint.java.

◆ getHelper() [2/2]

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

Returns the constraint builder.

Definition at line 38 of file EnforcedLinearConstraint.java.

◆ getIndex() [1/2]

int com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndex ( )

Returns the index of the constraint in the model.

Definition at line 33 of file EnforcedLinearConstraint.java.

◆ getIndex() [2/2]

int com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndex ( )

Returns the index of the constraint in the model.

Definition at line 33 of file EnforcedLinearConstraint.java.

◆ getIndicatorValue() [1/2]

boolean com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndicatorValue ( )

Returns the indicator value of the constraint.

Definition at line 98 of file EnforcedLinearConstraint.java.

◆ getIndicatorValue() [2/2]

boolean com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndicatorValue ( )

Returns the indicator value of the constraint.

Definition at line 98 of file EnforcedLinearConstraint.java.

◆ getIndicatorVariable() [1/2]

Variable com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndicatorVariable ( )

Returns the indicator variable of the constraint/

Definition at line 88 of file EnforcedLinearConstraint.java.

◆ getIndicatorVariable() [2/2]

Variable com.google.ortools.modelbuilder.EnforcedLinearConstraint.getIndicatorVariable ( )

Returns the indicator variable of the constraint/

Definition at line 88 of file EnforcedLinearConstraint.java.

◆ getLowerBound() [1/2]

double com.google.ortools.modelbuilder.EnforcedLinearConstraint.getLowerBound ( )

Returns the lower bound of the constraint.

Definition at line 43 of file EnforcedLinearConstraint.java.

◆ getLowerBound() [2/2]

double com.google.ortools.modelbuilder.EnforcedLinearConstraint.getLowerBound ( )

Returns the lower bound of the constraint.

Definition at line 43 of file EnforcedLinearConstraint.java.

◆ getName() [1/2]

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

Returns the name of the constraint given upon creation.

Definition at line 63 of file EnforcedLinearConstraint.java.

◆ getName() [2/2]

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

Returns the name of the constraint given upon creation.

Definition at line 63 of file EnforcedLinearConstraint.java.

◆ getUpperBound() [1/2]

double com.google.ortools.modelbuilder.EnforcedLinearConstraint.getUpperBound ( )

Returns the upper bound of the constraint.

Definition at line 53 of file EnforcedLinearConstraint.java.

◆ getUpperBound() [2/2]

double com.google.ortools.modelbuilder.EnforcedLinearConstraint.getUpperBound ( )

Returns the upper bound of the constraint.

Definition at line 53 of file EnforcedLinearConstraint.java.

◆ setCoefficient() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setCoefficient ( Variable v,
double coeff )

Sets the coefficient of v to coeff, adding or removing a term if needed.

Definition at line 78 of file EnforcedLinearConstraint.java.

◆ setCoefficient() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setCoefficient ( Variable v,
double coeff )

Sets the coefficient of v to coeff, adding or removing a term if needed.

Definition at line 78 of file EnforcedLinearConstraint.java.

◆ setIndicatorValue() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setIndicatorValue ( boolean b)

Sets the indicator value of the constraint.

Definition at line 103 of file EnforcedLinearConstraint.java.

◆ setIndicatorValue() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setIndicatorValue ( boolean b)

Sets the indicator value of the constraint.

Definition at line 103 of file EnforcedLinearConstraint.java.

◆ setIndicatorVariable() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setIndicatorVariable ( Variable v)

Sets the indicator variable of the constraint.

Definition at line 93 of file EnforcedLinearConstraint.java.

◆ setIndicatorVariable() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setIndicatorVariable ( Variable v)

Sets the indicator variable of the constraint.

Definition at line 93 of file EnforcedLinearConstraint.java.

◆ setLowerBound() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setLowerBound ( double lb)

Sets the lower bound of the constraint.

Definition at line 48 of file EnforcedLinearConstraint.java.

◆ setLowerBound() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setLowerBound ( double lb)

Sets the lower bound of the constraint.

Definition at line 48 of file EnforcedLinearConstraint.java.

◆ setName() [1/2]

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

Sets the name of the constraint. *‍/.

Definition at line 68 of file EnforcedLinearConstraint.java.

◆ setName() [2/2]

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

Sets the name of the constraint. *‍/.

Definition at line 68 of file EnforcedLinearConstraint.java.

◆ setUpperBound() [1/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setUpperBound ( double ub)

Sets the upper bound of the constraint.

Definition at line 58 of file EnforcedLinearConstraint.java.

◆ setUpperBound() [2/2]

void com.google.ortools.modelbuilder.EnforcedLinearConstraint.setUpperBound ( double ub)

Sets the upper bound of the constraint.

Definition at line 58 of file EnforcedLinearConstraint.java.

◆ withName() [1/2]

EnforcedLinearConstraint com.google.ortools.modelbuilder.EnforcedLinearConstraint.withName ( String name)

Inline setter

Definition at line 108 of file EnforcedLinearConstraint.java.

◆ withName() [2/2]

EnforcedLinearConstraint com.google.ortools.modelbuilder.EnforcedLinearConstraint.withName ( String name)

Inline setter

Definition at line 108 of file EnforcedLinearConstraint.java.


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