org.sat4j.minisat.restarts
Class NoRestarts

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

public final class NoRestarts
extends Object
implements RestartStrategy

Disable restarts in the solver.

Author:
leberre
See Also:
Serialized Form

Constructor Summary
NoRestarts()
           
 
Method Summary
 SearchParams getSearchParams()
           
 void init(SearchParams params)
          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

NoRestarts

public NoRestarts()
Method Detail

init

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

Specified by:
init in interface RestartStrategy
Parameters:
params - 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

reset

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

newConflict

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

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

toString

public String toString()
Overrides:
toString in class Object

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.