Recent Releases of Pywr
Pywr - v1.30.0
🚀 Features
- Support Python 3.14. (#1169)
- Add optional support for Rds and RData files. (#1175)
- Allow MultiModel JSON documents to contain embedded models. (#1177)
- Support path-like objects in Model.load (#1174)
- Improve MultiModel load function signatures. (#1178)
- Add optional "tags" dictionary to AbstractNode. (#1180)
- Add TablesRecorder2 that saves additional attributes for nodes (#1179)
🐛 Bug Fixes
- Check if a node is a LossLink in AnnualVirtualStorage to prevent GPLK exception (#1170)
- Use raw string for docs with backslash. (#1176)
⚙️ Miscellaneous Tasks
- Pin Pandas<3 (#1173)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk 3 months ago
Pywr - 1.28.0
⚙️ Miscellaneous Tasks
- Pyproject.toml and build modernisation. (#1156)
- Use Python 3.11 for cibuildwheel jobs. (#1159)
- Upgrade GLPK to v5.0 on Windows and Linux. (#1160)
- Remove unused pyparsing import in tests.
- Make dev a depdency group instead of an optional extra.
Natural Resources - Water Supply and Quality
- Python
Published by jetuk 11 months ago
Pywr - v1.27.0
🚀 Features
- Fallback to loading from values or tables. (#1133)
- Allow a columns attribute to be sepecified for tables and dataframes (#1140)
⚙️ Miscellaneous Tasks
- Upgrade upload-artifact and download-artifact to v4 (#1141)
- Drop support for Python 3.9 (#1145)
- Numpy v2 support. (#1144)
- (release) Update changelog for 1.27.0 release.
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 1 year ago
Pywr - v1.24.0
Features
- Cache file hashes to avoid recomputation when the same file is referenced multiple times (#1118) (4afc270)
Fixes
- update warnings check in orphaned components test (#1119) (582a764)
Other
- black formatting updates (#1119) (7d1b60c)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk about 2 years ago
Pywr - v1.22.0
v1.22.0 (2023-10-06)
Other
- Updates for Python 3.12 in CI (#1107) (a0924ea), closes #1107
- Support Cython 3.x (#1104) (1981de1), closes #1104
- Add Zulip link to README. (#1108) (651e949), closes #1108
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 2 years ago
Pywr - v1.22.0
v1.21.0 (2023-06-30)
Features
- Pass kwargs to model load via optimisation wrappers (#1096) (3557e4b)
- Add metadata to TablesRecorder arrays. (#1083) (4dac394)
Fixes
- Overload get_xxx_flow for PiecewiseLink. (#1088) (51dcd57), closes #1087
- Add pywr.parameter imports from control_curves module. (#1084) (94bcdad)
Other
- Support pandas v2.x (#1089) (68ee7cc)
- Use ubuntu-latest image for building wheels. (#1090) (cce65e3)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk almost 3 years ago
Pywr - v1.20.0
v1.20.0
New Features
- Allow storage max volume to be set as a constant parameter without specifying both initial volume and initial volume pc. (#1071)
- Add timestep offset to
DataFrameParameterandTablesArrayParameter. (#1073) - Update
TablesRecorderto save scenario slice data. (#1072) - Add
RollingMeanFlowNodeParameterand deprecateRollingMeanFlowNodeRecorder. (#1074)
Bug Fixes
- Fix Cython typing warning in
MonthlyProfile. (#1075)
Miscellaneous
- Release wheels for Python 3.11.
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 3 years ago
Pywr - v1.19.0
v1.19.0
New Features
- Add
WeightedAverageProfileParameter. (#1066) - Update to
AnnualCountIndexThresholdRecorderto include a range of days to record. (#1061)
Bug Fixes
- Fix
__init__argument handling inBisectionSearchModel. (#1067)
Miscellaneous
- Remove matplotlib, jinja2 and ipython from core dependencies. (#1040)
- Fix
LicenceParameterexample in documentation. (#1068) - Remove outdated documentation on constant factors in AggregatedNode. (#1060)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 3 years ago
Pywr - v1.18.0
v1.18.0
New Features
- Hash checking is now not case-sensitive. (#1046)
- Add
MonthlyVirtualStoragenode that resets after a given number of months. - Add
StorageParameterthat provides the current volume from a storage node. - Add support for running multiple Pywr models in an interleaved fashion using a new
MultiModelclass
and associated parameters.
Bug Fixes
- Update load method of several parameters (
ControlCurveInterpolatedParameter,ControlCurveParameter,
ArrayIndexedScenarioMonthlyFactorsParameter, several interpolated parameters) to ensure all data
is loaded. (#1048)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk almost 4 years ago
Pywr - v1.17.0
New Features
- Networks with missing connections will now more reliably raise
ModelStructureError. (#1025) - Improve GLPK API (#1021):
- GLPK errors are now handled by default by raising
GLPKInternalError. - NaN checks are performed by default.
- Added runtime option to use "unsafe" API with no error or NaN handling (see new documentation).
- Added documentation describing error handling changes.
- GLPK errors are now handled by default by raising
- Improve handling of NaN values in
Storage.current_pc(i.e. whenmax_volumeis zero).- Added a new method
Storage.get_current_pcto guarantee a finite value.
- Added a new method
- Added
min_outputtoRectifierParameter
Miscellaneous
- Documentation improvements:
RiverSplitWithGaugedocstring. (#1030)- Added section describing how to use Dataframe checksums. (#1028)
- Added
ControlCurveParameterto API docs. (#1027)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 4 years ago
Pywr - v1.16.0
New Features
- Supply
initial_volume_pcinVirtualStorageand its subclasses. (#1015) - Add
residual_daysoption toUniformDrawdownProfileParameter. (#1013)
Bug Fixes
- Fix a JSON formatting error in the documentation. (#1009)
- Removed a circular import in
pywr.recorders.calibration. (#1012)
Miscellaneous
- Removed some older folders related to Travis. (#1016)
- Re-formatted the Python code using the Black formatter and enforced this for future modifications. (#1010)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 4 years ago
Pywr - v1.15.3
Bug Fixes
- Fix bug where constraints are not applied between
VirtualStorageand some complex node types (e.g
PiecewiseLinkandAggregatedNode). Previously models would run and silently ignore constraints
that users might reasonably expect to be applied. Now these models will error until a proper fix
is implemented. See issue #1001 to see details and track progress. (#1002)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 4 years ago
Pywr -
Bug Fixes
- Fix bug with
AggregatedParameter.remove()andAggregatedIndexParameter.remove()methods using the
wrong method internally. (#997)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk almost 5 years ago
Pywr - v1.15.1
Bug Fixes
- Fix
AnnualTotalFlowRecorder's accounting of flow when a timestep ends in the following year. (#992) - Fix divide by zero errors in
NumpyArrayNodeSuppliedRatioRecorderandNumpyArrayNodeCurtailmentRatioRecorder
when the max flow of the parameter they monitor returned zero. (#993) - Fix the load method of
FlowDurationCurveDeviationRecorderto handle scenario data correctly. (#989)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk almost 5 years ago
Pywr - v1.15.0
New Features
- Performance improvements for the GLPK solvers. Several new options have been added to the GLPK solvers that
reduce the number of linear programme updates required each time-step. These options are currently off by default,
but can be enabled by either passing keyword arguments to the solver instances or via environment variables.
(#912, #983, #985)- Update constant and fixed flows only once during reset (
PYWR_SOLVER_GLPK_FIXED_FLOWS_ONCE=True) - Update constant and fixed costs only once during reset (
PYWR_SOLVER_GLPK_FIXED_COSTS_ONCE=True) - Update constant and fixed aggregated node factors only once during reset (
PYWR_SOLVER_GLPK_FIXED_FACTORS_ONCE=True)
- Update constant and fixed flows only once during reset (
- Improve memory usage in
DataFrameParameterwhen running a subset of the defined scenarios. The parameter now only
retains the data for the subset of scenarios required for the simulation instead of all scenarios. (#981) - Update
MonthlyProfileParameterandRbfProfileParameterto allow variable lower and upper bounds to be defined. (#986)
Bug Fixes
- Fix use of deprecated
np.intandnp.floattypes. (#982)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk about 5 years ago
Pywr -
New Features
- Allow target flow-duration curves to be supplied in an external file for
FlowDurationDeviationRecorder. (#977) - Allow only one of upper or lower targets to be specified in
FlowDurationDeviationRecorder. (#977)
Bug Fixes
- Fix bug where event recorders were not registered and could not be loaded from JSON. (#976)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk about 5 years ago
Pywr -
Bug Fixes
- Allow loading normalised KDE and
NumpyArrayNormalisedStorageRecorderrecorder from JSON. (#974)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk about 5 years ago
Pywr -
New Features
- Added
LossLinknode. (#960) - Added
MultiThresholdIndexParameter. (#969) - Added two recorders that fit a KDE to time-series of storage volumes. (#970, #971)
- Added an optional tags dictionary to
Componentfor storing user defined metadata. (#968)
Bug Fixes
- Support loading "area" and "level" attributes as parameters correctly. (#972)
Miscellaneous
- Added CI support for Python-3.9 on manylinux. (#954)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk about 5 years ago
Pywr - v1.11.0
New Features
- Refactor node loading into two stages to solve circular loading problems. (#945)
- Add additional
get_all_xxxmethods to core nodes to allow fetchingmin_flow,max_flowandcost
values for all scenarios simultaneously. (#958)
Miscellaneous
- Switch to using Openpyxl for reading and writing Excel files (see changes to Pandas v1.2). (#959)
- Dropped support for Python 3.6 following lack of support in upstream libraries (NumPy and Pandas). (#959)
Natural Resources - Water Supply and Quality
- Python
Published by jetuk over 5 years ago