spur-sim / spur

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

Add description of json file specifications #72

Open wklumpen opened 3 months ago

wklumpen commented 3 months ago

We should have a specific section in the documentation that outlines how each input file is structured.

wklumpen commented 3 months ago

One thing I wanted to check in on @peterlai1 was the structure of the tours.json files: Specifically, what are the order of the parameters in the routes list?

"routes": [
      {
        "name": "R-Westbound",
        "args": [
          {
            "departure": 20850
          },
          null,
          {
            "departure": 20975
          },
          null,
          {
            "departure": 21080
          },
          null,
          {
            "departure": 21193
          },
          null,
          {
            "departure": 21354
          }
        ]
   ...

I assume they are sequences of components but I just wanted to check that the "null" is read as "no parameters".

peterlai1 commented 2 months ago

Hi @wklumpen, yes the tour object contains a list of routes to traverse. Within each route instance, the args list correspond to the argument data objects to be applied to the components 1-1 in the order specified for the corresponding route in the routes.json file. null does mean "no parameters".