Parameters

Base Parameter class

All the Parameter subclasses in pywr are descended from a common base class.

Parameter([is_variable])

IndexParameter

Base parameter providing an index method

Simple parameters

ConstantParameter(model, value[, …])

ConstantScenarioParameter(model, …)

A Scenario varying Parameter

ConstantScenarioIndexParameter(model, …)

A Scenario varying IndexParameter

Combining multiple parameters

AggregatedParameter(model, parameters[, …])

A collection of IndexParameters

AggregatedIndexParameter(model, parameters)

A collection of IndexParameters

DivisionParameter(model, numerator, …)

Parameter that divides one Parameter by another.

NegativeParameter(model, parameter, *args, …)

Parameter that takes negative of another Parameter

MaxParameter(model, parameter[, threshold])

Parameter that takes maximum of another Parameter and constant value (threshold)

NegativeMaxParameter

Parameter that takes maximum of the negative of a Parameter and constant value (threshold)

MinParameter(model, parameter[, threshold])

Parameter that takes minimum of another Parameter and constant value (threshold)

NegativeMinParameter

Parameter that takes minimum of the negative of a Parameter and constant value (threshold)

OffsetParameter(model, parameter[, offset, …])

Parameter that offsets another Parameter by a constant value.

Annual profile parameters

DailyProfileParameter(model, values, *args, …)

An annual profile consisting of daily values.

WeeklyProfileParameter(model, values, *args, …)

Weekly profile (52-week year)

MonthlyProfileParameter(model, values[, …])

Parameter which provides a monthly profile.

UniformDrawdownProfileParameter(model[, …])

Parameter which provides a uniformly reducing value from one to zero.

ScenarioDailyProfileParameter(model, …)

Parameter which provides a daily profile per scenario.

ScenarioWeeklyProfileParameter(model, …)

Parameter that provides a weekly profile per scenario

ScenarioMonthlyProfileParameter(model, …)

Parameter that provides a monthly profile per scenario

ArrayIndexedScenarioMonthlyFactorsParameter(…)

Time varying parameter using an array and Timestep.index with multiplicative factors per Scenario

RbfProfileParameter(model, days_of_year, values)

Parameter which interpolates a daily profile using a radial basis function (RBF).

Dataframe parameter

DataFrameParameter(model, dataframe[, scenario])

Timeseries parameter with automatic alignment and resampling

HDF5 Parameter

TablesArrayParameter(model, h5file, node[, …])

Array based parameters

ArrayIndexedParameter(model, values, *args, …)

Time varying parameter using an array and Timestep.index

ArrayIndexedScenarioParameter(model, …)

A Scenario varying Parameter

IndexedArrayParameter(model, …)

Parameter which uses an IndexParameter to index an array of Parameters

Threshold parameters

AbstractThresholdParameter(model, threshold)

Base class for parameters returning one of two values depending on other state.

StorageThresholdParameter(model, …)

Returns one of two values depending on current volume in a Storage node

NodeThresholdParameter(model, …)

Returns one of two values depending on previous flow in a node

ParameterThresholdParameter(model, …)

Returns one of two values depending on the value of a Parameter

RecorderThresholdParameter(model, …[, …])

Returns one of two values depending on a Recorder value and a threshold

CurrentYearThresholdParameter

Returns one of two values depending on the year of the current timestep..

CurrentOrdinalDayThresholdParameter

Returns one of two values depending on the ordinal of the current timestep.

Interpolation parameters

InterpolatedParameter(model, parameter, x, y)

Parameter value is equal to the interpolation of another parameter

InterpolatedVolumeParameter(model, node, …)

Generic interpolation parameter calculated from current volume

InterpolatedQuadratureParameter(model, …)

Parameter value is equal to the quadrature of the interpolation of another parameter

InterpolatedFlowParameter(model, node, …)

Generic interpolation parameter that uses a node’s flow at the previous time-step for interpolation.

Control curve parameters

control_curves.BaseControlCurveParameter(…)

Base class for all Parameters that rely on a the attached Node containing a control_curve Parameter

control_curves.ControlCurveInterpolatedParameter(…)

A control curve Parameter that interpolates between three or more values

control_curves.ControlCurveIndexParameter(…)

Multiple control curve holder which returns an index not a value

control_curves.ControlCurvePiecewiseInterpolatedParameter(…)

A control curve Parameter that interpolates between two or more pairs of values.

Hydropower parameters

HydropowerTargetParameter(model, target[, …])

A parameter that returns flow from a hydropower generation target.

Other parameters

AnnualHarmonicSeriesParameter(model, mean, …)

A Parameter which returns the value from an annual harmonic series

DeficitParameter(model, node, *args, **kwargs)

Parameter track the deficit (max_flow - actual flow) of a Node

ScenarioWrapperParameter(model, scenario, …)

Parameter that utilises a different child parameter in each scenario ensemble.

PiecewiseIntegralParameter(model, parameter, …)

Parameter that integrates a piecewise function.

FlowParameter(model, node, *args, **kwargs)

Parameter that provides the flow from a node from the previous time-step.

FlowDelayParameter(model, node, *args, **kwargs)

Parameter that returns the delayed flow for a node after a given number of timesteps or days

DiscountFactorParameter(model, rate, …)

Parameter that returns the current discount factor based on discount rate and a base year.