79 new simulator results file has wrong index#80
Merged
FelixStege merged 5 commits intomainfrom Jan 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
SimulatorResultsfrom a simple data holder to a stateful dataclass that explicitly tracks inputs, outputs, and timing - Introduced a new
capture_all_inputsconfiguration 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 |
examples/multi-agent-systems/room_mas/t_sample_simulation_demonstration.py
Outdated
Show resolved
Hide resolved
PatrickHenkel1
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the simulator results bug due to the changes caused by splitting t_sample.