A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Recent Releases of Pywr

Pywr - v1.27.3

🚀 Features

  • Support Python 3.13

⚙️ Miscellaneous Tasks

  • Update doc and sdist GHA to Pyhon 3.11.
  • Fix requires-python definition in setup.

Natural Resources - Water Supply and Quality - Python
Published by jetuk 3 months ago

Pywr - 1.27.2

🐛 Bug Fixes

  • Fix numpy test errors (#1149)
  • Use `get_value`` method when fetching threshold param value within threshold parameters (#1148)

Natural Resources - Water Supply and Quality - Python
Published by jetuk 4 months ago

Pywr - v1.27.1

⚙️ Miscellaneous Tasks

  • Fix downloading all artifacts during deployment. (#1146)

Natural Resources - Water Supply and Quality - Python
Published by jetuk 6 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 6 months ago

Pywr - v1.26.0

v1.26.0 (2024-06-24)

Fixes

  • Use NaN when calculating duration of no events. (#1131) (bc7b302), closes #1131

Natural Resources - Water Supply and Quality - Python
Published by jetuk 10 months ago

Pywr - v1.25.0

v1.25.0 (2024-06-19)

Features

  • Add support for defining net or gross loss in LossLink. (#1124) (ed8eb8b), closes #1124

Other

Documentation

  • Add OtherModelXXX parameters to API docs. (#1126) (bdb257d), closes #1126

Natural Resources - Water Supply and Quality - Python
Published by jetuk 10 months 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 1 year ago

Pywr - v1.23.0

v1.23.0 (2023-11-13)

Features

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 1 year ago

Pywr - v1.22.1

v1.22.1 (2023-10-20)

Fixes

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 1 year ago

Pywr - v1.22.0

v1.22.0 (2023-10-06)

Other

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 1 year 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 2 years ago

Pywr - v1.20.1

v1.20.1

Bug Fixes

  • Fix bug loading timestep_offset in DataFrameParameter from JSON. (#1078)

Natural Resources - Water Supply and Quality - Python
Published by jetuk about 2 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 DataFrameParameter and TablesArrayParameter. (#1073)
  • Update TablesRecorder to save scenario slice data. (#1072)
  • Add RollingMeanFlowNodeParameter and deprecate RollingMeanFlowNodeRecorder. (#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 2 years ago

Pywr - v1.19.0

v1.19.0

New Features

  • Add WeightedAverageProfileParameter. (#1066)
  • Update to AnnualCountIndexThresholdRecorder to include a range of days to record. (#1061)

Bug Fixes

  • Fix __init__ argument handling in BisectionSearchModel. (#1067)

Miscellaneous

  • Remove matplotlib, jinja2 and ipython from core dependencies. (#1040)
  • Fix LicenceParameter example in documentation. (#1068)
  • Remove outdated documentation on constant factors in AggregatedNode. (#1060)

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 2 years ago

Pywr - v1.18.0

v1.18.0

New Features

  • Hash checking is now not case-sensitive. (#1046)
  • Add MonthlyVirtualStorage node that resets after a given number of months.
  • Add StorageParameter that provides the current volume from a storage node.
  • Add support for running multiple Pywr models in an interleaved fashion using a new MultiModel class
    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 over 2 years ago

Pywr - v1.17.2

Bug Fixes

  • Fix a bug where the solver specified using a keyword to Model.load would be ignored. (#1044)

Natural Resources - Water Supply and Quality - Python
Published by jetuk about 3 years ago

Pywr - v1.17.1

Miscellaneous

  • Release wheels for Python 3.9 (Windows) and Python 3.10 (Linux and Windows).

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 3 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.
  • Improve handling of NaN values in Storage.current_pc (i.e. when max_volume is zero).
    • Added a new method Storage.get_current_pc to guarantee a finite value.
  • Added min_output to RectifierParameter

Miscellaneous

  • Documentation improvements:
    • RiverSplitWithGauge docstring. (#1030)
    • Added section describing how to use Dataframe checksums. (#1028)
    • Added ControlCurveParameter to API docs. (#1027)

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 3 years ago

Pywr - v1.16.1

Bug Fixes

  • Fix internal node names for PiecewiseLink. (#1024)

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 3 years ago

Pywr - v1.16.0

New Features

  • Supply initial_volume_pc in VirtualStorage and its subclasses. (#1015)
  • Add residual_days option to UniformDrawdownProfileParameter. (#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 3 years ago

Pywr - v1.15.3

Bug Fixes

  • Fix bug where constraints are not applied between VirtualStorage and some complex node types (e.g
    PiecewiseLink and AggregatedNode). 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 3 years ago

Pywr -

Bug Fixes

  • Fix bug with AggregatedParameter.remove() and AggregatedIndexParameter.remove() methods using the
    wrong method internally. (#997)

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 3 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 NumpyArrayNodeSuppliedRatioRecorder and NumpyArrayNodeCurtailmentRatioRecorder
    when the max flow of the parameter they monitor returned zero. (#993)
  • Fix the load method of FlowDurationCurveDeviationRecorder to handle scenario data correctly. (#989)

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 3 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)
  • Improve memory usage in DataFrameParameter when 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 MonthlyProfileParameter and RbfProfileParameter to allow variable lower and upper bounds to be defined. (#986)

Bug Fixes

  • Fix use of deprecated np.int and np.float types. (#982)

Natural Resources - Water Supply and Quality - Python
Published by jetuk almost 4 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 4 years ago

Pywr -

Bug Fixes

  • Allow loading normalised KDE and NumpyArrayNormalisedStorageRecorder recorder from JSON. (#974)

Natural Resources - Water Supply and Quality - Python
Published by jetuk about 4 years ago

Pywr -

New Features

  • Added LossLink node. (#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 Component for 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 4 years ago

Pywr - v1.12.0

New Features

  • Add additional "activation function" parameters: BinaryStepParameter, RectifierParameter and LogisticParameter. (#965)

Natural Resources - Water Supply and Quality - Python
Published by jetuk about 4 years ago

Pywr - v1.11.0

New Features

  • Refactor node loading into two stages to solve circular loading problems. (#945)
  • Add additional get_all_xxx methods to core nodes to allow fetching min_flow, max_flow and cost
    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 4 years ago

Pywr -

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 4 years ago

Pywr -

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 4 years ago

Pywr -

Natural Resources - Water Supply and Quality - Python
Published by jetuk over 4 years ago