pywr.domains package — Pywr 0.5dev documentation

# pywr.domains package

## Submodules

## pywr.domains.river module

class `pywr.domains.river.` `Catchment`(*args, **kwargs)

  Bases: `pywr.domains.river.RiverDomainMixin`, `pywr.nodes.Input`

  A hydrological catchment, supplying water to the river network

  `get_flow`(timestep)

    flow is ensured that both min_flow and max_flow are the same.

  classmethod `load`(data, model)

class `pywr.domains.river.` `Discharge`(*args, **kwargs)

  Bases: `pywr.domains.river.Catchment`

  An inline discharge to the river network

  This node is similar to a catchment, but sits inline to the river network, rather than at the head of the river.

class `pywr.domains.river.` `Reservoir`(model, *args, **kwargs)

  Bases: `pywr.domains.river.RiverDomainMixin`, `pywr.nodes.Storage`

  A reservoir node with control curve.

  The Reservoir is a subclass of Storage with additional functionality to provide a simple control curve. The Reservoir has above_curve_cost when it is above its curve and the user defined cost when it is below. Typically the costs are negative to represent a benefit of filling the reservoir when it is below its curve.

class `pywr.domains.river.` `River`(*args, **kwargs)

  Bases: `pywr.domains.river.RiverDomainMixin`, `pywr.nodes.Link`

  A node in the river network

  This node may have multiple upstream nodes (i.e. a confluence) but only one downstream node.

class `pywr.domains.river.` `RiverDomainMixin`(*args, **kwargs)

  Bases: `object`

class `pywr.domains.river.` `RiverGauge`(*args, **kwargs)

  Bases: `pywr.domains.river.RiverDomainMixin`, `pywr.nodes.PiecewiseLink`

  A river gauging station, with a minimum residual flow (MRF)

  classmethod `load`(data, model)
  `mrf`
  `mrf_cost`

class `pywr.domains.river.` `RiverSplit`(*args, **kwargs)

  Bases: `pywr.nodes.MultiSplitLink`

  A split in the river network

  RiverSplit is a specialised version of pywr.nodes.MultiSplitLink with a more convenient init method.
    It is intended for a simple case of where fixed ratio of flow is required to be distributed to multiple downstream routes.

  Parameters: | factors : iterable of floats The factors to force on the additional splits. Number of extra_slot is assumed to be one less than the length of factors (as per pywr.nodes.MultiSplitLink documentation). slot_names : iterable The identifiers to refer to the slots when connect from this Node. Length must be one more than the number of extra slots required.

  See also

  `pywr.nodes.MultiSplitLink`

class `pywr.domains.river.` `RiverSplitWithGauge`(model, name, mrf=0.0, cost=0.0, mrf_cost=0.0, **kwargs)

  Bases: `pywr.domains.river.RiverSplit`

  A split in the river network with a minimum residual flow

  As per RiverSplit but by default creates another route in the underlying object
    to model a MRF. This route is such that the MRF is not part of forced ratios. The intent of this object is to model the case where a proportion of flow can be abstracted above the MRF (e.g. 90% of flow above MRF).

  Parameters: | mrf : float The minimum residual flow (MRF) at the gauge mrf_cost : float The cost of the route via the MRF cost : float The cost of the other (unconstrained) route factors : iterable of floats The factors to force on the additional splits. Number of extra_slot is assumed to be one less than the length of factors (as per MultiSplitLink documentation). slot_names : iterable The identifiers to refer to the slots when connect from this Node. Length must be one more than the number of extra slots required.

  classmethod `load`(data, model)

## Module contents

class `pywr.domains.` `Domain`(name='default', **kwargs)

  Bases: `pywr._core.Domain`