java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.Demon

public class Demon
extends BaseObject
A Demon is the base element of a propagation queue. It is the main
object responsible for implementing the actual propagation
of the constraint and pruning the inconsistent values in the domains
of the variables. The main concept is that demons are listeners that are
attached to the variables and listen to their modifications.
There are two methods:
- Run() is the actual method called when the demon is processed.
- priority() returns its priority. Standard priorities are slow, normal
or fast. "immediate" is reserved for variables and is treated separately.
  • Field Summary

    Fields inherited from class com.google.ortools.constraintsolver.BaseObject

    swigCMemOwn
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected Demon​(long cPtr, boolean cMemoryOwn)  
  • Method Summary

    Modifier and Type Method Description
    void delete()  
    void desinhibit​(Solver s)
    This method un-inhibits the demon that was previously inhibited.
    protected void finalize()  
    protected static long getCPtr​(Demon obj)  
    void inhibit​(Solver s)
    This method inhibits the demon in the search tree below the
    current position.
    int priority()
    This method returns the priority of the demon.
    void run​(Solver s)
    This is the main callback of the demon.
    java.lang.String toString()  

    Methods inherited from class com.google.ortools.constraintsolver.BaseObject

    getCPtr

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Demon

      protected Demon​(long cPtr, boolean cMemoryOwn)
  • Method Details

    • getCPtr

      protected static long getCPtr​(Demon obj)
    • finalize

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

      public void delete()
      Overrides:
      delete in class BaseObject
    • run

      public void run​(Solver s)
      This is the main callback of the demon.
    • priority

      public int priority()
      This method returns the priority of the demon. Usually a demon is
      fast, slow or normal. Immediate demons are reserved for internal
      use to maintain variables.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class BaseObject
    • inhibit

      public void inhibit​(Solver s)
      This method inhibits the demon in the search tree below the
      current position.
    • desinhibit

      public void desinhibit​(Solver s)
      This method un-inhibits the demon that was previously inhibited.