Skip to content

fix: Avg. Tasks/Shift update live - #985

Closed
Michael-Mezzacappa wants to merge 0 commit into
mainfrom
bugfix/977-change-average-tasks-serviced-per-shift
Closed

fix: Avg. Tasks/Shift update live#985
Michael-Mezzacappa wants to merge 0 commit into
mainfrom
bugfix/977-change-average-tasks-serviced-per-shift

Conversation

@Michael-Mezzacappa

Copy link
Copy Markdown
Collaborator

Proposed Changes:

Real-time average tasks serviced per active driver metric

Details:

  • tasks_completed_per_shift changed from list[int] (recorded once per shift end) to an int counter incremented immediately when a task is serviced
  • get_average_tasks_per_shift() now takes active_driver_count and returns total_tasks_completed / active_driver_count, giving a live rolling average across all drivers currently on the map
  • Active driver count is computed each frame, excluding drivers in OFF_SHIFT or PENDING_SHIFT states
  • replay_parser.py handles backwards compatibility, old keyframes that stored this as a list are coerced to an int via summation on restore

Related Issues:

@Michael-Mezzacappa
Michael-Mezzacappa force-pushed the bugfix/977-change-average-tasks-serviced-per-shift branch from 88ca278 to 7d01ba4 Compare April 12, 2026 01:29
@Jpuntul Jpuntul added bug Something isn't working simulator Issues related to Simulator labels Apr 12, 2026
@Niravanaa Niravanaa changed the title bugfix: Avg. Tasks/Shift update live #977 fix: Avg. Tasks/Shift update live Apr 12, 2026

@cmezzac cmezzac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything looks good! Testing functionality and is accurate.

Resume functionality also works with this!

Comment thread sim/core/simulation_report.py Outdated
Comment thread sim/core/simulation_report.py Outdated
@Niravanaa Niravanaa added back-end Issues related to back-end. labels Apr 13, 2026
@Michael-Mezzacappa
Michael-Mezzacappa force-pushed the bugfix/977-change-average-tasks-serviced-per-shift branch from f855bff to 7d01ba4 Compare April 13, 2026 21:28
@Michael-Mezzacappa
Michael-Mezzacappa force-pushed the bugfix/977-change-average-tasks-serviced-per-shift branch from a4a7d74 to 9b58882 Compare April 13, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

back-end Issues related to back-end. bug Something isn't working simulator Issues related to Simulator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change Average Tasks Serviced Per Shift

4 participants