-
Notifications
You must be signed in to change notification settings - Fork 143
Enhance energy model #201
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
base: develop
Are you sure you want to change the base?
Enhance energy model #201
Conversation
2bde98c to
1832f9a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
Hi, thank you for the contribution. I like the general idea this PR, I'll get to reviewing it as soon as I have addressed the previous PRs in the backlog. I merged the latest changes and I have hidden your comment with test results: we have a CI pipeline to take care of that without polluting the PR msg history. In the meantime you can update this PR by fixing eventual errors detected by the CI pipeline. |
|
Merged code with recent changes from @maribu |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #201 +/- ##
===========================================
+ Coverage 84.47% 84.60% +0.13%
===========================================
Files 67 68 +1
Lines 7016 7115 +99
===========================================
+ Hits 5927 6020 +93
- Misses 1089 1095 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…g ScheduleSwitchToOff inside HandleEnergyChanged to avoid nested calls
|
I find one problem but not sure how to deal with it: I put a TODO comment in SwitchToOff function. Please let me know if you have ideas. |
|
Removed the 'Auto schedule to switch off based on remaining energy' feature. Reason: Encountered floating-point comparison issues when reaching to 0 energy, which could lead to an assert failure due to subtle inaccuracies. This removal should not affect normal use cases because the BasicEnergySource class already includes a minimum energy threshold parameter (default value: 0.1×initialEnergy). Therefore, during normal simulation runs, the energy level will not typically reach a value close enough to zero to trigger the assert issue, and the simulation will stop safely beforehand. |
This pull request fixes issue #200
Proposed Changes