Class IntNeighbor

    • Field Detail

      • variables

        protected final IntVar[] variables
      • values

        protected final int[] values
    • Constructor Detail

      • IntNeighbor

        protected IntNeighbor​(IntVar[] variables)
    • Method Detail

      • recordSolution

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

        public void freeze​(int i)
                    throws ContradictionException
        Freeze variable at position 'i' to its value in that recorded solution.
        Parameters:
        i - position of the variable to instantiate
        Throws:
        ContradictionException - if a contradiction occurs
      • loadFromSolution

        public void loadFromSolution​(Solution solution)
        Load a solution and record it
        Specified by:
        loadFromSolution in interface INeighbor
        Parameters:
        solution - a solution to record
      • forEachIntVar

        public void forEachIntVar​(Consumer<IntVar> action)
        Description copied from interface: ICause
        Apply an action on each variable declared on the scope of this cause, if any.
        Specified by:
        forEachIntVar in interface ICause
        Parameters:
        action - action to perform on each variable declared in this cause.