railtoolkit / schema

This repo collects the descriptions of the structure and the validation constraints of tools in the railtoolkit in JSON schemas. It is, therefore, an alternative to RailML.
ISC License
1 stars 0 forks source link

Rolling Stock: Provide fall back acceleration values when needed #9

Open kaat0 opened 7 months ago

kaat0 commented 7 months ago

It might not be feasible to provide all attributes for acceleration and deceleration calculation for some rolling stock. Therefore, the rollingstock-schema should allow fallback values for acceleration, coasting and deceleration.

kaat0 commented 7 months ago

see also [#3]

kaat0 commented 3 months ago

The current idea is to optionally specify engine, brake and resistance data inside a vehicle for the dynamic calculation: vehicles:

vehicles:
  - id: test_vehicle
    type: "traction unit"
    engine: ...      # (optional)
    brakes: ...      # (optional)
    resistances: ... # (optional)
  - id: test_vehicle2
    type: "passenger"
    brakes: ...      # (optional)
    resistances: ... # (optional)

and the fixed optional fallback values inside a train:

trains:
  - id: test_train
    formation: [test_vehicle, test_vehicle2]
    substitutes: # auxiliary values for driving dynamics
      acceleration:  0.8 # m/s^2 (optional)
      deceleration: -0.4 # m/s^2 (optional)
      coasting:    -0.05 # m/s^2 (optional)
      length:     120.0  # m     (optional)

An open point about how code should behave if a vehicle with an engine is specified and an acceleration for the train. Should the engine overrule the acceleration?