|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.constraints.netflow.ArcCompanion
public final class ArcCompanion
This class extends the definition of an arc by a lower bound on the capacity and connects the arc to variables that constrain it. The ArcCompanion plays the role of the VarHandler for X- and W-variables. It also provides a hook for S-variables of any
| Field Summary | |
|---|---|
Arc |
arc
The (forward) arc |
int |
arcID
Identifier for this arc in the structure variable |
int |
flowOffset
Current lower capacity of the arc |
int |
pruningScore
The pruningScore |
DomainStructure |
structure
The associated structure variable |
IntVar |
wVar
The FDV for lower and upper cost |
IntVar |
xVar
The FDV for lower and upper capacity |
| Constructor Summary | |
|---|---|
ArcCompanion(Arc arc,
int offset)
|
|
| Method Summary | |
|---|---|
void |
changeCapacity(int min,
int max)
Changes the lower and upper capacity of the arc in any way, performing the necessary changes to node balance and flow offset functions. |
void |
changeMaxCapacity(int max)
|
void |
changeMinCapacity(int min)
|
int |
compareTo(ArcCompanion that)
|
int |
getPruningEvent(Var var)
Retrieves the consistency pruning event of a handler variable that causes the handler to be reevaluated. |
java.util.List<IntVar> |
listVariables()
|
void |
processEvent(IntVar variable,
MutableNetwork network)
Informs the handler that one of its variable has changed and asks the handler to update the state of the network accordingly. |
void |
restore(MutableNetwork network)
Restores the capacity and weight of the arc after backtracking. |
void |
setFlow(int flow)
Forces the flow to a given value (within capacity bounds). |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Arc arc
public int flowOffset
public IntVar xVar
public IntVar wVar
public DomainStructure structure
public int arcID
public int pruningScore
| Constructor Detail |
|---|
public ArcCompanion(Arc arc,
int offset)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Object
public void changeCapacity(int min,
int max)
min - the new lower capacitymax - the new upper capacitypublic void changeMinCapacity(int min)
public void changeMaxCapacity(int max)
public java.util.List<IntVar> listVariables()
listVariables in interface VarHandler
public void processEvent(IntVar variable,
MutableNetwork network)
VarHandler
processEvent in interface VarHandlervariable - the variable that changednetwork - the networkpublic void restore(MutableNetwork network)
network - the networkpublic void setFlow(int flow)
flow - the new flow valuepublic int getPruningEvent(Var var)
VarHandler
getPruningEvent in interface VarHandlervar - a handler variable
public int compareTo(ArcCompanion that)
compareTo in interface java.lang.Comparable<ArcCompanion>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||