All issue numbers are relative to https://github.com/pywr/pywr/issues unless otherwise stated.
v1.26.0 (2024-06-24)
v1.25.0 (2024-06-20)
- Pin numpy<2 for now. (#1130) (2672645), closes #1130
- Use delvewheel to repair Windows wheels. (#1125) (691172c), closes #1125 #1123
v1.24.0 (2024-03-20)
- Cache file hashes to avoid recomputation when the same file is referenced multiple times (#1118) (4afc270)
- update warnings check in orphaned components test (#1119) (582a764)
- black formatting updates (#1119) (7d1b60c)
v1.23.0 (2023-11-13)
v1.22.1 (2023-10-20)
v1.22.0 (2023-10-06)
- 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
v1.21.0 (2023-06-30)
- Pass kwargs to model load via optimisation wrappers (#1096) (3557e4b)
- Add metadata to TablesRecorder arrays. (#1083) (4dac394)
- Overload get_xxx_flow for PiecewiseLink. (#1088) (51dcd57), closes #1087
- Add pywr.parameter imports from control_curves module. (#1084) (94bcdad)
- Support pandas v2.x (#1089) (68ee7cc)
- Use ubuntu-latest image for building wheels. (#1090) (cce65e3)
- Fix bug loading
timestep_offset
inDataFrameParameter
from JSON. (#1078)
- 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
andTablesArrayParameter
. (#1073) - Update
TablesRecorder
to save scenario slice data. (#1072) - Add
RollingMeanFlowNodeParameter
and deprecateRollingMeanFlowNodeRecorder
. (#1074)
- Fix Cython typing warning in
MonthlyProfile
. (#1075)
- Release wheels for Python 3.11.
- Add
WeightedAverageProfileParameter
. (#1066) - Update to
AnnualCountIndexThresholdRecorder
to include a range of days to record. (#1061)
- Fix
__init__
argument handling inBisectionSearchModel
. (#1067)
- Remove matplotlib, jinja2 and ipython from core dependencies. (#1040)
- Fix
LicenceParameter
example in documentation. (#1068) - Remove outdated documentation on constant factors in AggregatedNode. (#1060)
- 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.
- Update load method of several parameters (
ControlCurveInterpolatedParameter
,ControlCurveParameter
,ArrayIndexedScenarioMonthlyFactorsParameter
, several interpolated parameters) to ensure all data is loaded. (#1048)
- Fix a bug where the solver specified using a keyword to
Model.load
would be ignored. (#1044)
- Release wheels for Python 3.9 (Windows) and Python 3.10 (Linux and Windows).
- 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_volume
is zero).- Added a new method
Storage.get_current_pc
to guarantee a finite value.
- Added a new method
- Added
min_output
toRectifierParameter
- Documentation improvements:
RiverSplitWithGauge
docstring. (#1030)- Added section describing how to use Dataframe checksums. (#1028)
- Added
ControlCurveParameter
to API docs. (#1027)
- Fix internal node names for
PiecewiseLink
. (#1024)
- Supply
initial_volume_pc
inVirtualStorage
and its subclasses. (#1015) - Add
residual_days
option toUniformDrawdownProfileParameter
. (#1013)
- Fix a JSON formatting error in the documentation. (#1009)
- Removed a circular import in
pywr.recorders.calibration
. (#1012)
- Removed some older folders related to Travis. (#1016)
- Re-formatted the Python code using the Black formatter and enforced this for future modifications. (#1010)
- Fix bug where constraints are not applied between
VirtualStorage
and some complex node types (e.gPiecewiseLink
andAggregatedNode
). 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)
- Fix bug with
AggregatedParameter.remove()
andAggregatedIndexParameter.remove()
methods using the wrong method internally. (#997)
- Fix
AnnualTotalFlowRecorder
's accounting of flow when a timestep ends in the following year. (#992) - Fix divide by zero errors in
NumpyArrayNodeSuppliedRatioRecorder
andNumpyArrayNodeCurtailmentRatioRecorder
when the max flow of the parameter they monitor returned zero. (#993) - Fix the load method of
FlowDurationCurveDeviationRecorder
to handle scenario data correctly. (#989)
- 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
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
andRbfProfileParameter
to allow variable lower and upper bounds to be defined. (#986)
- Fix use of deprecated
np.int
andnp.float
types. (#982)
- 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)
- Fix bug where event recorders were not registered and could not be loaded from JSON. (#976)
- Allow loading normalised KDE and
NumpyArrayNormalisedStorageRecorder
recorder from JSON. (#974)
- 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)
- Support loading "area" and "level" attributes as parameters correctly. (#972)
- Added CI support for Python-3.9 on manylinux. (#954)
- Add additional "activation function" parameters:
BinaryStepParameter
,RectifierParameter
andLogisticParameter
. (#965)
- Refactor node loading into two stages to solve circular loading problems. (#945)
- Add additional
get_all_xxx
methods to core nodes to allow fetchingmin_flow
,max_flow
andcost
values for all scenarios simultaneously. (#958)
- 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)
- Add optional
exclude_months
toAnnualCountIndexThresholdRecorder
. (#950) - Update load methods of interpolation parameters so that they accept
interp_kwargs
. (#943) - Allow
InterpolateVolumeParameter
to use external data. (#926) - Added
NumpyArrayNodeCostRecorder
to recorder a timeseries of a node's cost attribute. (#932) - Added
to_dataframe()
method toAnnualCountIndexThresholdRecorder
andAnnualTotalFlowRecorder
. (#939)
- Fixed a bug with
RbfProfileParameter
where it did not passrbf_kwargs
to the RBF functions. (#946) - Fixes to save and draw graph functions to improve handling virtual and child nodes. (#938)
- Updated installation docs. (#931)
- Add missing parameters (
FlowParameter
andDiscountFactorParameter
) to API docs. (#934)
- Migrate continuous integration system from Travis and Appveyor to Github Actions. (#948, #951, #952, #953)
- Removed deprecated
PiecewiseLinearControlCurve
. (#947) - Apply some PEP8 compliance fixes. (#929)
- Remove use of
basestring
which was only needed for Python 2. (#928)
- Added
BisectionSearchModel
that performs a bisectional search on a single parameter instead of a standard simulation. (#915) - Allow
AggregatedNode
factors to be time-varying usingParameter
s. (#919) - Added
RollingVirtualStorage
node intended for modelling rolling licenses. (#891) - Added
SeasonalVirtualStorage
node intended for modelling licenses that apply for limited periods. (#923)
- Ensure
RollingMeanFlowNodeRecorder
's internal memory pointer is reset correctly. (#893) - Fix a bug where
AggregatedNode
would warn about small factors with any negative value. (#921) - Fixed
AggreagtedNode
initial volume being incorrectly calculated when its dependent nodes used a proportional initial volume. (#922)
- Added
NullSolver
that performs no allocation and is intended for debugging purposes. (#924) - Added a small tolerance for equality checking of fixed bounds in the GLPK solvers. (#925)
- A change to the behaviour of Storage nodes with parameters for
max_volume
. Such nodes must now have bothinitial_volume
andinitial_volume_pc
specified. This allows using arbitrary parameters formax_volume
provided the initial condition is explicitly defined in absolute and percentage terms. (#690) - Added
DelayNode
andFlowDelayParameter
to allow emulation of time-of-travel. (#904) - Added
DiscountFactorParameter
. (#901) - Added support for optimising days of the year in
RbfProfileParameter
. (#908) - Added
NumpyArrayDailyProfileParameterRecorder
for recording calculated annual profiles, and refactored the internal calculations around day of the year.Timestep
now includes properties fordayofyear_index
,week_index
andis_leap_year
. (#903) - Added error logging in
Model
'sload
,setup
,reset
andfinish
methods. Handling of unknown component types now raises a customTypeNotFoundError
. (#896)
- Improvements to API documentation. (#905)
- Release to fix packaging mistake in v1.7.1.
- Fixed a bug when using
draw_graph
with a dictionary. (#899) - Fixed a bug when giving non-float values to
RbfProfileParameter
. (#897) - Improved handling of isolated nodes in
draw_graph
when using JSON data. (#895)
- Improve Jupyter Notebook graphing functionality. (#868, #885)
- Added
OffsetParameter
. (#874) - Added
PywrRandomGenerator
for use with the Platypus optimisation library. (#867, #892) - Added
RbfProfileParameter
. (#873) - Changed the signature of recorder aggregation functions to better catch exceptions. (#879)
- Removed unreachable code when CSV dataframes. (#880)
- Fixed incorrect parsing of
position
keyword in several nodes. (#884)
- Added
IPython
to install dependencies. (#870) - Removed optimisation wrapper for
inspyred
. (#878) - Exposed run statistics to optimisation wrapper. (#877)
- Added optional dependencies for docs and dev installs. (#882)
- Added threshold parameters to API documentation. (#881)
- Corrected
MeanParameterRecorder
's docstring. (#772) - Improved docstrings and made consistent argument names for
InterpolatedVolumeParameter
andInterpolatedFlowParameter
. (#890)
AnnualTotalFlowRecorder
now accepts an optional list of factors to scale the flow by. (#837)NumpyArrayNodeRecorder
now accepts an optional factor (default=1.0) to scale the flow by. (#838, #840)- Added
UniformDrawdownProfileParameter
(#836) - Added
ControlCurvePiecewiseInterpolatedParameter
as a more general replacement forPiecewiseLinearControlCurve
. (#857) - Added 'count_nonzero' as an aggregation function for recorders. (#866)
- Fix bug draw_graph modifying model data when a data dict is given. (#832)
- Fix the
__init__
method ofBreakLink
. (#850) - Fix reset of
AbstractNode._prev_flow
. (#855) - Fix a bug calculating of
AggregatedStorage
's initial volume in multiple scenarios. (#854) - Fix resetting of
AnnualVirtualStorage
volume to maximum volume instead of initial volume. (#860) - Fix cdef type issue in some control curve parameters allowing use with any
AbstractStorage
(instead of justStorage
). (#861) - Fix registering of
ArrayIndexedScenarioParameter
(#863)
- Fixed documentation building on tags. (#831)
- Updated notebook graph drawing to use d3.v5 and removed IE specific code. (#834)
- Add reference to published academic paper. (#846)
PiecewiseLinearControlCurve
has been marked as deprecated and will be removed in a future version. (#857)- Added examples from the recently published paper. (#852)
- Added
ScenarioDailyProfileParameter
andScenarioWeeklyProfileParameter
to provide different profiles per scenario. (#802) - Added
TimestepCountIndexParameterRecorder
,AnnualCountIndexThresholdRecorder
andAnnualTotalFlowRecorder
(#784) - Added daily interpolation support to
MonthlyProfileParameter
. (#807) - Added
__contains__
method toNamedIterator
andNodeIterator
(#813)
- Fix resetting progress of
ProgressRecorder
(#816) - Fix for
draw_graph
issue error when loading model object that has schematic positions (#821)
- Removed
FutureWarning
andUnicodeWarning
warning filters (#803) - Refactored
setup.py
to improve build time dependency handling and specifying build arguments (#811) - Fix deprecated use of
.labels
in the tests (#814) - Fix test warning when incrementing timestep by integers (#815)
- Fix duplicated test function names (#818)
- Support Python 3.8 (#796)
- Refactored the GLPK solvers in to a single extension module. (#822)
- Add
.pxd
files to the Pywr's package data so they are distributed. (#824)
- Fixed some warning and deployment issues with the documentation (#771)
- Add missing new line from code-block sections in
json.rst
(#817)
- Added support time-steps based on Pandas offsets (#675)
- Added
InterpolatedFlowParameter
(#740) - Added support for
percentile
andpercentileofscore
aggregation functions (#777) - Added
PiecewiseIntegralParameter
(#772) - Added support for including references to Python modules in JSON format (#765)
- Added
CurrentYearThresholdParameter
andCurrentOrdinalDayThresholdParameter
parameters (#789)
- Ensure
comment
key doesn't get passed to Pandasread_xxx
functions (#788)
- Added some docs for AggregatedNode (#756)
- Allow use of parameters as values in
ControlCurveInterpolatedParameter
(#750) - Added
ScenarioWrapper
parameter (#763)
- Fix loading PiecewiseLink with parameters from JSON (#749)
- Fixed a bug with
CSVRecorder
not saving volumes correctly (#767)
- Removed
six
as dependency (#745) - Removed
pywr.__git_hash__
(#752) - Removed
Blender
node (#757)
- Support for embedding dataframe data directly in to JSON (#700)
- Added
NumpyArrayAreaRecorder
and refactored storage recorders (#684) - Added getter for Recorder.agg_func (#719)
- Add
DivisionParameter
and tests (#722) - Add
FlowParameter
for tracking yesterday's flow (#724) - Add
InterpolatedQuadratureParameter
(#714) - Add new array deficit recorders (#729):
NumpyArrayNodeDeficitRecorder
- timeseries of deficit.NumpyArrayNodeSuppliedRatioRecorder
- timeseries of supply / demandNumpyArrayNodeCurtailmentRatioRecorder
- timeseries of 1 - supply / demand
- Fix a bug with hydropower parameters & recorders not applying efficiency factor (#737)
- Refactor of the code used to load named parameters and recorders to use shared functions (as they are both components) (#720)
- Fix a bug with AggregatedRecorder not returning the instance on load (#723)
- Use
flow
instead ofmax_flow
in two_reservoirs test and example (#721)
- Added API documentation for nodes (#668)
- Fix
PiecewiseLink
docstring's ASCII diagram (#668)
- Clean-up various warnings in tests (#695)
- Removed conda-recipe (Pywr is now in conda-forge) (#692)
- Added codecov based coverage reporting (#705)
- Updated test builds to use manylinux2010 to build wheels (#710)
- Updated installation instructions to reflect wheels in Pypi and conda-forge installation.
- New "edge based" GLPK solver. (#672)
- Improved
FlowDurationDeviationRecorder
with JSON support and bug fixes when no scenario is given. (#677)
- Replace deprecated calls time time.clock with time.perf_counter. (#683)
- Type optimisation in AggregatedIndexParameter. (#662)
- Updated documentation: control curves, extending Pywr. (#652)
- Variable renames and clean up for GLPK path solver. (#672)
- Spport for Python 3.7. (#662)
- Updated url in setup.py metadata to GitHub project (#661)
- Additional cython compiler directives (#645)
- Added ratchet support to threshold parameters. (#655)
- Added
ConstantScenarioIndexParameter
. (#654) - Added support for Platypus and Pygmo optimisation wrappers. Involved a refactor of the existing optimisation support. (#610)
- Added
HydropowerTargetParameter
to specify a flow target from a hydropower target. (#631) - Renamed
HydroPowerRecorder
toHydropowerRecorder
(#631) - Better warning/error messages in
TablesArrayParameter
(#629) - Allow solver to be defined by the environment variable
PYWR_SOLVER
. (#619) - Added flow weights to
AggregatedNode
. (#603) - Added additional labeling functionality to notebook graphing functions. (#612)
- New and improved variable API for Parameters. (#601, #258, #625)
- Fix bug setting the area property of
Storage
nodes. (#657) - Fixed bug with finally clause in the optimisation wrapper. (#649)
- Fix a bug in
AnnualHarmonicSeriesParameter
related to updating theamplitudes
andphases
values withset_double_variables
(#622)
- Refactored several recorders and unified the use of temporal aggregation. This deprecated several keyword arguments in some existing Recorders. See the PR for details. (#635)
- Removed deprecated (Monthly|Daily)ProfileControlCurve. (#640)
- Dropped support for Python 2 and <3.6. Pywr is no longer tested against Python versions earlier than 3.6. (#623)
- Use new
networkx.nodes_with_selfloops
function. (#628) AbstractProfileControlCurveParameter
,MonthlyProfileControlCurveParameter
andDailyProfileControlCurveParameter
have been removed after deprecation. (#231, #640)- Improved documentation. (#616, #627)
- Fixes to the source distribution (sdist) and inclusions of MANIFEST.in
- Changes to the build systems on travis to enable deploy to Anaconda and Pypi.
- Added build and testing for OS X via travis. (#588)
- Added data consumption warnings to DataFrameParamter and TablesArrayParameter. (#562)
- Added
PiecewiseLinearControlCurve
as a new cython parameter. - Pywr now emits some logging calls during a model run.
- Improved the event handling code to allow tracking of a
Parameter
's value during an event. - Added support for initialising storage volume by percentage. Can be set in json through the
"initial_volume_pc"
property. - Added GZ2 and BZ2 compression support to
CSVRecorder
. - Added JSON support for license parameters. (#544)
- Added a sense check to
TablesArrayParameter
having non-finite values. - Added scale and offset to ConstantParameter.
- Added JSON support for license parameters. (#544)
- Added
WeeklyProfileParameter
(#537) - Added
InterpolationParameter
. Closes #478. (#535) - Added surface area property to
Storage
(#525) - Added optional checksum when loading DataFrameParameter and TablesArrayParameter using hashlib.
- Added ProgressRecorder and JupyterProgressRecorder (#520)
- The threshold in
*ThresholdParameter
can now be a Parameter. (#517) - Added
HydroPowerRecorder
andTotalHydroEnergyRecorder
for hydropower studies (#584)
- Explicitly set the frequency during dataframe resampling (#563)
IndexedArrayParameter
also accepts 'parameters' in JSON. Closes #538. (#539)- Recursive deletion of child nodes when deleting compound nodes. (#527)
- Compatibility with NetworkX 2.x (#529)
- Changed GLPK log level to remove printing of superfluous messages to stdout. (#523)
- Fixed loading parameters for
PiecewiseLink
in JSON. (#519)
AbstractProfileControlCurveParameter
marked for deprecation.
- Improved the online documentation including the API reference.
- Added a hydropower example.
- General tweaks and corrections to class docstrings.
- Updated conda build recipe to use the conda-forge lp_solve package.
- Updated the conda build recipe to use MSVC features.