spur-sim / spur

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

Randomness #13

Closed wklumpen closed 3 years ago

wklumpen commented 3 years ago

As randomness is a core aspect of the system, and an important aspect of modelling, components should have some form of randomness modelling. My suggestion is to build a system that will model "jitter" around a central value (either a mean travel time or a calculated travel time). This effectively creates perturbations in the system cause by whatever might be causing it and allows us to also model directly things like delay logs in the system (add a +400 second jitter or whatever).

Most of this can be accomplished through the use of helper functions, that allow us to add jitter sampled from theoretical distributions.

wklumpen commented 3 years ago

This should probably be done with a template/abstract Jitter class or object that can be passed as part of the model structure, and therefore extended.