Class SequenceNeighborhood

  • All Implemented Interfaces:
    ICause, INeighbor
    Direct Known Subclasses:

    public class SequenceNeighborhood
    extends Object
    implements INeighbor
    A neighbor which is based on mutliple neighbors. They are called sequentially.
    Charles Prud'homme
    • Field Detail

      • count

        protected int count
        number of neighbors declared
      • neighbors

        protected INeighbor[] neighbors
        neighbors declared
    • Constructor Detail

      • SequenceNeighborhood

        public SequenceNeighborhood​(INeighbor... neighbors)
    • Method Detail

      • recordSolution

        public void recordSolution()
        Description copied from interface: INeighbor
        Record values of decision variables to freeze some ones during the next LNS run
        Specified by:
        recordSolution in interface INeighbor
      • loadFromSolution

        public void loadFromSolution​(Solution solution)
        Description copied from interface: INeighbor
        Load a solution and record it
        Specified by:
        loadFromSolution in interface INeighbor
        solution - a solution to record
      • restrictLess

        public void restrictLess()
        Description copied from interface: INeighbor
        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)
        Specified by:
        restrictLess in interface INeighbor
      • isSearchComplete

        public boolean isSearchComplete()
        Specified by:
        isSearchComplete in interface INeighbor
        true iff the search is in a complete mode (no fixed variable)
      • init

        public void init()
        Description copied from interface: INeighbor
        Initialize this neighbor
        Specified by:
        init in interface INeighbor
      • nextNeighbor

        protected void nextNeighbor()