JaCoP.constraints.netflow
Class MultiVarHandler
java.lang.Object
JaCoP.constraints.netflow.MultiVarHandler
- All Implemented Interfaces:
- VarHandler
public class MultiVarHandler
- extends java.lang.Object
- implements VarHandler
- Version:
- 3.1
- Author:
- Robin Steiger and Radoslaw Szymanek
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiVarHandler
public MultiVarHandler(IntVar variable,
VarHandler... handlers)
add
public void add(VarHandler handler)
getPruningEvent
public int getPruningEvent(Var variable)
- Description copied from interface:
VarHandler
- Retrieves the consistency pruning event of a handler variable that causes
the handler to be reevaluated. For instance, X- and W-variables will
listen to BOUND events while S-variables typically consider ANY events.
- Specified by:
getPruningEvent in interface VarHandler
- Parameters:
variable - a handler variable
- Returns:
- the pruning event which causes reevaluation of the handler
listVariables
public java.util.List<IntVar> listVariables()
- Specified by:
listVariables in interface VarHandler
- Returns:
- the list of variables handled by this handler
processEvent
public void processEvent(IntVar variable,
MutableNetwork network)
- Description copied from interface:
VarHandler
- Informs the handler that one of its variable has changed and asks the
handler to update the state of the network accordingly.
- Specified by:
processEvent in interface VarHandler
- Parameters:
variable - the variable that changednetwork - the network