|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
choco.cp.solver.constraints.global.automata.fast_multicostregular.SoftMultiCostRegular
public class SoftMultiCostRegular
Created by IntelliJ IDEA. User: julien Date: Apr 27, 2010 Time: 11:04:12 AM
Field Summary | |
---|---|
int[] |
lastLp
The last computed Longest Path |
double |
lastLpValue
|
int[] |
lastSp
The last computed Shortest Path |
double |
lastSpValue
|
gnu.trove.TObjectIntHashMap<IntDomainVar> |
map
Map to retrieve rapidly the index of a given variable. |
protected gnu.trove.TIntStack |
toRemove
Stack to store removed edges index, for delayed update |
protected gnu.trove.TIntStack[] |
toUpdateLeft
|
protected gnu.trove.TIntStack[] |
toUpdateRight
|
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
cIndices, constraintType, extensions, vars |
Fields inherited from class choco.kernel.solver.propagation.Propagator |
---|
active, constAwakeEvent, priority, propagationEngine |
Fields inherited from interface choco.kernel.solver.constraints.SConstraint |
---|
LOGGER |
Constructor Summary | |
---|---|
SoftMultiCostRegular(IntDomainVar[] x,
IntDomainVar[] y,
IntDomainVar[] z,
IntDomainVar Z,
int[] indexes,
IPenaltyFunction[] f,
IAutomaton pi,
int[][][][] costs,
CPSolver solver)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int idx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int idx,
int val)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
void |
boundChange(int idx)
|
boolean |
check()
|
boolean |
check(int[] word)
|
void |
checkWorld()
|
protected boolean |
delayedGraphUpdate()
Updates the graphs w.r.t. the caught event during event-based propagation |
int |
getFilteredEventMask(int idx)
|
SoftStoredMultiValuedDirectedMultiGraph |
getGraph()
|
double[] |
getInstantiatedLayerCosts(int layer)
|
int[] |
getMinMaxPathCostForAssignment(int col,
int val,
int... resources)
|
int |
getMinPathCost(int... resources)
|
int |
getMinPathCostForAssignment(int col,
int val,
int... resources)
|
void |
initGraph()
|
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
void |
makeTableConstraints()
|
boolean |
needPropagation()
|
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
boolean |
updateViolationLB()
|
boolean |
updateViolationUB()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnRemovals, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final gnu.trove.TObjectIntHashMap<IntDomainVar> map
public int[] lastSp
public double lastSpValue
public int[] lastLp
public double lastLpValue
protected final gnu.trove.TIntStack toRemove
protected final gnu.trove.TIntStack[] toUpdateLeft
protected final gnu.trove.TIntStack[] toUpdateRight
Constructor Detail |
---|
public SoftMultiCostRegular(IntDomainVar[] x, IntDomainVar[] y, IntDomainVar[] z, IntDomainVar Z, int[] indexes, IPenaltyFunction[] f, IAutomaton pi, int[][][][] costs, CPSolver solver)
Method Detail |
---|
public void initGraph()
public boolean updateViolationLB() throws ContradictionException
ContradictionException
public boolean updateViolationUB() throws ContradictionException
ContradictionException
public void makeTableConstraints() throws ContradictionException
ContradictionException
public void checkWorld() throws ContradictionException
ContradictionException
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void awakeOnRem(int idx, int val) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInst(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInst
in interface IntPropagator
awakeOnInst
in class AbstractIntSConstraint
ContradictionException
public void awakeOnSup(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnSup
in interface IntPropagator
awakeOnSup
in class AbstractIntSConstraint
ContradictionException
public void awakeOnInf(int idx) throws ContradictionException
AbstractIntSConstraint
awakeOnInf
in interface IntPropagator
awakeOnInf
in class AbstractIntSConstraint
ContradictionException
public void boundChange(int idx)
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionprotected boolean delayedGraphUpdate() throws ContradictionException
ContradictionException
- if removing an edge causes a domain to be emptiedpublic int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public boolean check()
public boolean check(int[] word)
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public final boolean needPropagation()
public SoftStoredMultiValuedDirectedMultiGraph getGraph()
public int getMinPathCostForAssignment(int col, int val, int... resources)
public int[] getMinMaxPathCostForAssignment(int col, int val, int... resources)
public int getMinPathCost(int... resources)
public double[] getInstantiatedLayerCosts(int layer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |