|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mil.af.afit.uvr.HSolver
HSolver
s take the information given to the HEngine
and try to solve the problem of servicing orders with vehicles. Solvers have
access to a list of good starting solutions generated by a heuristic developed
by Gary Kinney at the Air Force Institute of Technology (www.afit.af.mil).
HOrder
,
HVehicle
Constructor Summary | |
HSolver()
|
Method Summary | |
void |
addHSolverListener(mil.af.afit.uvr.HSolverListener listener)
Add a listener to the solver. |
void |
fireNewBestSolutionEvent()
This method should be called when a new best solution is found. |
void |
fireSolverFinishedEvent()
This method should be called when the solver has finished working. |
void |
fireSolverPercentDoneEvent()
This method should be called periodically to keep the user up to date on the solver's progress. |
void |
fireSolverStartedEvent()
This should be called when the solver starts solving. |
abstract HSolution |
getBestHSolution()
Return the best solution found so far. |
abstract java.lang.String |
getCredits()
Credits for the solver (authors, etc). |
abstract java.lang.String |
getLongDescription()
Long description of the solver. |
abstract java.lang.String |
getName()
Name of the solver |
float |
getPercentDone()
Return the percent done for the solver, between zero and one. |
abstract java.lang.String |
getShortDescription()
Short description of the solver. |
abstract java.lang.String |
getVersion()
Version of the solver |
abstract void |
initializeSolver(HSolution[] solutions,
HEvaluator evaluator,
double requestedSolutionEffort,
int numberOfThreads)
Called when the HEngine has started solving. |
void |
removeHSolverListener(mil.af.afit.uvr.HSolverListener listener)
Remove a listener from the solver. |
abstract boolean |
requestsStartingSolutions()
If true, the HEngine will generate a list of good
starting solutions based on a heuristic developed by Gary Kinney
for the Air Force Institute of Technology
(www.afit.af.mil). |
void |
setPercentDone(float percentDone)
Call to set the percent done for the solver, between zero and one. |
abstract void |
startSolving()
Called when the HEngine is ready for the solver to start. |
abstract void |
stopSolving()
Stop the solver as soon as possible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HSolver()
Method Detail |
public abstract java.lang.String getName()
public abstract java.lang.String getShortDescription()
public abstract java.lang.String getLongDescription()
public abstract java.lang.String getCredits()
public abstract java.lang.String getVersion()
public abstract void stopSolving()
fireSolverFinishedEvent
.HSolverEvent
public abstract boolean requestsStartingSolutions()
HEngine
will generate a list of good
starting solutions based on a heuristic developed by Gary Kinney
for the Air Force Institute of Technology
(www.afit.af.mil).HEngine
public abstract void initializeSolver(HSolution[] solutions, HEvaluator evaluator, double requestedSolutionEffort, int numberOfThreads)
HEngine
has started solving. The
solutions array will either be the starting solutions,
if requested, or a single solution with all orders in the dummy tour.solutions
- starting solution(s)evaluator
- evaluator to use with the solutionsrequestedSolutionEffort
- effort requested by the user in the range of zero to onenumberOfThreads
- suggested number of threads to useHSolution
,
HEvaluator
public abstract void startSolving()
HEngine
is ready for the solver to start.
It is not necessary to return immediate control because the method is
called from within a thread dedicated to calling this method.public abstract HSolution getBestHSolution()
HSolution
public final void setPercentDone(float percentDone)
percentDone
- percent done, between zero and onepublic final float getPercentDone()
public final void addHSolverListener(mil.af.afit.uvr.HSolverListener listener)
listener
- the listener to notify of solver eventsHSolverListener
,
HSolverEvent
public final void removeHSolverListener(mil.af.afit.uvr.HSolverListener listener)
listener
- the listener which will no longer
receive solver eventsHSolverListener
,
HSolverEvent
public final void fireSolverStartedEvent()
HSolverListener
,
HSolverEvent
public final void fireSolverFinishedEvent()
HSolverListener
,
HSolverEvent
public final void fireSolverPercentDoneEvent()
percentDone
- percent completedHSolverListener
,
HSolverEvent
public final void fireNewBestSolutionEvent()
percentDone
- percent completedHSolverListener
,
HSolverEvent
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |