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

Adds Voronoi cost landscape plot #531

Merged
merged 15 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#531](https://github.com/pybop-team/PyBOP/pull/531) - Adds Voronoi optimiser surface plot (`pybop.plot.surface`) for fast optimiser aligned cost visualisation.
- [#532](https://github.com/pybop-team/PyBOP/issues/532) - Adds `linked_parameters` example script which shows how to update linked parameters during design optimisation.
- [#529](https://github.com/pybop-team/PyBOP/issues/529) - Adds `GravimetricPowerDensity` and `VolumetricPowerDensity` costs, along with the mathjax extension for Sphinx.

Expand All @@ -15,6 +16,7 @@

## Breaking Changes

- [#531](https://github.com/pybop-team/PyBOP/pull/531) - Plot methods moved to `pybop.plot` with mostly minimal renaming. For example, `pybop.plot_parameters` is now `pybop.plot.parameters`. Other breaking changes include: `pybop.plot2d` to `pybop.plot.contour`.
- [#526](https://github.com/pybop-team/PyBOP/pull/526) - Refactor `OptimisationResults` classes, with `optim.run()` now return the full object. Adds finite cost value check for optimised parameters.

# [v24.9.1](https://github.com/pybop-team/PyBOP/tree/v24.9.0) - 2024-09-16
Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def pytest_addoption(parser):
"--examples", action="store_true", default=False, help="run examples tests"
)
parser.addoption(
"--plots", action="store_true", default=False, help="run plotting tests"
"--plots", action="store_true", default=False, help="run plot tests"
)
parser.addoption(
"--notebooks", action="store_true", default=False, help="run notebook tests"
Expand Down
71 changes: 18 additions & 53 deletions examples/notebooks/adamw_identification.ipynb

Large diffs are not rendered by default.

67 changes: 48 additions & 19 deletions examples/notebooks/comparing_cost_functions.ipynb

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions examples/notebooks/cost_compute_methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@
"id": "1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note: you may need to restart the kernel to use updated packages.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -53,7 +74,7 @@
"\n",
"import pybop\n",
"\n",
"pybop.PlotlyManager().pio.renderers.default = \"notebook_connected\""
"pybop.plot.PlotlyManager().pio.renderers.default = \"notebook_connected\""
]
},
{
Expand Down Expand Up @@ -364,7 +385,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
28 changes: 24 additions & 4 deletions examples/notebooks/creating_a_model.ipynb

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions examples/notebooks/ecm_trust-constr.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions examples/notebooks/electrode_balancing.ipynb

Large diffs are not rendered by default.

50 changes: 38 additions & 12 deletions examples/notebooks/energy_based_electrode_design.ipynb

Large diffs are not rendered by default.

46 changes: 33 additions & 13 deletions examples/notebooks/equivalent_circuit_identification.ipynb

Large diffs are not rendered by default.

52 changes: 34 additions & 18 deletions examples/notebooks/equivalent_circuit_identification_hppc.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

90 changes: 56 additions & 34 deletions examples/notebooks/maximum_a_posteriori.ipynb

Large diffs are not rendered by default.

63 changes: 46 additions & 17 deletions examples/notebooks/multi_model_identification.ipynb

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions examples/notebooks/multi_optimiser_identification.ipynb

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions examples/notebooks/optimiser_calibration.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/notebooks/optimiser_interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
Expand All @@ -36,7 +36,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
Expand All @@ -56,7 +56,7 @@
"\n",
"import pybop\n",
"\n",
"pybop.PlotlyManager().pio.renderers.default = \"notebook_connected\""
"pybop.plot.PlotlyManager().pio.renderers.default = \"notebook_connected\""
]
},
{
Expand Down Expand Up @@ -281,7 +281,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
53 changes: 23 additions & 30 deletions examples/notebooks/pouch_cell_identification.ipynb

Large diffs are not rendered by default.

53 changes: 31 additions & 22 deletions examples/notebooks/single_pulse_circuit_model.ipynb

Large diffs are not rendered by default.

32 changes: 19 additions & 13 deletions examples/notebooks/solver_selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,21 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note: you may need to restart the kernel to use updated packages.\n",
"/Users/engs2510/Documents/Git/PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
"Note: you may need to restart the kernel to use updated packages.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/engs2510/Documents/Git/Second_PyBOP/.nox/notebooks-overwrite/bin/python3: No module named pip\r\n"
]
},
{
Expand All @@ -62,7 +68,7 @@
"\n",
"import pybop\n",
"\n",
"pybop.PlotlyManager().pio.renderers.default = \"notebook_connected\""
"pybop.plot.PlotlyManager().pio.renderers.default = \"notebook_connected\""
]
},
{
Expand Down Expand Up @@ -188,28 +194,28 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Time Evaluate IDA KLU solver: 0.303\n"
"Time Evaluate IDA KLU solver: 0.306\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time Evaluate CasADi solver with 'safe' mode: 1.076\n"
"Time Evaluate CasADi solver with 'safe' mode: 1.097\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time Evaluate CasADi solver with 'fast' mode: 1.003\n"
"Time Evaluate CasADi solver with 'fast' mode: 1.090\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time Evaluate CasADi solver with 'fast with events' mode: 1.008\n"
"Time Evaluate CasADi solver with 'fast with events' mode: 0.915\n"
]
}
],
Expand Down Expand Up @@ -242,28 +248,28 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Time EvaluateS1 IDA KLU solver: 0.671\n"
"Time EvaluateS1 IDA KLU solver: 0.622\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time EvaluateS1 CasADi solver with 'safe' mode: 4.479\n"
"Time EvaluateS1 CasADi solver with 'safe' mode: 3.886\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time EvaluateS1 CasADi solver with 'fast' mode: 3.440\n"
"Time EvaluateS1 CasADi solver with 'fast' mode: 3.498\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time EvaluateS1 CasADi solver with 'fast with events' mode: 3.287\n"
"Time EvaluateS1 CasADi solver with 'fast with events' mode: 3.475\n"
]
}
],
Expand Down Expand Up @@ -305,7 +311,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
Loading
Loading