Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.Demon Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.Demon:
com.google.ortools.constraintsolver.BaseObject

Public Member Functions

 Demon (long cPtr, boolean cMemoryOwn)
 
synchronized void delete ()
 
void run (Solver s)
 
int priority ()
 
String toString ()
 
void inhibit (Solver s)
 
void desinhibit (Solver s)
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject (long cPtr, boolean cMemoryOwn)
 
 BaseObject ()
 

Static Public Member Functions

static long getCPtr (Demon obj)
 
static long swigRelease (Demon obj)
 
- Static Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
static long getCPtr (BaseObject obj)
 
static long swigRelease (BaseObject obj)
 

Protected Member Functions

void finalize ()
 

Additional Inherited Members

- Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject
transient boolean swigCMemOwn
 

Detailed Description

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.

Definition at line 22 of file Demon.java.

Constructor & Destructor Documentation

◆ Demon()

com.google.ortools.constraintsolver.Demon.Demon ( long cPtr,
boolean cMemoryOwn )

Definition at line 25 of file Demon.java.

Member Function Documentation

◆ delete()

synchronized void com.google.ortools.constraintsolver.Demon.delete ( )

Reimplemented from com.google.ortools.constraintsolver.BaseObject.

Definition at line 51 of file Demon.java.

◆ desinhibit()

void com.google.ortools.constraintsolver.Demon.desinhibit ( Solver s)

This method un-inhibits the demon that was previously inhibited.

Definition at line 93 of file Demon.java.

◆ finalize()

void com.google.ortools.constraintsolver.Demon.finalize ( )
protected

Reimplemented from com.google.ortools.constraintsolver.BaseObject.

Definition at line 47 of file Demon.java.

◆ getCPtr()

static long com.google.ortools.constraintsolver.Demon.getCPtr ( Demon obj)
static

Definition at line 30 of file Demon.java.

◆ inhibit()

void com.google.ortools.constraintsolver.Demon.inhibit ( Solver s)

This method inhibits the demon in the search tree below the
current position.

Definition at line 86 of file Demon.java.

◆ priority()

int com.google.ortools.constraintsolver.Demon.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.

Definition at line 74 of file Demon.java.

◆ run()

void com.google.ortools.constraintsolver.Demon.run ( Solver s)

This is the main callback of the demon.

Definition at line 65 of file Demon.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.Demon.swigRelease ( Demon obj)
static

Definition at line 34 of file Demon.java.

◆ toString()

String com.google.ortools.constraintsolver.Demon.toString ( )

Reimplemented from com.google.ortools.constraintsolver.BaseObject.

Definition at line 78 of file Demon.java.


The documentation for this class was generated from the following file: