Skip to content

[Discussion] Improve state and event logging #157

@nreinicke

Description

@nreinicke

For both state and event logs, at each time step, we log the reports to a log file that we open at the start of the simulation.

Each of these reports get written to the logs as a single json line like the below for a vehicle state event.

{"vehicle_id": "v13", "memberships": "", "vehicle_state": "ChargingStation", "balance": 511.2542478929938, "distance_traveled_km": 340.20714338784205, "energy_ELECTRIC": 13.58399203772548, "link_link_id": "176107959-176080957", "link_geoid": "8f268cdacadc186", "sim_time": "1970-01-01T17:51:00", "report_type": "VEHICLE_STATE"}

Some downsides of this approach are:

  • performance hit writing to file at each time step
  • difficulty parsing the results afterwards since each entry into the log can have different entries for different report types
  • large file sizes for big simulations

This issue is intended as a discussion for ways to improve the reporting and then we can implement more issues for the ideas that come from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions