org.sat4j.minisat.restarts
Class MiniSATRestarts

java.lang.Object
  extended by org.sat4j.minisat.restarts.MiniSATRestarts
All Implemented Interfaces:
Serializable, ConflictTimer, RestartStrategy

public final class MiniSATRestarts
extends Object
implements RestartStrategy

Minisat original restart strategy.

Author:
leberre
See Also:
Serialized Form

Constructor Summary
MiniSATRestarts()
           
 
Method Summary
 SearchParams getSearchParams()
           
 void init(SearchParams theParams)
          Hook method called just before the search starts.
 void newConflict()
           
 void newLearnedClause(Constr learned, int trailLevel)
           
 long nextRestartNumberOfConflict()
          Ask for the next restart in number of conflicts.
 void onBackjumpToRootLevel()
          Called when the solver backjumps to the root level.
 void onRestart()
          Hook method called when a restart occurs (once the solver has backtracked to top decision level).
 void reset()
           
 boolean shouldRestart()
          Ask the strategy if the solver should restart.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MiniSATRestarts

public MiniSATRestarts()
Method Detail

init

public void init(SearchParams theParams)
Description copied from interface: RestartStrategy
Hook method called just before the search starts.

Specified by:
init in interface RestartStrategy
Parameters:
theParams - the user's search parameters.

nextRestartNumberOfConflict

public long nextRestartNumberOfConflict()
Description copied from interface: RestartStrategy
Ask for the next restart in number of conflicts. Deprecated since 2.3.2

Specified by:
nextRestartNumberOfConflict in interface RestartStrategy
Returns:
the delay in conflicts before the next restart.

onRestart

public void onRestart()
Description copied from interface: RestartStrategy
Hook method called when a restart occurs (once the solver has backtracked to top decision level).

Specified by:
onRestart in interface RestartStrategy

toString

public String toString()
Overrides:
toString in class Object

shouldRestart

public boolean shouldRestart()
Description copied from interface: RestartStrategy
Ask the strategy if the solver should restart.

Specified by:
shouldRestart in interface RestartStrategy
Returns:
true if the solver should restart, else false.

onBackjumpToRootLevel

public void onBackjumpToRootLevel()
Description copied from interface: RestartStrategy
Called when the solver backjumps to the root level.

Specified by:
onBackjumpToRootLevel in interface RestartStrategy

reset

public void reset()
Specified by:
reset in interface ConflictTimer

newConflict

public void newConflict()
Specified by:
newConflict in interface ConflictTimer

getSearchParams

public SearchParams getSearchParams()
Specified by:
getSearchParams in interface RestartStrategy

newLearnedClause

public void newLearnedClause(Constr learned,
                             int trailLevel)
Specified by:
newLearnedClause in interface RestartStrategy


Copyright © 2012 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.