Published May 13, 2026
| Version v26.4.3
Software
Open
Python Battery Mathematical Modelling (PyBaMM)
Authors/Creators
Description
v26.4.3 - 2026-05-12
Bug fixes
ProcessedVariableComputed.__init__now defers the heavyinitialise_*work (numpy concatenate/flatten, xarrayDataArraybuild) untilentriesor_xr_data_arrayis actually read. On a 500-cycle SPM withoutput_variablesset andsave_at_cycles=N, solve wall time dropped from ~30 s to ~2.5 s (~12×); per-step__init__cost dropped from 47% of solve to 1.7%.IDAKLUSolvernow recordsSolution.closest_event_idxafter a SUNDIALS root return, soBaseSolver.get_termination_reasoncan short-circuit instead of re-walking every TERMINATION event's symbolic expression on the Python side. On a 1000-cycle SPM withoutput_variablesset, cumulative allocations dropped 25% (~445 MB) and wall time 16%; the eliminated path was hot in long event-terminated cycling experiments. (#5502)- Fixed
Serialise.serialise_experiment/deserialise_experimentdropping every constructor argument other than per-stepvalue/duration/terminations/temperature. The top-levelperiod,temperature, andterminationarguments topybamm.Experimentand the per-stepperiod,tags,description,start_time,direction, andskip_okarguments toBaseStepare now written byto_config()and parsed back byfrom_config(), so JSON round-tripped experiments preserve user intent. TheResistancestep type was also missing from the deserialiser's step-type map and now round-trips correctly. - Fixed
Serialise.load_custom_modelreconstructingEvent.event_typeas the bare enum name string (e.g."TERMINATION") instead of the correspondingEventTypemember. The custom JSON encoder writes Enum values as their.name, but the loader was passing the string straight through topybamm.Event.__init__, so models round-tripped throughto_json/from_jsoncarried string event types rather thanEventTypeenum values. (#5498) - Fixed
Serialise.serialise_solversilently droppingroot_method(and any other nestedBaseSolver__init__argument). After construction,root_methodis aBaseSolverinstance rather than the original string, so it failedjson.dumpsand was omitted from the config — making the deserialised solver fall back to the default.to_config()/from_config()now recurse into nested solver values, preservingroot_methodand its tolerances across the round-trip. (#5497) - Fixed
Serialise.serialise_experimentsilently dropping per-steptemperatureoverrides. The JSON-config round-trip viaExperiment.to_config()/Experiment.from_config()now preservestemperaturefor current, voltage, power, c-rate, and rest steps. (#5496) - Fixed
Serialise._to_json_safecoercing Pythonboolvalues to0/1ints becauseboolis a subclass ofint.IDAKLUSolver.to_config()now emits its bool options (compile,print_stats,silence_sundials_errors, etc.) as JSONtrue/falseso they round-trip through strict-bool deserialisers. (#5495)
Notes
Files
pybamm-team/PyBaMM-v26.4.3.zip
Files
(10.0 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:a748780d8316a541b65d1cd0adddcf8c
|
10.0 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/pybamm-team/PyBaMM/tree/v26.4.3 (URL)
Software
- Repository URL
- https://github.com/pybamm-team/PyBaMM