Class SearchLimit

Direct Known Subclasses:
ImprovementSearchLimit, RegularLimit

public class SearchLimit extends SearchMonitor
Base class of all search limits.
  • Constructor Details

    • SearchLimit

      public SearchLimit(long cPtr, boolean cMemoryOwn)
  • Method Details

    • getCPtr

      public static long getCPtr(SearchLimit obj)
    • swigRelease

      public static long swigRelease(SearchLimit obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class SearchMonitor
    • delete

      public void delete()
      Overrides:
      delete in class SearchMonitor
    • keepAliveDecisionBuilder

      public void keepAliveDecisionBuilder(DecisionBuilder db)
      Overrides:
      keepAliveDecisionBuilder in class SearchMonitor
    • crossed

      public boolean crossed()
      Returns true if the limit has been crossed.
    • check

      public boolean check()
      This method is called to check the status of the limit. A return
      value of true indicates that we have indeed crossed the limit. In
      that case, this method will not be called again and the remaining
      search will be discarded.
    • CheckWithOffset

      public boolean CheckWithOffset(SWIGTYPE_p_absl__Duration offset)
      Same as Check() but adds the 'offset' value to the current time when time
      is considered in the limit.
    • init

      public void init()
      This method is called when the search limit is initialized.
    • copy

      public void copy(SearchLimit limit)
      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.
    • makeClone

      public SearchLimit makeClone()
      Allocates a clone of the limit.
    • enterSearch

      public void enterSearch()
      Internal methods.
      Overrides:
      enterSearch in class SearchMonitor
    • beginNextDecision

      public void beginNextDecision(DecisionBuilder b)
      Description copied from class: SearchMonitor
      Before calling DecisionBuilder::Next.
      Overrides:
      beginNextDecision in class SearchMonitor
    • periodicCheck

      public void periodicCheck()
      Description copied from class: SearchMonitor
      Periodic call to check limits in long running methods.
      Overrides:
      periodicCheck in class SearchMonitor
    • refuteDecision

      public void refuteDecision(Decision d)
      Description copied from class: SearchMonitor
      Before refuting the decision.
      Overrides:
      refuteDecision in class SearchMonitor
    • toString

      public String toString()
      Overrides:
      toString in class BaseObject
    • 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 SearchMonitor