|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRouter
The router contains the logic for route choice decisions. There is a router for people, and a separate one for vehicles.
| Method Summary | |
|---|---|
boolean |
activeAndReady()
Returns true if this router is ready to be used by agents |
void |
afterPluginOpen()
[Internal] Called after all plugins have been opened - some may choose to modify routing costs |
void |
afterRenew()
[Internal] Called after any module has been renewed |
IAgentLocator |
agentLocator(ITwig twig,
ITrip trip,
boolean useParked)
Set the initial location for the agent, if necessary using additional logic (such as lane choice) |
IBehaviour |
behaviour(int tableIndex)
Returns the behaviour that corresponds to the given table index |
void |
clearUnavailable()
Clear the table on the routing window showing unavailable routes |
void |
destroy()
[Internal] called when router is about to be destroyed, to discard resources and clean up memory |
double |
feedbackDecay()
Returns the route feedback decay parameter, a value between 0.0 and 1.0. |
void |
feedbackDecay(double d)
Set the feedback decay parameter |
UTime |
feedbackPeriod()
Returns the feedback interval time. |
void |
feedbackPeriod(UTime t)
Set the feedback interval time. |
double |
feedbackSmoothing()
Returns the route feedback smoothing parameter, a value between 0.0 and 1.0. |
void |
feedbackSmoothing(double d)
Set the feedback smoothing parameter |
void |
findPlaces()
Carry out walkway-inside-area and link-inside-zone tests, to determine the place, if any, for each twig. |
int |
lookAhead()
Returns the number of lookahead links, default is 1. |
void |
lookAhead(int choices)
Set the routing look ahead parameter |
ITwig |
lowestCostExit(ITrip trip,
ITwig twig)
Return the lowest cost exit for the given trip at the given location |
ITwig |
lowestCostExit(ITwig twig,
IPlace dest,
IBehaviour b)
Return the lowest cost exit to the given dest at the given location, for the given behaviour, using AON routing. |
ITwig |
lowestCostExit(ITwig twig,
IPlace dest,
IType type)
Return the lowest cost exit to the given dest at the given location, for the given type, using AON routing. |
int |
lowestCostExitIndex(ITrip trip,
ITwig twig)
Return the lowest cost exit Index for the given trip at the given location |
TripMode |
mode()
The mode of trip for this router |
int |
nTables()
Returns the number of separate route cost tables, equal to the number of behaviours |
void |
openTurn(ITwig link,
ITwig exit,
boolean open)
Open (or close) the turn at the given entry-exit pair. |
ITwig |
originTwig(ITrip trip,
boolean reportAllFailures)
Return the best departure location twig for the given trip |
ITwig |
originTwigSetImmediateDest(ITrip trip,
boolean reportAllFailures)
Return the best departure location twig for the given trip, and set the immediate destination index in the trip (either a gateway, if there are any, or the ultimate destination) |
void |
pluginClose()
[Internal] Called when plugins are closed |
void |
rebuildIfRequired()
Rebuild routes only if there has been a change to the routing origins and destinations, for example zones or areas have been added, moved or deleted. |
void |
rebuildNow()
Rebuild all routes now, regardless of any changes, but do not mark the router as ready for use by agents. |
void |
rebuildNow(boolean isReady)
Rebuild all routes now, regardless of any changes, and if isReady is true, mark the router as ready for use by agents. |
void |
rebuildOnSave()
Queue up a router rebuild on the next save operation |
void |
recalculate()
Recalculate the costs of routes from each twig to each destination. |
Price |
routeCost(ITwig twig,
IAgent agent)
Return the cost to the destination for the given agent from the given twig |
Price |
routeCost(ITwig twig,
int placeIndex,
int behaviourIndex)
Return the cost to the destination given by an index into the list of places, and a given behaviour index |
boolean |
routeExists(ITwig anyTwig,
IAgent agent)
Does a route exist from the given twig for the given agent. |
boolean |
routeExists(ITwig link,
ITwig exit,
IAgent agent)
Does a route exist given the pair of twigs, the first of which must be at the end of a limb, and the second must be at the start |
boolean |
signalised(ITwig twig)
Returns true if this twig is signalised |
int |
tableIndex(IType type)
Returns the table index (the behaviour index) for the given type |
Price |
turnCost(ITwig twig,
ITwig exit,
IAgent agent)
Return the cost of making the turn from twig to exit for the given agent |
UTime |
turnTime(ITwig entry,
ITwig exit,
IBehaviour behaviour)
Returns any turn-time object for the given entry-exit turn, and the given behaviour. |
| Methods inherited from interface com.azalient.api.event.model.ModelEventActionSelection |
|---|
actionSelection |
| Methods inherited from interface com.azalient.api.event.model.ModelEventTimeRewind |
|---|
timeRewind |
| Methods inherited from interface com.azalient.api.event.model.ModelEventTimeSec |
|---|
timeSec |
| Methods inherited from interface com.azalient.api.event.model.ModelEventTimeStep |
|---|
timeStep |
| Methods inherited from interface com.azalient.api.event.model.ModelEventViewModel |
|---|
viewModel |
| Methods inherited from interface com.azalient.api.event.model.ModelEventViewLegend |
|---|
viewLegend |
| Methods inherited from interface com.azalient.api.event.model.ModelEventSaveListener |
|---|
pluginSave |
| Methods inherited from interface com.azalient.api.event.agent.AgentEventDepart |
|---|
depart |
| Methods inherited from interface com.azalient.api.event.agent.AgentEventTestRoute |
|---|
testRoute |
| Method Detail |
|---|
TripMode mode()
void rebuildOnSave()
void rebuildIfRequired()
void rebuildNow()
void rebuildNow(boolean isReady)
This is a more compute-intensive operation than recalculate(), which assumes origins and destinations are unchanged in number and location.
void findPlaces()
void clearUnavailable()
void recalculate()
void openTurn(ITwig link,
ITwig exit,
boolean open)
ITwig lowestCostExit(ITwig twig,
IPlace dest,
IBehaviour b)
ITwig lowestCostExit(ITwig twig,
IPlace dest,
IType type)
ITwig lowestCostExit(ITrip trip,
ITwig twig)
int lowestCostExitIndex(ITrip trip,
ITwig twig)
boolean routeExists(ITwig anyTwig,
IAgent agent)
boolean routeExists(ITwig link,
ITwig exit,
IAgent agent)
Price routeCost(ITwig twig,
IAgent agent)
Price turnCost(ITwig twig,
ITwig exit,
IAgent agent)
Price routeCost(ITwig twig,
int placeIndex,
int behaviourIndex)
void afterPluginOpen()
void afterRenew()
void pluginClose()
ITwig originTwig(ITrip trip,
boolean reportAllFailures)
ITwig originTwigSetImmediateDest(ITrip trip,
boolean reportAllFailures)
IAgentLocator agentLocator(ITwig twig,
ITrip trip,
boolean useParked)
UTime feedbackPeriod()
double feedbackDecay()
double feedbackSmoothing()
int lookAhead()
void feedbackPeriod(UTime t)
feedbackPeriod()void feedbackDecay(double d)
feedbackDecay()void feedbackSmoothing(double d)
feedbackSmoothing()void lookAhead(int choices)
lookAhead()void destroy()
UTime turnTime(ITwig entry,
ITwig exit,
IBehaviour behaviour)
boolean activeAndReady()
boolean signalised(ITwig twig)
int nTables()
int tableIndex(IType type)
IBehaviour behaviour(int tableIndex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||