-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Type of Driving Cycle ('A', 'V', 'W') in Experiment Class #1457
Conversation
Modified the experiment.py file to process the type of driving cycle ('A', 'V', 'W') in the operating condition string as suggested by @tinosulzer .
Hi @alibh95, I was also working on this issue and most of the code in this PR is almost the same (even better I'd say) as the one I added in my local files, one addition that I had that is missing here was a value error for the user if the type of data is not specified. Something like this - raise ValueError(
"""type of data provided using a drive cycle should be
specified using 'A', 'V' or 'W'.
For example: {}
""".format(
examples
)
) Maybe we can add something like this? As, for example, if an experiment
because of the absence of a specifier like |
@tinosulzer to create an interpolant in the experiment class, we have to pass the model into it. |
@Saransh-cpp I didn't know that you were also working on this part of #1193. That's a great suggestion to raise error if the type of driving cycle is not provided. |
Codecov Report
@@ Coverage Diff @@
## develop #1457 +/- ##
===========================================
+ Coverage 98.27% 98.36% +0.09%
===========================================
Files 280 281 +1
Lines 16198 16523 +325
===========================================
+ Hits 15918 16253 +335
+ Misses 280 270 -10
Continue to review full report at Codecov.
|
Ok - good point about where you can define the interpolant. In that case you should also store the time points to pass to the simulation so it can create the interpolant |
@tinosulzer Kindly review this PR. |
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 , merging
Description
The experiment.py file is modified to read the operating conditions string which includes the type of driving cycle ('A', 'V', 'W').
This change is suggested by @tinosulzer in #1193.
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: