spur-sim / spur

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

Unique component and agent ID enforcement #10

Closed wklumpen closed 2 years ago

wklumpen commented 3 years ago

All BaseItem objects that are created should be handled by the Model class. This will allow the Model class to track and enforce requirements for unique component IDs and unique train/agent IDs.

wklumpen commented 2 years ago

Turns out this is only really relevant for train IDs, as routes are named and components are attached to a unique NetworkX edge (and can be replaced with new ones as needed).