It4innovations / ruth

GNU General Public License v3.0
2 stars 1 forks source link

Use `ruth.simulator.Simulation` object also as an input #12

Open msurkovsky opened 1 year ago

msurkovsky commented 1 year ago

Currently the input is a pandas.DataFrame with a state of all vehicles. This file is at the beginning used to initialise the Simulation. In case the Simulation will be used as input as well, the user interface would be more intuitive. Moreover, the Simulation also stores the used map, hence the simulation state would be tight with the map together. This avoids usage different version of data in map and input file as the map if not present is downloaded from OSM.

msurkovsky commented 1 year ago

@paulo308 this is not an onboarding task. It is neither difficult, but it involves changes over several files. Nevertheless, all functionality is already there and it is just about reorganisation of several functions.

It is not high-priority. But it is a good refactoring task which unifies the user API of ruth-simulator (no need of --continue-from option) and provides the unified input. Moreover, it tights together the version of used map with simulation data. If this two are misaligned it causes some weird errors; therefore, transfer of date among different computers will be less error prone.

I did this tightening several weeks ago to have single input for visualisation of traffic flow. Now when I'm thinking about it, it would be great to have the same in the simulator.