Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve sim speed #144

Merged
merged 10 commits into from
Oct 25, 2024
Merged

Solve sim speed #144

merged 10 commits into from
Oct 25, 2024

Conversation

GeraldoSJr
Copy link
Contributor

  • I certify that this PR does not contain any code that has been generated with GitHub Copilot or any other AI-based code generation tool, in accordance with this project's policies.

Description

This PR fix the issue Run simulation at different speeds by adding a argument, sim_step_duration, to the cli and passing this argument to the run_trace function and allowing the simulation to run on this speed instead of the fixed timestamp speed specified on the trace.

Testing done

  • How did you test your changes? Manually deployed the code and ran simulation with different parameters and speeds to measure the impact of the fix.
  • Does this code require any new tests to be written? No.

Additional info

Resolves #76

@drmorr0
Copy link
Contributor

drmorr0 commented Oct 23, 2024

Updating Kubernetes DAG...

Please wait until the job has finished.

Copy link
Contributor

@drmorr0 drmorr0 left a comment

Choose a reason for hiding this comment

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

Hi, @GeraldoSJr, thank you for the PR! Can you please update code changes so that instead of using a "stepwise" function, the speed is controlled by a constant factor? I.e.,

let sleep_duration = max(0, (next_ts - sim_ts) / speed_factor);

This way we're guaranteed that, with a speed factor of 2, that the simulation will run exactly twice as fast.

.gitignore Outdated Show resolved Hide resolved
@GeraldoSJr
Copy link
Contributor Author

Added the changes requested, that was actually my innitial approach, changed midway to resolve the issue more directly, anyways, hope this will solve it now. Just wanted to say that I'm excited to start helping in the repo, really nice project! 👍

Copy link
Contributor

@drmorr0 drmorr0 left a comment

Choose a reason for hiding this comment

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

Hi -- a few small changes, but this is basically there. Thanks!

Makefile Outdated Show resolved Hide resolved
sk-driver/src/runner.rs Outdated Show resolved Hide resolved
sk-driver/src/runner.rs Outdated Show resolved Hide resolved
@drmorr0 drmorr0 merged commit cd337e0 into acrlabs:master Oct 25, 2024
1 check passed
@GeraldoSJr GeraldoSJr deleted the solve-sim-speed branch October 28, 2024 02:03
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.

Run simulations at different speeds
2 participants