Class RegularLimit


  • public class RegularLimit
    extends SearchLimit
    Usual limit based on wall_time, number of explored branches and
    number of failures in the search tree
    • Constructor Detail

      • RegularLimit

        protected RegularLimit​(long cPtr,
                               boolean cMemoryOwn)
      • RegularLimit

        public RegularLimit​(Solver s,
                            SWIGTYPE_p_absl__Duration time,
                            long branches,
                            long failures,
                            long solutions,
                            boolean smart_time_check,
                            boolean cumulative)
    • Method Detail

      • getCPtr

        protected static long getCPtr​(RegularLimit obj)
      • swigRelease

        protected static long swigRelease​(RegularLimit obj)
      • copy

        public void copy​(SearchLimit limit)
        Description copied from class: SearchLimit
        Copy a limit. Warning: leads to a direct (no check) downcasting of 'limit'
        so one needs to be sure both SearchLimits are of the same type.
        Overrides:
        copy in class SearchLimit
      • MakeIdenticalClone

        public RegularLimit MakeIdenticalClone()
      • init

        public void init()
        Description copied from class: SearchLimit
        This method is called when the search limit is initialized.
        Overrides:
        init in class SearchLimit
      • UpdateLimits

        public void UpdateLimits​(SWIGTYPE_p_absl__Duration time,
                                 long branches,
                                 long failures,
                                 long solutions)
      • wall_time

        public long wall_time()
      • branches

        public long branches()
      • failures

        public long failures()
      • solutions

        public long solutions()
      • IsUncheckedSolutionLimitReached

        public boolean IsUncheckedSolutionLimitReached()
        Description copied from class: SearchMonitor
        Returns true if the limit of solutions has been reached including
        unchecked solutions.
        Overrides:
        IsUncheckedSolutionLimitReached in class SearchMonitor
      • progressPercent

        public int progressPercent()
        Description copied from class: SearchMonitor
        Returns a percentage representing the propress of the search before
        reaching limits.
        Overrides:
        progressPercent in class SearchMonitor
      • install

        public void install()
        Description copied from class: SearchMonitor
        Registers itself on the solver such that it gets notified of the search
        and propagation events. Override to incrementally install listeners for
        specific events.
        Overrides:
        install in class SearchLimit