|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aima.gui.framework.AgentAppController aima.gui.applications.search.map.AbstractMapAgentController
public abstract class AbstractMapAgentController
Provides a useful base class for agent application controller implementations
in the context of route planning agent application development. To get it
ready to work, all you need to do is, to provide implementations for the four
abstract methods. See RoutePlanningAgentAppDemo
for an example.
Field Summary | |
---|---|
protected java.util.List<java.lang.String> |
destinations
Some location names. |
protected AdaptableHeuristicFunction |
heuristic
Heuristic function to be used when performing informed search. |
protected Scenario |
scenario
A scenario. |
protected Search |
search
Search method to be used. |
Fields inherited from class aima.gui.framework.AgentAppController |
---|
frame, model |
Constructor Summary | |
---|---|
AbstractMapAgentController()
|
Method Summary | |
---|---|
void |
clearAgent()
Clears the model's tour history. |
protected abstract AdaptableHeuristicFunction |
createHeuristic(int heuIdx)
Factory method, responsible for creating a heuristic function. |
void |
prepareAgent()
Template method, which performs necessary preparations for running the agent. |
protected abstract void |
prepareModel()
Primitive operation, responsible for preparing the model. |
void |
runAgent()
Template method, which calls startAgent() and then updates the
status bar of the frame. |
protected abstract void |
selectScenarioAndDest(int scenarioIdx,
int destIdx)
Primitive operation, responsible for assigning values to attributes scenario and destinations . |
protected abstract void |
startAgent()
Primitive operation, responsible for creating and starting the agent. |
Methods inherited from class aima.gui.framework.AgentAppController |
---|
setFrame, setModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Scenario scenario
protected java.util.List<java.lang.String> destinations
protected Search search
protected AdaptableHeuristicFunction heuristic
Constructor Detail |
---|
public AbstractMapAgentController()
Method Detail |
---|
public void clearAgent()
clearAgent
in interface AgentAppFrame.Controller
clearAgent
in class AgentAppController
public void prepareAgent()
selectScenarioAndDest(int, int)
, prepareModel()
and
createHeuristic(int)
.
prepareAgent
in interface AgentAppFrame.Controller
prepareAgent
in class AgentAppController
public void runAgent()
startAgent()
and then updates the
status bar of the frame.
runAgent
in interface AgentAppFrame.Controller
runAgent
in class AgentAppController
protected abstract void selectScenarioAndDest(int scenarioIdx, int destIdx)
scenario
and destinations
.
protected abstract void prepareModel()
protected abstract AdaptableHeuristicFunction createHeuristic(int heuIdx)
protected abstract void startAgent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |