Skip to content

79 new simulator results file has wrong index#80

Merged
FelixStege merged 5 commits intomainfrom
79-new-simulator-results-file-has-wrong-index
Jan 20, 2026
Merged

79 new simulator results file has wrong index#80
FelixStege merged 5 commits intomainfrom
79-new-simulator-results-file-has-wrong-index

Conversation

@FelixStege
Copy link
Contributor

Fixes the simulator results bug due to the changes caused by splitting t_sample.

@FelixStege FelixStege self-assigned this Jan 9, 2026
@FelixStege FelixStege linked an issue Jan 9, 2026 that may be closed by this pull request
@PatrickHenkel1 PatrickHenkel1 self-requested a review January 13, 2026 08:13
@FelixStege FelixStege added the bug Something isn't working label Jan 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #79 by fixing a simulator results bug that emerged after the splitting of t_sample into separate t_sample_communication and t_sample_simulation parameters. The fix involves a major refactoring of the SimulatorResults class and the Simulator.process() method to properly handle timing and indexing of simulation results.

Changes:

  • Refactored SimulatorResults from a simple data holder to a stateful dataclass that explicitly tracks inputs, outputs, and timing
  • Introduced a new capture_all_inputs configuration option (defaults to True) to control when input changes are recorded
  • Reorganized the simulation loop in process() to separate input logging, simulation stepping, output logging, and disk writing
  • Added type hints to create_time_samples() utility function

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
agentlib/modules/simulation/simulator.py Major refactoring of SimulatorResults and Simulator classes to fix result indexing bug; added capture_all_inputs feature
agentlib/utils/init.py Added type hints to create_time_samples function
examples/multi-agent-systems/room_mas/t_sample_simulation_demonstration.py Updated example to demonstrate new capture_all_inputs feature and configure result filenames

@FelixStege FelixStege merged commit 27af08d into main Jan 20, 2026
16 checks passed
@FelixStege FelixStege deleted the 79-new-simulator-results-file-has-wrong-index branch February 26, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New simulator results file has wrong index

3 participants