choco.palm.dbt.search
Class PalmState

java.lang.Object
  extended by choco.palm.dbt.search.PalmAbstractSolverTool
      extended by choco.palm.dbt.search.PalmState
Direct Known Subclasses:
TraceState

public class PalmState
extends PalmAbstractSolverTool

Tool for maintaining the state of the search taht is the active posted decision constraint.


Field Summary
protected static java.util.logging.Logger logger
           
protected  PalmExplanation path
          The current state.
 
Fields inherited from class choco.palm.dbt.search.PalmAbstractSolverTool
manager
 
Constructor Summary
PalmState(PalmExplanation expl)
          Initializes the PalmState with the specified explain.
 
Method Summary
 void addDecision(AbstractConstraint constraint)
          Adds a new decision constraints in the state.
 boolean discardCurrentSolution()
          Discards the current solutions in order to find the next one : it raises a fake contradiction and tries repairing the state.
 PalmExplanation getPath()
           
 void removeDecision(AbstractConstraint constraint)
          Removes a decision constraint.
 void reverseDecision(AbstractConstraint constraint)
          Reverses a decision constraint.
 
Methods inherited from class choco.palm.dbt.search.PalmAbstractSolverTool
getManager, setManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final java.util.logging.Logger logger

path

protected PalmExplanation path
The current state.

Constructor Detail

PalmState

public PalmState(PalmExplanation expl)
Initializes the PalmState with the specified explain.

Parameters:
expl - The initial state.
Method Detail

getPath

public PalmExplanation getPath()

addDecision

public void addDecision(AbstractConstraint constraint)
Adds a new decision constraints in the state.

Parameters:
constraint - New decision constraint posted.

reverseDecision

public void reverseDecision(AbstractConstraint constraint)
Reverses a decision constraint. (The difference with removing is that it does not call the learning tool).

Parameters:
constraint - The constraint to reverse.

removeDecision

public void removeDecision(AbstractConstraint constraint)
Removes a decision constraint.

Parameters:
constraint - The involved constraint.

discardCurrentSolution

public boolean discardCurrentSolution()
Discards the current solutions in order to find the next one : it raises a fake contradiction and tries repairing the state.