ifs.termination
Class GeneralTerminationCondition

java.lang.Object
  extended by ifs.termination.GeneralTerminationCondition
All Implemented Interfaces:
TerminationCondition

public class GeneralTerminationCondition
extends Object
implements TerminationCondition

General implementation of termination condition.

Solver stops when the solution is complete (all varaibles are assigned) or when a timeout is reached (expressed either by the number of iterations or by a time).

Parameters:

ParameterTypeComment
Termination.StopWhenCompleteDoubleif true, solver stops when a complete solution is found
Termination.MaxItersIntegerif zero or positive, solver stops when the given number of iteration is reached
Termination.TimeOutDoubleif zero or positive, solver stops when the given timeout (given in seconds) is reached

Version:
1.0
Author:
Tomáš Müller
See Also:
Solver

Field Summary
protected static Logger sLogger
           
 
Constructor Summary
GeneralTerminationCondition(DataProperties properties)
           
 
Method Summary
 boolean canContinue(Solution currentSolution)
          Returns true when the solver can continue with the next iteration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sLogger

protected static Logger sLogger
Constructor Detail

GeneralTerminationCondition

public GeneralTerminationCondition(DataProperties properties)
Method Detail

canContinue

public boolean canContinue(Solution currentSolution)
Description copied from interface: TerminationCondition
Returns true when the solver can continue with the next iteration

Specified by:
canContinue in interface TerminationCondition
Parameters:
currentSolution - current solution


Copyright © 2005 Tomáš Müller