|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.common.logger.AbstractLogger
public abstract class AbstractLogger
The AbstractLogger triggers its refinement on specific events
dependent on the iteration and evaluation count. Each AbstractLogger
has to listen to the be registered as listener of the Optimizer (
Opt4JModule.addOptimizerStateListener(Class) and
Opt4JModule.addOptimizerIterationListener(Class)) and the state of
the Individual (Opt4JModule.addIndividualStateListener(Class)
.
| Field Summary | |
|---|---|
protected java.util.concurrent.atomic.AtomicInteger |
evaluationCount
|
protected int |
evaluationCountLast
|
protected int |
evaluationStep
|
protected boolean |
isFirst
|
protected int |
iterationStep
|
| Constructor Summary | |
|---|---|
AbstractLogger(int iterationStep,
int evaluationStep)
Constructs an AbstractLogger. |
|
| Method Summary | |
|---|---|
void |
inidividualStateChanged(Individual individual)
Invoked if the Individual changes its state. |
void |
iterationComplete(int iteration)
Invoked if the Optimizer completes an iteration. |
abstract void |
logEvent(int iteration,
int evaluation)
Callback method called if the specific number of iterations or evaluations is reached. |
abstract void |
logHeader(java.util.Collection<Objective> objectives)
Writes the header. |
abstract void |
optimizationStarted()
Callback method invoked once the optimization starts. |
void |
optimizationStarted(Optimizer optimizer)
Invoked if the Optimizer starts the optimization process. |
abstract void |
optimizationStopped()
Callback method invoked once the optimization stops. |
void |
optimizationStopped(Optimizer optimizer)
Invoked if the Optimizer stops the optimization process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int iterationStep
protected final int evaluationStep
protected final java.util.concurrent.atomic.AtomicInteger evaluationCount
protected boolean isFirst
protected int evaluationCountLast
| Constructor Detail |
|---|
public AbstractLogger(int iterationStep,
int evaluationStep)
AbstractLogger.
iterationStep - the number of iterations between two logging eventsevaluationStep - the number of evaluations between two logging events| Method Detail |
|---|
public abstract void logEvent(int iteration,
int evaluation)
iteration - the current iteration numberevaluation - the current evaluation numberpublic abstract void logHeader(java.util.Collection<Objective> objectives)
objectives - a collection of objectivespublic abstract void optimizationStarted()
public abstract void optimizationStopped()
public void iterationComplete(int iteration)
OptimizerIterationListenerOptimizer completes an iteration.
iterationComplete in interface OptimizerIterationListeneriteration - the completed iterationpublic void optimizationStarted(Optimizer optimizer)
OptimizerStateListenerOptimizer starts the optimization process.
optimizationStarted in interface OptimizerStateListeneroptimizer - the optimizerpublic void optimizationStopped(Optimizer optimizer)
OptimizerStateListenerOptimizer stops the optimization process.
optimizationStopped in interface OptimizerStateListeneroptimizer - the optimizerpublic void inidividualStateChanged(Individual individual)
IndividualStateListenerIndividual changes its state.
inidividualStateChanged in interface IndividualStateListenerindividual - the individual that changes the state
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||