This class represents a route taken by a traveller. It will describe a set of edges which represents the path. The time taken will also be recorded. To represent human error, rather than implementing an algorithm that always find the optimal route, a sub-optimal pathing algorithm could be intentionally implemented.
Private attributes:
destinationDistance - in the range of 0-1, this represents the proportion down the edge the building is located. Used for spawning and UI.
Public attributes:
path - this is the list of edges that take the traveller from start to finish. It should be composed of pointers to edges.
startTick - the tick when the path is created and a journey is startes.
endTick - the simulation tick that occurs when the traveller reachs the terminal building.
terminalBuilding - pointer to the building this path terminates at.
startBuilding - pointer to the building the path starts at.
traveller - pointer to the traveller this path was used by.
Functionality:
Appropriate getter/setter functions
generatePath - this function should take 3 arguments; startBuilding, terminalBuilding, traveller. It should create a path from startBuilding to terminalBuilding, ideally entropy should be included in path generation to simulate human error. Attributes should be updated as appropriate. For the time being implement djikastras, see the description of junction and edge functionality for the acquisition of the map / graph.
Note this is a placeholder, and this function is defined in its own card.
endPath - once the terminalBuilding has been reached, endTick must be updated to the current simulation tick.
Hi oscarrilot I am adding a line
// Pass the generated path to the traveler traveller.spawnAtStartingPoint(this);
to pass the path list to the traveller class
Overview:
This class represents a route taken by a traveller. It will describe a set of edges which represents the path. The time taken will also be recorded. To represent human error, rather than implementing an algorithm that always find the optimal route, a sub-optimal pathing algorithm could be intentionally implemented.
Private attributes:
Public attributes:
Functionality:
Specified by: Ted Proctor
Implemented by: Oscar Rilot, Scott Deverine
Validated by:
┆Issue is synchronized with this Trello card by Unito ┆Attachments: path-functionality | Edge.cs: