|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.coinor.opents.TabuSearchBase
This abstract class implements TabuSearch
and defines the event-handling methods
including the add/remove methods and package-level fireXxx methods.
It is the base class for the MultiThreadedTabuSearch
and SingleThreadedTabuSearch
.
This code is licensed for public use under the Common Public License version 0.5.
The Common Public License, developed by IBM and modeled after their industry-friendly IBM Public License,
differs from other common open source licenses in several important ways:
Copyright © 2001 Robert Harder
Constructor Summary | |
TabuSearchBase()
|
Method Summary | |
void |
addTabuSearchListener(TabuSearchListener listener)
Registers listener to receive tabu events when a new best solution is found. |
protected void |
fireImprovingMoveMade()
This quick method is called when an improving move is made. |
protected void |
fireNewBestSolution()
This quick method is called when a new best solution is found. |
protected void |
fireNewCurrentSolution()
This quick method is called when a new current solution is found. |
protected void |
fireNoChangeInValueMoveMade()
This quick method is called when a no change in value move is made. |
protected void |
fireTabuSearchStarted()
This quick method is called when the tabuSearch starts. |
protected void |
fireTabuSearchStopped()
This quick method is called when the tabuSearch finishes. |
protected void |
fireUnimprovingMoveMade()
This quick method is called when an unimproving move is made. |
int |
getIterationsCompleted()
Returns the total number iterations that have been completed since the instantiation of this TabuSearch . |
protected void |
incrementIterationsCompleted()
Increments the number of iterations completed by one. |
void |
removeTabuSearchListener(TabuSearchListener listener)
Removes listener from list of objects to notify when a new best solution is found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.coinor.opents.TabuSearch |
getAspirationCriteria, getBestSolution, getCurrentSolution, getIterationsToGo, getMoveManager, getObjectiveFunction, getTabuList, isChooseFirstImprovingMove, isMaximizing, isSolving, setAspirationCriteria, setBestSolution, setChooseFirstImprovingMove, setCurrentSolution, setIterationsToGo, setMaximizing, setMoveManager, setObjectiveFunction, setTabuList, startSolving, stopSolving |
Constructor Detail |
public TabuSearchBase()
Method Detail |
public int getIterationsCompleted()
TabuSearch
.
getIterationsCompleted
in interface TabuSearch
protected void incrementIterationsCompleted()
TabuSearchBase
at the end of an iteration.
public final void addTabuSearchListener(TabuSearchListener listener)
addTabuSearchListener
in interface TabuSearch
listener
- The TabuSearchListener
to register.TabuSearchListener
public final void removeTabuSearchListener(TabuSearchListener listener)
removeTabuSearchListener
in interface TabuSearch
listener
- TabuSearchListener
to remove from notification list.TabuSearchListener
protected final void fireNewBestSolution()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireNewCurrentSolution()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireUnimprovingMoveMade()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireImprovingMoveMade()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireNoChangeInValueMoveMade()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireTabuSearchStopped()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
protected final void fireTabuSearchStarted()
TabuSearchEvent
sent to the listeners is a
"lightweight" event, specifying only the source object,
this.
TabuSearchEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |