You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When agents ask for a route between two positions, it triggers a shortest path evaluation, and then a route_data evaluation using the shortest path.
The route data contains the intermediate points of the path, with the timestamp of each point.
When processing the route_data for generating the trace, we concatenate the path elements, while converting them to GPS localisation. We also add position from other events like InputEvent or PositionEvent.
All of this makes the Topology classes and their path methods hard to use outside of the simulation, and even inside, the route_data structure is not clearly defined.
Idea
We could implement a TopologyRoute class that represents a route in a given topology. When asked for a path, topologies would return an instance of TopologyRoute.
This class would store all of the route properties:
detailed path (list of nodes)
total length
total duration
timestamp and/or travel_time at each node
weight of the path using the Topology's NetworkWeight
It would also have methods like:
iteration : to iterate over the path nodes and the travel time between them, for agents to use
Agent routing is quite complicated right now.
When agents ask for a route between two positions, it triggers a shortest path evaluation, and then a route_data evaluation using the shortest path.
The route data contains the intermediate points of the path, with the timestamp of each point.
When processing the route_data for generating the trace, we concatenate the path elements, while converting them to GPS localisation. We also add position from other events like InputEvent or PositionEvent.
All of this makes the Topology classes and their path methods hard to use outside of the simulation, and even inside, the route_data structure is not clearly defined.
Idea
We could implement a TopologyRoute class that represents a route in a given topology. When asked for a path, topologies would return an instance of TopologyRoute.
This class would store all of the route properties:
It would also have methods like:
This class should be able to work on its own with a Topology instance. This would make external use and testing easier.
Replaced methods
The following methods of Topology would be replaced/moved/deleted:
Questions
The text was updated successfully, but these errors were encountered: