Module org.maxicp

Class JobShop

java.lang.Object
org.maxicp.cp.examples.modeling.JobShop

public class JobShop extends Object
  • Constructor Details

    • JobShop

      public JobShop()
  • Method Details

    • main

      public static void main(String[] args)
    • machineSeqVar

      public static CPSeqVar machineSeqVar(CPIntervalVar[] intervals)
      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

      public static Supplier<Runnable[]> nodeSearch(CPSeqVar[] machines, CPIntervalVar[][] intervals)
      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 inserted
      intervals - intervals[m] = intervals related to machine m
      Returns:
      binary branching
    • insertAtBestOrRefute

      public static 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.
      Parameters:
      machine - machine on which the insertion must happen
      task - task to insert
      nodes - array used for fill machine.fillInsert(task, nodes) operations
      Returns:
      two branches