Skip to content

feat: log run parameters for plotting modules#40

Merged
stedrew merged 11 commits intodenoslab:mainfrom
legend5teve:feat/visualization-module-plots
Mar 13, 2026
Merged

feat: log run parameters for plotting modules#40
stedrew merged 11 commits intodenoslab:mainfrom
legend5teve:feat/visualization-module-plots

Conversation

@legend5teve
Copy link
Collaborator

@legend5teve legend5teve commented Mar 11, 2026

Summary

  • persist companion run_params_*.json files so plotting tools can recover messaging controls and driver-briefing thresholds per run
  • teach the plotting scripts to load companion parameter logs, annotate run/communication figures, and recover sweep metadata in metrics-only comparison mode
  • keep the KPI dashboard on separate scales and add targeted tests for the new parameter-aware plotting behavior

Validation

  • pytest -q tests/test_run_parameters.py tests/test_plot_run_metrics.py tests/test_plot_agent_communication.py tests/test_plot_experiment_comparison.py tests/test_plot_agent_round_timeline.py tests/test_plot_all_run_artifacts.py

legend5teve and others added 10 commits March 5, 2026 16:05
 Changes to be committed:
	modified:   agentevac/simulation/main.py
	modified:   agentevac/simulation/spawn_events.py
	modified:   agentevac/utils/replay.py
	modified:   sumo/Repaired.netecfg
	modified:   sumo/Repaired.sumocfg
  Module updated: agentevac/utils/replay.py

  - Fixed RouteReplay._load_schedule(...) so it only reads step and veh_id for replayable events:
      - route_change
      - departure_release
  - Non-replayable events like agent_cognition and metrics_snapshot are now ignored without touching veh_id.

  Cause

  - The loader was accessing rec["veh_id"] before checking the event type.
  - metrics_snapshot records do not have veh_id, so replay loading crashed with KeyError.

  Verification

  1. python3 -m py_compile agentevac/utils/replay.py passed.
  2. Reproduced the failing case with a small local script:

  - one route_change
  - one agent_cognition
  - one metrics_snapshot
  - replay load now succeeds and only indexes the route-change step.
@legend5teve legend5teve changed the title chore: update plotting scales according to actual KPI scales feat: log run parameters for plotting modules Mar 11, 2026
Copy link
Contributor

@stedrew stedrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@legend5teve Remember to also update docs and docstrings.

@stedrew stedrew merged commit f99d992 into denoslab:main Mar 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants