Skip to content

feat: implement timeline analysis for evacuation in scripts/plot_agent_round_timeline.py#38

Merged
legend5teve merged 5 commits intodenoslab:mainfrom
legend5teve:feat/visualization-module-plots
Mar 9, 2026
Merged

feat: implement timeline analysis for evacuation in scripts/plot_agent_round_timeline.py#38
legend5teve merged 5 commits intodenoslab:mainfrom
legend5teve:feat/visualization-module-plots

Conversation

@legend5teve
Copy link
Collaborator

Summary

  • add reusable plotting scripts for run metrics, timelines, experiment comparison, and agent communication
  • add a wrapper script to generate the standard visualization set for a run in one command
  • document the plotting workflow and matplotlib extra in the README and package metadata

Validation

  • python3 -m py_compile scripts/_plot_common.py scripts/plot_run_metrics.py scripts/plot_departure_timeline.py scripts/plot_experiment_comparison.py scripts/plot_agent_communication.py scripts/plot_all_run_artifacts.py
  • python3 scripts/plot_run_metrics.py --help
  • python3 scripts/plot_departure_timeline.py --help
  • python3 scripts/plot_experiment_comparison.py --help
  • python3 scripts/plot_agent_communication.py --help
  • python3 scripts/plot_all_run_artifacts.py --help

legend5teve and others added 5 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 merged commit 9f70935 into denoslab:main Mar 9, 2026
1 check passed
@legend5teve legend5teve changed the title feat: optimize the visualization module for plotting statistic results and agent communication feat: implement timeline analysis for evacuation in scripts/plot_agent_round_timeline.py Mar 11, 2026
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.

1 participant