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).

WeightedAverageProfileParameter(model, ...)

Generates a weighted average daily profile from pairs of storage nodes and profile parameters.

Dataframe parameter

DataFrameParameter(model, dataframe[, ...])

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

MultipleThresholdIndexParameter(model, node, ...)

Returns an index based on the previous days flow in a node against multiple given thresholds.

MultipleThresholdParameterIndexParameter(...)

Return an index based on the value in the parameter against multiple given thresholds.

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.

Activation function parameters

BinaryStepParameter(model[, value, ...])

An activation function that returns a constant value if its internal variable is positive.

RectifierParameter(model[, value, ...])

An activation function that follows a ramp function if its internal variable is positive.

LogisticParameter(model[, value, ...])

An activation function that follows a logistic function using its interval value.

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.ControlCurveParameter(model, ...)

A generic multi-levelled 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.

Multi-model coupling parameters

OtherModelParameterValueParameter(model, ...)

Parameter that obtains its value from another model's parameter.

OtherModelNodeFlowParameter(model, ...)

Parameter that obtains its value from the flow through a node in another model.

OtherModelNodeStorageParameter(model, ...)

Parameter that obtains its value from the current storage of a node in another model.

OtherModelIndexParameterValueIndexParameter(...)

Parameter that obtains its value from another model's parameter.

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

StorageParameter(model, storage_node[, ...])

Parameter that provides the current volume from a storage node.

DiscountFactorParameter(model, rate, ...)

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

RollingMeanFlowNodeParameter(model, node[, ...])

Returns the mean flow of a Node for the previous N timesteps or days.