public class Regular extends Constraint implements UsesQueueVariable, Stateful, RemoveLevelLate
Modifier and Type | Field and Description |
---|---|
static boolean |
debugAll
It specifies if debugging information should be printed out.
|
Map<Integer,String> |
dNames
dNames contain a "name" for each value from the union of all variabl's domains.
|
FSM |
fsm
It specifies finite state machine used by this regular.
|
String |
latexFile
Name of the file to store the latex output after consistency call
The output will be : file_name + "call number" + ".tex"
|
IntVar[] |
list
Array of the variables of the graph levels.
|
boolean |
listRepresentation
It specifies if the edges should have a list of values associated with them.
|
boolean |
oneSupport
It specifies if the support functionality should be used.
|
boolean |
optimizedMDD
It specifies if the translation of FSM into optimized MDD should take place so
minimal layered graph can be obtained.
|
static boolean |
saveAllToLatex
It specifies if constraint description should be saved to latex for later viewing.
|
Map<Integer,RegEdge>[] |
supports
It keeps for each variable value pair a current support.
|
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
queueIndex
Constructor and Description |
---|
Regular(FSM fsm,
IntVar[] list)
Constructor need Store to initialize the time-stamps.
|
Modifier and Type | Method and Description |
---|---|
void |
consistency(Store store)
It is a (most probably incomplete) consistency function which removes the
values from variables domains.
|
List<Constraint> |
decompose(Store store)
It returns an array list of constraint which are used to decompose this
constraint.
|
void |
disableState(int level,
int pos)
It marks state as being not active.
|
int |
getDefaultConsistencyPruningEvent() |
RegState |
getState(int level,
int id)
Find the state with the corresponding id.
|
void |
impose(Store store)
It imposes the constraint in a given store.
|
void |
imposeDecomposition(Store store)
It imposes the decomposition of the given constraint in a given store.
|
void |
pruneArc(int varIndex)
Collects the damaged states, after pruning the domain of variable "var",
and put these states in two separated sets.
|
void |
queueVariable(int level,
Var var)
This is a function called to indicate which variable in a scope of
constraint has changed.
|
void |
removeLevel(int level)
This function is called in case of the backtrack, so a constraint can
clear the queue of changed variables which is no longer valid.
|
void |
removeLevelLate(int level)
Sweep the graph upon backtracking.
|
void |
saveLatexToFile(String desc)
It saves the constraint latex description into file.
|
void |
setLatexBaseFileName(String filename)
It sets the filename for the file which is used to save latex descriptions.
|
String |
toLatex(String addDescription)
It creates a latex description of the constraint state.
|
String |
toString()
It produces a string representation of a constraint state.
|
int |
unreachBackwardLoop(int sucPrevLimit,
int level)
It does backward check to remove inactive edges and states.
|
void |
unreachForwardLoop(int end,
int level)
Forward part deletes the outgoing edges of the damaged state and watch whether
the successors are still active (in-degree > 0 ), otherwise we collect it and
continue the loop.
|
void |
uppendToLatexFile(String desc,
String fileName)
It appends latex description of the constraint current state to the specified filename.
|
afc, arguments, cleanAfterFailure, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, increaseWeight, intArrayToString, long2int, numberArgs, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGrounded
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isStateful
public static final boolean debugAll
public static final boolean saveAllToLatex
public final boolean optimizedMDD
public String latexFile
public Map<Integer,String> dNames
public Map<Integer,RegEdge>[] supports
public boolean listRepresentation
public boolean oneSupport
public FSM fsm
public IntVar[] list
public RegState getState(int level, int id)
level
- specifies the variable for which the state is seeked for.id
- specifies the id of the state.public void pruneArc(int varIndex)
One with the states with zero incoming degree - these are the candidates for the forward part. The other set consists of states with zero out-coming degree - these are the candidates for backward part.
varIndex
- the index of the variable which have changed.public int unreachBackwardLoop(int sucPrevLimit, int level)
sucPrevLimit
- previous number of states at a given level.level
- level for which the backward sweep is computed.public void unreachForwardLoop(int end, int level)
end
- the position of the last active state at a given level.level
- level being examined.public void disableState(int level, int pos)
level
- level at which the state is residing.pos
- position of the state in the array of states.public void removeLevel(int level)
Stateful
removeLevel
in interface Stateful
level
- the level which is being removed.public void removeLevelLate(int level)
removeLevelLate
in interface RemoveLevelLate
level
- the level which is being removed.public void queueVariable(int level, Var var)
Constraint
queueVariable
in class Constraint
level
- the level of the store at which the change has occurred.var
- variable which has changed.public void consistency(Store store)
Constraint
consistency
in class Constraint
store
- constraint store within which the constraint consistency is being checked.public void impose(Store store)
Constraint
impose
in class Constraint
store
- the constraint store to which the constraint is imposed to.public int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent
in class Constraint
public String toString()
Constraint
toString
in class Constraint
public void imposeDecomposition(Store store)
Constraint
imposeDecomposition
in class Constraint
store
- the constraint store to which the constraint is imposed to.public List<Constraint> decompose(Store store)
Constraint
decompose
in class Constraint
store
- the constraint store in which context the decomposition takes place.public String toLatex(String addDescription)
addDescription
- added description.public void saveLatexToFile(String desc)
desc
- description of the constraintpublic void setLatexBaseFileName(String filename)
filename
- the name of the fileCopyright © 2022. All rights reserved.