choco.kernel.common.opres.heuristics
Class AbstractHeuristic

java.lang.Object
  extended by choco.kernel.common.opres.heuristics.AbstractHeuristic
All Implemented Interfaces:
IHeuristic, ISolutionDisplay, IOptimizationMeasures, ISolutionMeasures
Direct Known Subclasses:
AbstractHeuristic1BP, CompositeHeuristics1BP

public abstract class AbstractHeuristic
extends Object
implements IHeuristic


Field Summary
 
Fields inherited from interface choco.kernel.common.opres.heuristics.IHeuristic
LOGGER
 
Constructor Summary
AbstractHeuristic()
           
 
Method Summary
protected abstract  int apply()
           
 void execute()
           
 void executeQuick()
           
 boolean existsSolution()
          indicates if the search find at least one solution.
 int getIterationCount()
          get computation time in seconds
 int getNumberOfBins()
           
 Number getObjectiveValue()
          Get the best objective value of a solution.
 int getSolutionCount()
          Get the solution count of the measure
 double getTimeCount()
          get computation time in seconds
 boolean hasSearched()
          indicates if the algorithm was executed
 boolean isObjectiveOptimal()
           
 void reset()
           
 String solutionToString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHeuristic

public AbstractHeuristic()
Method Detail

reset

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

isObjectiveOptimal

public boolean isObjectiveOptimal()
Specified by:
isObjectiveOptimal in interface IOptimizationMeasures

getIterationCount

public int getIterationCount()
Description copied from interface: IHeuristic
get computation time in seconds

Specified by:
getIterationCount in interface IHeuristic

getSolutionCount

public int getSolutionCount()
Description copied from interface: ISolutionMeasures
Get the solution count of the measure

Specified by:
getSolutionCount in interface ISolutionMeasures
Returns:
solution count

execute

public final void execute()
Specified by:
execute in interface IHeuristic

executeQuick

public final void executeQuick()

apply

protected abstract int apply()

getNumberOfBins

public final int getNumberOfBins()

getObjectiveValue

public final Number getObjectiveValue()
Description copied from interface: IOptimizationMeasures
Get the best objective value of a solution.

Specified by:
getObjectiveValue in interface IOptimizationMeasures

getTimeCount

public final double getTimeCount()
Description copied from interface: IHeuristic
get computation time in seconds

Specified by:
getTimeCount in interface IHeuristic

hasSearched

public final boolean hasSearched()
Description copied from interface: IHeuristic
indicates if the algorithm was executed

Specified by:
hasSearched in interface IHeuristic
Returns:
true if a solution was found

existsSolution

public boolean existsSolution()
Description copied from interface: ISolutionMeasures
indicates if the search find at least one solution.

Specified by:
existsSolution in interface ISolutionMeasures

solutionToString

public String solutionToString()
Specified by:
solutionToString in interface ISolutionDisplay


Copyright © 2012. All Rights Reserved.