public class Disjunctive extends AbstractConstraint
| Constructor and Description |
|---|
Disjunctive(IntVar[] start,
int[] duration)
Creates a disjunctive constraint that enforces
that for any two pair i,j of activities we have
start[i]+duration[i] <= start[j] or start[j]+duration[j] <= start[i]. |
| Modifier and Type | Method and Description |
|---|---|
void |
post()
Initializes the constraint when it is posted to the solver.
|
void |
propagate()
Propagates the constraint.
|
getSolver, isActive, isScheduled, setActive, setScheduledpublic Disjunctive(IntVar[] start, int[] duration)
start[i]+duration[i] <= start[j] or start[j]+duration[j] <= start[i].start - the start times of the activitiesduration - the durations of the activitiespublic void post()
Constraintpost in interface Constraintpost in class AbstractConstraintpublic void propagate()
Constraintpropagate in interface Constraintpropagate in class AbstractConstraintCopyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.