Class PropagationGuidedNeighborhood

  • All Implemented Interfaces:
    ICause
    Direct Known Subclasses:
    ReversePropagationGuidedNeighborhood

    public class PropagationGuidedNeighborhood
    extends Neighbor
    A Propagation Guided LNS

    Based on "Propagation Guided Large Neighborhood Search", Perron et al. CP2004.

    Since:
    08/04/13
    Author:
    Charles Prud'homme
    • Field Detail

      • n

        protected final int n
        Number of variables
      • rd

        protected Random rd
        For randomness
      • all

        protected int[] all
        Store the modified variables
      • fragment

        protected BitSet fragment
        Indicate which variables are selected in a fragment
      • mModel

        protected Model mModel
        Reference to the model
    • Constructor Detail

      • PropagationGuidedNeighborhood

        public PropagationGuidedNeighborhood​(IntVar[] vars,
                                             int fgmtSize,
                                             int listSize,
                                             long seed)
        Create a propagation-guided neighbor for LNS
        Parameters:
        vars - set of variables to consider
        fgmtSize - initial size of the fragment
        listSize - number of modified variable to store while propagating
        seed - for randomness
    • Method Detail

      • restrictLess

        public void restrictLess()
        Description copied from class: Neighbor
        Use less restriction at the beginning of a LNS run in order to get better solutions Called when no solution was found during a LNS run (trapped into a local optimum)
        Overrides:
        restrictLess in class Neighbor
      • init

        public void init()
        Description copied from class: Neighbor
        Initialize this neighbor
        Overrides:
        init in class Neighbor