Interface IDecompositionFactory

  • All Superinterfaces:
    ISelf<Model>
    All Known Subinterfaces:
    IModel
    All Known Implementing Classes:
    Model

    public interface IDecompositionFactory
    extends ISelf<Model>
    An interface dedicated to list decomposition of some constraints.

    Project: choco-solver.

    Since:
    12/06/2018.
    Author:
    Charles Prud'homme
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void binPackingDec​(IntVar[] bin, int[] w, IntVar[] load, int offset)
      Creates and posts a decomposition of a bin packing constraint.
      default void cumulativeTimeDec​(IntVar[] starts, int[] durations, int[] heights, int capacity)
      Creates and posts a decomposition of a cumulative constraint: associates a boolean variable to each task and each point of time sich that the scalar product of boolean variables per heights for each time never exceed capacity.
      default IntVar[] regularDec​(IntVar[] vars, IAutomaton automaton)
      Creates and posts a decomposition of a regular constraint.
      • Methods inherited from interface org.chocosolver.solver.ISelf

        ref
    • Method Detail

      • cumulativeTimeDec

        default void cumulativeTimeDec​(IntVar[] starts,
                                       int[] durations,
                                       int[] heights,
                                       int capacity)
        Creates and posts a decomposition of a cumulative constraint: associates a boolean variable to each task and each point of time sich that the scalar product of boolean variables per heights for each time never exceed capacity.
        Parameters:
        starts - starting time of each task
        durations - processing time of each task
        heights - resource consumption of each task
        capacity - resource capacity
        See Also:
        IIntConstraintFactory.cumulative(IntVar[], int[], int[], int)
      • regularDec

        default IntVar[] regularDec​(IntVar[] vars,
                                    IAutomaton automaton)
        Creates and posts a decomposition of a regular constraint. Enforces the sequence of vars to be a word recognized by the deterministic finite automaton. For example regexp = "(1|2)(3*)(4|5)"; The same dfa can be used for different propagators.
        Parameters:
        vars - sequence of variables
        automaton - a deterministic finite automaton defining the regular language
        Returns:
        array of variables that encodes the states, which can optionally be constrained too.
      • binPackingDec

        default void binPackingDec​(IntVar[] bin,
                                   int[] w,
                                   IntVar[] load,
                                   int offset)
        Creates and posts a decomposition of a bin packing constraint. Bin Packing formulation: forall b in [0,binLoad.length-1], load[b]=sum(w[i] | i in [0,w.length-1], bin[i] = b+offset) forall i in [0,w.length-1], bin is in [offset,load.length-1+offset],
        Parameters:
        bin - IntVar representing the bin of each item
        w - int representing the size of each item
        load - IntVar representing the load of each bin (i.e. the sum of the size of the items in it)
        offset - 0 by default but typically 1 if used within MiniZinc (which counts from 1 to n instead of from 0 to n-1)