spur-sim / spur

Simulation for Planning and Understanding Railways
MIT License
9 stars 4 forks source link

Add function to log current state of trains #64

Open wklumpen opened 1 year ago

wklumpen commented 1 year ago

Add a function to output/log the current location of trains. This is especially useful after a simulation has finished to extend waiting/stopped trains through to the end of the simulation time. It could also be used to check-in at any specific time to add data points where desired.

Proposed function call: model.log_current_state()

Proposed behaviour: Output the location of each vehicle into the agent log file, with a specific key indicating that this is not a check in or out event. I'd suggest something like LOC