-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
Experiment Drive Cycle with Events #1304
Conversation
Added the functionality of simulating drive cycles in Experiment class along with 'for' Event. If the time specified in 'for event is less than the drive cycle time, the drive cycle is stoped at the time specified in 'for' event. Else If the time specified in 'for event is greater than the drive cycle time, the drive cycle first extended for 1 week and then stoped at the time specified in 'for' event.
Codecov Report
@@ Coverage Diff @@
## develop #1304 +/- ##
===========================================
- Coverage 98.28% 98.27% -0.01%
===========================================
Files 280 280
Lines 16165 16198 +33
===========================================
+ Hits 15887 15918 +31
- Misses 278 280 +2
Continue to review full report at Codecov.
|
Hi @alibh95! The errors in the MacOs tests should now be fixed if you merge in the develop branch. Let me know if the PR is ready to be reviewed. |
Hi @alibh95! What's the state of this PR? |
Hi @brosaplanella . This pull request successfully simulates drive cycles using experiment class. The implementation of for event have been completed. The drive cycle is clipped or extended depending upon the time period provided in the for event. |
Hi @alibh95 , thanks for taking this on. We're going to implement this slightly differently in the simulation now that #1408 allows a better approach. Still, what you have added to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alibh95 , looks good now. We're about to do a release, I will wait until that is done before merging as otherwise it might be confusing why you can specify a drive cycle in the experiment but not solve it
@all-contributors add @alibh95 for code, tests |
@tinosulzer I've put up a pull request to add @alibh95! 🎉 |
Description
Added the functionality of simulating drive cycles in Experiment class along with the 'for' event.
If the time specified in the 'for' event is less than the drive cycle time, then the drive cycle is stopped at the time specified in the 'for' event.
Else If the time specified in the 'for' event is greater than the drive cycle time, the drive cycle first extended for one week and then stopped at the time specified in the 'for' event.
Fixes # (issue)
#1193
#1293 (Can extend single and/or multiple drive cycles for long time durations)
Note:
I am new to GitHub. I was not able to manage my previous pull request (#1279) effectively. Therefore, I am opening this new pull request. I am sorry for any inconvenience I caused.
Warning
In this PR, Only the Experiment class is modified to support drive cycle functionality. This functionality is not actually implemented in Simulation yet.
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: