Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.CumulativeConstraint Class Reference
Inheritance diagram for com.google.ortools.sat.CumulativeConstraint:
com.google.ortools.sat.Constraint com.google.ortools.sat.Constraint

Public Member Functions

 CumulativeConstraint (CpModel model)
 
CumulativeConstraint addDemand (IntervalVar interval, LinearArgument demand)
 Adds a pair (interval, demand) to the constraint.
 
CumulativeConstraint addDemand (IntervalVar interval, long demand)
 Adds a pair (interval, demand) to the constraint.
 
CumulativeConstraint addDemands (IntervalVar[] intervals, LinearArgument[] demands)
 
CumulativeConstraint addDemands (IntervalVar[] intervals, long[] demands)
 
CumulativeConstraint addDemands (IntervalVar[] intervals, int[] demands)
 
 CumulativeConstraint (CpModel model)
 
CumulativeConstraint addDemand (IntervalVar interval, LinearArgument demand)
 Adds a pair (interval, demand) to the constraint.
 
CumulativeConstraint addDemand (IntervalVar interval, long demand)
 Adds a pair (interval, demand) to the constraint.
 
CumulativeConstraint addDemands (IntervalVar[] intervals, LinearArgument[] demands)
 
CumulativeConstraint addDemands (IntervalVar[] intervals, long[] demands)
 
CumulativeConstraint addDemands (IntervalVar[] intervals, int[] demands)
 
- Public Member Functions inherited from com.google.ortools.sat.Constraint
 Constraint (CpModelProto.Builder builder)
 
void onlyEnforceIf (Literal lit)
 
void onlyEnforceIf (Literal[] lits)
 
int getIndex ()
 
ConstraintProto.Builder getBuilder ()
 
 Constraint (CpModelProto.Builder builder)
 
void onlyEnforceIf (Literal lit)
 
void onlyEnforceIf (Literal[] lits)
 
int getIndex ()
 
ConstraintProto.Builder getBuilder ()
 

Detailed Description

Specialized cumulative constraint.

This constraint allows adding (interval, demand) pairs to the cumulative constraint incrementally.

Definition at line 24 of file CumulativeConstraint.java.

Constructor & Destructor Documentation

◆ CumulativeConstraint() [1/2]

com.google.ortools.sat.CumulativeConstraint.CumulativeConstraint ( CpModel model)

Definition at line 25 of file CumulativeConstraint.java.

◆ CumulativeConstraint() [2/2]

com.google.ortools.sat.CumulativeConstraint.CumulativeConstraint ( CpModel model)

Definition at line 25 of file CumulativeConstraint.java.

Member Function Documentation

◆ addDemand() [1/4]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemand ( IntervalVar interval,
LinearArgument demand )

Adds a pair (interval, demand) to the constraint.

Definition at line 31 of file CumulativeConstraint.java.

◆ addDemand() [2/4]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemand ( IntervalVar interval,
LinearArgument demand )

Adds a pair (interval, demand) to the constraint.

Definition at line 31 of file CumulativeConstraint.java.

◆ addDemand() [3/4]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemand ( IntervalVar interval,
long demand )

Adds a pair (interval, demand) to the constraint.

Definition at line 39 of file CumulativeConstraint.java.

◆ addDemand() [4/4]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemand ( IntervalVar interval,
long demand )

Adds a pair (interval, demand) to the constraint.

Definition at line 39 of file CumulativeConstraint.java.

◆ addDemands() [1/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
int[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of integer values
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 92 of file CumulativeConstraint.java.

◆ addDemands() [2/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
int[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of integer values
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 92 of file CumulativeConstraint.java.

◆ addDemands() [3/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
LinearArgument[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of linear expression
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 54 of file CumulativeConstraint.java.

◆ addDemands() [4/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
LinearArgument[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of linear expression
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 54 of file CumulativeConstraint.java.

◆ addDemands() [5/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
long[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of long values
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 73 of file CumulativeConstraint.java.

◆ addDemands() [6/6]

CumulativeConstraint com.google.ortools.sat.CumulativeConstraint.addDemands ( IntervalVar[] intervals,
long[] demands )

Adds all pairs (intervals[i], demands[i]) to the constraint.

Parameters
intervalsan array of interval variables
demandsan array of long values
Returns
itself
Exceptions
CpModel.MismatchedArrayLengthsif intervals and demands have different length

Definition at line 73 of file CumulativeConstraint.java.


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