-
-
Notifications
You must be signed in to change notification settings - Fork 576
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
Time-based events in experiments #1839
Comments
I have been thinking a bit more on the implementation and I think this is the best syntax:
(the last one is to add some padding in case you want to repeat a cycle that lasts exactly 4 days). I guess the main questions are:
|
Adding to this issue, which format is preferable for the time stamps?
Note that the actual date format can change or we can allow for multiple options. I vote for option 1 or 2. Thoughts? |
First one is my favorite of those. We should definitely make use of the Experiment([
DatetimeStep(datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M"), "Discharge at 1C for 1 hour"),
DatetimeStep(datetime.strptime("21/11/06 20:30", "%d/%m/%y %H:%M"), "Charge at 1C for 1 hour"),
])
However, we could still allow
We should be pretty restrictive here, since we don't want to have to maintain code to read all kinds of different cases. I think the two options we should allow are 1. I know @awadell1 had some thoughts on this subject (making steps object instead of strings) |
Nice, I like the Where should the |
This function is so important that I can't wait for the formal confirmation of the syntax. |
Hi, sorry I missed your comment! There is no functionality to allow that for the time being, I am currently implementing it but I don't know how long it will take. |
A couple of questions:
Any thoughts on that? |
I think it should be added to the end of the current step, so that the number of steps in the solution is the same as the number of steps in the experiment, so that
Can you check all timestamps in the |
For the latter I ended up using |
* fix * fix exception * added a Newfile * pseudo * #1778 add heat of mixing option * #1778 fixed indentation * #1778 fixed test * #1778 fixed test * #1788 added heat of mixing tests * First commit * #1778 fixed test * First iteration * #1788 try to fix diff of U * first push from mac * Fixed full broadcast * Fixed domain in the integral * #1778 fix parameter values example * Added children[0].children[0] * Added half cell * style: pre-commit fixes * #1788 revert some unrelated changes * change ocv hack * Revert "change ocv hack" This reverts commit 3ad0c75. * #1778 fix heat of mixing * #1839 fix thermal submodels to take x_average * #1778 add example heat of mixing * ruff * style: pre-commit fixes * #1778 fix lead acid models * fix SPM with the right broadcast of temperature * #1778 refactor heat of mixing * style: pre-commit fixes * Add Richardson2021 citation for heat of mixing * Fixed heat of mixing sign * Rewritten heat of mixing example, added comparison plot to compare with the paper * Fixed ruff formatting errors in the heat of mixing example script * #1778 fix x-full * #1778 fix tests * #1778 improve coverage * style: pre-commit fixes * #1778 Valentin's suggestion to remove the dUdsto function and compute the derivative in the model directly instead * #1778 fix failing test * #1778 add heat of mixing to CHANGELOG --------- Co-authored-by: Alec Bills <48105066+abillscmu@users.noreply.github.com> Co-authored-by: smitasahu2 <smitasahuiitd@gmail.com> Co-authored-by: Afgr1087 <andres.galvis@fem.unicamp.br> Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk> Co-authored-by: Ivan Korotkin <i.korotkin@soton.ac.uk> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix * fix exception * added a Newfile * pseudo * pybamm-team#1778 add heat of mixing option * pybamm-team#1778 fixed indentation * pybamm-team#1778 fixed test * pybamm-team#1778 fixed test * pybamm-team#1788 added heat of mixing tests * First commit * pybamm-team#1778 fixed test * First iteration * pybamm-team#1788 try to fix diff of U * first push from mac * Fixed full broadcast * Fixed domain in the integral * pybamm-team#1778 fix parameter values example * Added children[0].children[0] * Added half cell * style: pre-commit fixes * pybamm-team#1788 revert some unrelated changes * change ocv hack * Revert "change ocv hack" This reverts commit 3ad0c75. * pybamm-team#1778 fix heat of mixing * pybamm-team#1839 fix thermal submodels to take x_average * pybamm-team#1778 add example heat of mixing * ruff * style: pre-commit fixes * pybamm-team#1778 fix lead acid models * fix SPM with the right broadcast of temperature * pybamm-team#1778 refactor heat of mixing * style: pre-commit fixes * Add Richardson2021 citation for heat of mixing * Fixed heat of mixing sign * Rewritten heat of mixing example, added comparison plot to compare with the paper * Fixed ruff formatting errors in the heat of mixing example script * pybamm-team#1778 fix x-full * pybamm-team#1778 fix tests * pybamm-team#1778 improve coverage * style: pre-commit fixes * pybamm-team#1778 Valentin's suggestion to remove the dUdsto function and compute the derivative in the model directly instead * pybamm-team#1778 fix failing test * pybamm-team#1778 add heat of mixing to CHANGELOG --------- Co-authored-by: Alec Bills <48105066+abillscmu@users.noreply.github.com> Co-authored-by: smitasahu2 <smitasahuiitd@gmail.com> Co-authored-by: Afgr1087 <andres.galvis@fem.unicamp.br> Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk> Co-authored-by: Ivan Korotkin <i.korotkin@soton.ac.uk> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Summary
Allow the definition of experiments based on actions happening at a given time which would be useful to simulate real usage scenarios. For example:
The idea is that the experiment would add the necessary resting periods before and after the first action (triggered by the "On ..." statement) but would run the third one immediately after the second one (no "On ..." statement).
What are your thoughts? Still not clear to me what would be the best way to pass dates and times (e.g do we want to work with absolute dates, or can we also set up "On day 1..."?
Motivation
This would allow the simulation of real usage scenarios for electric vehicles.
The text was updated successfully, but these errors were encountered: