java.lang.Object
org.maxicp.cp.examples.modeling.JobShop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Runnable[]insertAtBestOrRefute(CPSeqVar machine, int task, int[] nodes) Generates two branches: either inserts the task after the node with the largest number of successor, or refutes the insertion.static CPSeqVarmachineSeqVar(CPIntervalVar[] intervals) Creates a sequence variable linked with interval variables.static voidnodeSearch(CPSeqVar[] machines, CPIntervalVar[][] intervals) Binary branching that inserts the task with the best cost into the best location in its machine.
-
Constructor Details
-
JobShop
public JobShop()
-
-
Method Details
-
main
-
machineSeqVar
Creates a sequence variable linked with interval variables. The channeling happens through a constraint, hence the fixpoint must be triggered at every change.- Parameters:
intervals- intervals that must be linked with a sequence variable- Returns:
- sequence variable linked with the intervals
-
nodeSearch
Binary branching that inserts the task with the best cost into the best location in its machine. Best cost is defined as the number of insertions divided by the task duration. The task is then inserted at its best location: the one with the largest number of successor- Parameters:
machines- machines into which the tasks must be insertedintervals- intervals[m] = intervals related to machine m- Returns:
- binary branching
-
insertAtBestOrRefute
Generates two branches: either inserts the task after the node with the largest number of successor, or refutes the insertion.- Parameters:
machine- machine on which the insertion must happentask- task to insertnodes- array used for fillmachine.fillInsert(task, nodes)operations- Returns:
- two branches
-