|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.constraints.global.tree.filtering.RemovalsAdvisor
public class RemovalsAdvisor
Field Summary | |
---|---|
protected boolean |
affiche
boolean for debug and show a trace of the execution |
protected boolean |
afficheRemovals
boolean that allow to display the removals trace |
protected boolean |
compatible
check the compatibility of the udpate according to the constraint itself |
protected boolean |
filter
true iff at least one valur is removed from the domain of a variable |
protected BitSet[] |
graphRem
a bitset matrix that record the set of arcs to remove |
protected static Logger |
LOGGER
|
protected int |
maxObjective
upper bound of the objective cost |
protected int |
maxprop
upper bound of the number of proper trees |
protected int[] |
maxStart
table of the maximum starting time from each node |
protected int |
maxtree
upper bound of the number of trees |
protected int |
minObjective
lower bound of the objective cost |
protected int |
minprop
lower bound of the number of proper trees |
protected int[] |
minStart
table of the minimum starting time from each node |
protected int |
mintree
lower bound of the number of trees |
protected int |
nbNodes
total number of nodes involved in the graph |
protected Node[] |
nodes
|
protected Solver |
solver
Choco solver embedding the tree constraint |
protected StructuresAdvisor |
struct
structure advisor |
protected TreeSConstraint |
treeConst
the tree constraint object that allow to access to the Choco solver functions like fail() |
protected TreeParameters |
treeParams
attributes |
protected boolean |
updateNprop
true iff the nproper variable is updated |
protected boolean |
updateNtree
true iff the ntree variable is updated |
protected boolean |
updateObjective
true iff the objective variable is updated |
protected boolean |
updateStart
true iff a starting time from a node is updated |
Constructor Summary | |
---|---|
RemovalsAdvisor(Solver solver,
TreeSConstraint treeConst,
TreeParameters treeParams,
StructuresAdvisor struct)
|
Method Summary | |
---|---|
void |
addRemoval(int[] arc)
|
BitSet[] |
getGraphRem()
|
void |
initialise()
initialize the attributes of this class according to the current state of the variables |
boolean |
isFilter()
|
void |
setMaxNProper(int val)
update the upper bound of the nproper variable with the value val |
void |
setMaxNtree(int val)
update the upper bound of the ntree variable with the value val |
void |
setMaxObjective(int val)
update the upper bound of the objective variable with the value val |
void |
setMaxStart(int idx,
int max)
update the upper bound of the node idx with the value max |
void |
setMinNProper(int val)
update the lower bound of the nproper variable with the value val |
void |
setMinNtree(int val)
update the lower bound of the ntree variable with the value val |
void |
setMinObjective(int val)
update the lower bound of the objective variable with the value val |
void |
setMinStart(int idx,
int min)
update the lower bound of the node idx with the value min |
void |
startRemovals()
main method that synchronize the recorded value removals with the corresponding variables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected boolean affiche
protected boolean afficheRemovals
protected boolean compatible
protected int nbNodes
protected Solver solver
protected TreeSConstraint treeConst
fail()
protected TreeParameters treeParams
protected Node[] nodes
protected StructuresAdvisor struct
protected int mintree
protected int maxtree
protected int minprop
protected int maxprop
protected int[] minStart
protected int[] maxStart
protected int minObjective
protected int maxObjective
protected BitSet[] graphRem
protected boolean updateNtree
protected boolean updateNprop
protected boolean updateObjective
protected boolean updateStart
protected boolean filter
Constructor Detail |
---|
public RemovalsAdvisor(Solver solver, TreeSConstraint treeConst, TreeParameters treeParams, StructuresAdvisor struct)
solver
- the Choco problem who uses the current tree constraint.treeConst
- the current Choco constraint (because we have to access to constraints primitives)treeParams
- the input data structure available in the structure.inputStructure
package.struct
- the advisor of the internal data structuresMethod Detail |
---|
public void initialise()
public void startRemovals() throws ContradictionException
ContradictionException
public BitSet[] getGraphRem()
public void addRemoval(int[] arc)
arc
- add the arc in the removal structurepublic void setMinStart(int idx, int min)
idx
- idx of the nodemin
- new lower bound of the starting timepublic void setMaxStart(int idx, int max)
idx
- idx of the nodemax
- new upper bound of the starting timepublic void setMaxNtree(int val) throws ContradictionException
val
- new upper bound of the ntree variable
ContradictionException
public void setMinNtree(int val) throws ContradictionException
val
- new lower bound of the ntree variable
ContradictionException
public void setMaxNProper(int val) throws ContradictionException
val
- new upper bound of the nproper variable
ContradictionException
public void setMinNProper(int val) throws ContradictionException
val
- new lower bound of the nproper variable
ContradictionException
public void setMaxObjective(int val) throws ContradictionException
val
- new upper bound of the objective variable
ContradictionException
public void setMinObjective(int val) throws ContradictionException
val
- new lower bound of the objective variable
ContradictionException
public boolean isFilter()
true
iff a value has been removed from the domain of a variable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |