choco.cp.solver.variables.integer
Class IntVarEvent<C extends AbstractSConstraint & IntPropagator>

java.lang.Object
  extended by choco.kernel.solver.propagation.event.VarEvent<IntDomainVarImpl>
      extended by choco.cp.solver.variables.integer.IntVarEvent<C>
All Implemented Interfaces:
IPrioritizable, PropagationEvent
Direct Known Subclasses:
BoolVarEvent, IntCsteEvent

public class IntVarEvent<C extends AbstractSConstraint & IntPropagator>
extends VarEvent<IntDomainVarImpl>


Field Summary
static int BOUNDS_MASK
          Constants for the eventType bitvector: value of bitvector for updates to both bound of IntVars
static int BOUNDSbitvector
          Deprecated. 
static int DECSUP
          Constants for the eventType bitvector: index of bit for updates to upper bound of IntVars
static int DECSUP_MASK
          Constants for the eventType bitvector: value of bitvector for updates to upper bound of IntVars
static int DECSUPbitvector
          Deprecated. 
static int[] EVENTS
           
static int INCINF
          Constants for the eventType bitvector: index of bit for updates to lower bound of IntVars
static int INCINF_MASK
          Constants for the eventType bitvector: value of bitvector for updates to lower bound of IntVars
static int INCINFbitvector
          Deprecated. 
static int INSTINT
          Constants for the eventType bitvector: index of bit for instantiations of IntVars
static int INSTINT_MASK
          Constants for the eventType bitvector: value of bitvector for instantiations of IntVars
static int INSTINTbitvector
          Deprecated. 
static int NO_MASK
          Constants for the eventType bitvector: value of bitvector no eventtype
static long propagations
           
static int REMVAL
          Constants for the eventType bitvector: index of bit for holes in the domain of IntVars
static int REMVAL_MASK
          Constants for the eventType bitvector: value of bitvector for holes in the domain of IntVars
static int REMVALbitvector
          Deprecated. 
 
Fields inherited from class choco.kernel.solver.propagation.event.VarEvent
cause, DOWDCAUSE, EMPTYEVENT, eventType, modifiedVar, NOCAUSE, NOEVENT, propagatedEvents
 
Fields inherited from interface choco.kernel.solver.propagation.event.PropagationEvent
LOGGER
 
Constructor Summary
IntVarEvent(IntDomainVarImpl var)
           
 
Method Summary
 void clear()
          Clears the var: delegates to the basic events.
protected  void freeze()
          freezes the state of the "delta domain": the set of values that are considered for removal from the domain.
 boolean getReleased()
           
 boolean propagateEvent()
          Propagates the event through calls to the propagation engine.
 void propagateInfEvent(C evtCause)
          Propagates the update to the lower bound
 void propagateInstEvent(C evtCause)
          Propagates the instantiation event
 void propagateRemovalsEvent(C evtCause)
          Propagates a set of value removals
 void propagateSupEvent(C evtCause)
          Propagates the update to the upper bound
 void recordEventTypeAndCause(int basicEvt, SConstraint constraint, boolean forceAwake)
           
protected  boolean release()
          the event had been "frozen", (since the call to freeze), while it was handled by the propagation engine: This meant that the meaning of the event could not be changed: it represented a static set of value removals, during propagation.
 String toString()
          useful for debugging
 
Methods inherited from class choco.kernel.solver.propagation.event.VarEvent
addPropagatedEvents, domOverWDegIdx, domOverWDegInitialIdx, getCause, getEventType, getModifiedObject, getModifiedVar, getPriority, getPropagatedEvents, isActive, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INCINF

public static final int INCINF
Constants for the eventType bitvector: index of bit for updates to lower bound of IntVars

See Also:
Constant Field Values

DECSUP

public static final int DECSUP
Constants for the eventType bitvector: index of bit for updates to upper bound of IntVars

See Also:
Constant Field Values

REMVAL

public static final int REMVAL
Constants for the eventType bitvector: index of bit for holes in the domain of IntVars

See Also:
Constant Field Values

INSTINT

public static final int INSTINT
Constants for the eventType bitvector: index of bit for instantiations of IntVars

See Also:
Constant Field Values

NO_MASK

public static final int NO_MASK
Constants for the eventType bitvector: value of bitvector no eventtype

See Also:
Constant Field Values

INCINF_MASK

public static final int INCINF_MASK
Constants for the eventType bitvector: value of bitvector for updates to lower bound of IntVars

See Also:
Constant Field Values

INCINFbitvector

@Deprecated
public static final int INCINFbitvector
Deprecated. 
See Also:
Constant Field Values

DECSUP_MASK

public static final int DECSUP_MASK
Constants for the eventType bitvector: value of bitvector for updates to upper bound of IntVars

See Also:
Constant Field Values

DECSUPbitvector

@Deprecated
public static final int DECSUPbitvector
Deprecated. 
See Also:
Constant Field Values

BOUNDS_MASK

public static final int BOUNDS_MASK
Constants for the eventType bitvector: value of bitvector for updates to both bound of IntVars

See Also:
Constant Field Values

BOUNDSbitvector

@Deprecated
public static final int BOUNDSbitvector
Deprecated. 
See Also:
Constant Field Values

REMVAL_MASK

public static final int REMVAL_MASK
Constants for the eventType bitvector: value of bitvector for holes in the domain of IntVars

See Also:
Constant Field Values

REMVALbitvector

@Deprecated
public static final int REMVALbitvector
Deprecated. 
See Also:
Constant Field Values

INSTINT_MASK

public static final int INSTINT_MASK
Constants for the eventType bitvector: value of bitvector for instantiations of IntVars

See Also:
Constant Field Values

INSTINTbitvector

@Deprecated
public static final int INSTINTbitvector
Deprecated. 
See Also:
Constant Field Values

propagations

public static long propagations

EVENTS

public static final int[] EVENTS
Constructor Detail

IntVarEvent

public IntVarEvent(IntDomainVarImpl var)
Method Detail

toString

public String toString()
useful for debugging

Overrides:
toString in class Object

clear

public void clear()
Clears the var: delegates to the basic events.

Specified by:
clear in interface PropagationEvent
Specified by:
clear in class VarEvent<IntDomainVarImpl>

release

protected boolean release()
the event had been "frozen", (since the call to freeze), while it was handled by the propagation engine: This meant that the meaning of the event could not be changed: it represented a static set of value removals, during propagation. Now, the event becomes "open" again: new value removals can be hosted, the delta domain can accept that further values are removed. In case value removals happened while the event was frozen, the release method returns false (the event cannot be released, it must be handled once more). Otherwise (the standard behavior), the method returns true

Overrides:
release in class VarEvent<IntDomainVarImpl>

freeze

protected void freeze()
Description copied from class: VarEvent
freezes the state of the "delta domain": the set of values that are considered for removal from the domain. Further removals will be treated as a further event.

Overrides:
freeze in class VarEvent<IntDomainVarImpl>

getReleased

public boolean getReleased()

propagateEvent

public boolean propagateEvent()
                       throws ContradictionException
Propagates the event through calls to the propagation engine.

Specified by:
propagateEvent in interface PropagationEvent
Specified by:
propagateEvent in class VarEvent<IntDomainVarImpl>
Returns:
true if the event has been fully propagated (and can thus be discarded), false otherwise
Throws:
ContradictionException

propagateInstEvent

public void propagateInstEvent(C evtCause)
                        throws ContradictionException
Propagates the instantiation event

Throws:
ContradictionException

propagateInfEvent

public void propagateInfEvent(C evtCause)
                       throws ContradictionException
Propagates the update to the lower bound

Throws:
ContradictionException

propagateSupEvent

public void propagateSupEvent(C evtCause)
                       throws ContradictionException
Propagates the update to the upper bound

Throws:
ContradictionException

propagateRemovalsEvent

public void propagateRemovalsEvent(C evtCause)
                            throws ContradictionException
Propagates a set of value removals

Throws:
ContradictionException

recordEventTypeAndCause

public void recordEventTypeAndCause(int basicEvt,
                                    SConstraint constraint,
                                    boolean forceAwake)
Overrides:
recordEventTypeAndCause in class VarEvent<IntDomainVarImpl>


Copyright © 2012. All Rights Reserved.