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 experiment with drive cycle #1793

Merged
merged 15 commits into from
Nov 10, 2021

Conversation

brosaplanella
Copy link
Sponsor Member

@brosaplanella brosaplanella commented Nov 9, 2021

Description

Experiments now allow to solve for drive cycles.

Fixes #1788 and includes #1524

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.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

alibh95 and others added 6 commits April 29, 2021 01:45
This commit simulates drive cycle ('A' or 'V' or 'W') in experiment only if drive cycle of particular type is initial instruction in experiment and there are no further drive cycle related instructions.
@brosaplanella
Copy link
Sponsor Member Author

@alibh95 for some reason I can't request a review from you, but please take a look.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

thanks for taking this on @brosaplanella

examples/scripts/experiment_drive_cycle.py Outdated Show resolved Hide resolved
examples/scripts/experiment_drive_cycle.py Outdated Show resolved Hide resolved
examples/scripts/experiment_drive_cycle.py Outdated Show resolved Hide resolved
pybamm/simulation.py Outdated Show resolved Hide resolved
pybamm/solvers/base_solver.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #1793 (1f6c1f9) into develop (884d6e9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1793   +/-   ##
========================================
  Coverage    99.28%   99.29%           
========================================
  Files          343      343           
  Lines        18945    18966   +21     
========================================
+ Hits         18810    18832   +22     
+ Misses         135      134    -1     
Impacted Files Coverage Δ
pybamm/experiments/experiment.py 100.00% <100.00%> (ø)
pybamm/simulation.py 98.34% <100.00%> (+0.29%) ⬆️
pybamm/solvers/base_solver.py 99.34% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 884d6e9...1f6c1f9. Read the comment docs.

@alibh95
Copy link
Contributor

alibh95 commented Nov 10, 2021

@alibh95 for some reason I can't request a review from you, but please take a look.

Looks good to me. Thank you so much for implementing this.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Looks good, cheers

@brosaplanella brosaplanella merged commit 283d5a6 into develop Nov 10, 2021
@brosaplanella brosaplanella deleted the issue-1788-solve-experiment-drive-cycle branch November 10, 2021 16:00
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.

Drive cycle in experiment syntax?
3 participants