pywr.recorders.CSVRecorder

class pywr.recorders.CSVRecorder(model, csvfile, scenario_index=0, nodes=None, complib=None, complevel=9, **kwargs)

A Recorder that saves Node values to a CSV file.

This class uses the csv package from the Python standard library

Parameters:
modelpywr.model.Model

The model to record nodes from.

csvfilestr

The path to the CSV file.

scenario_indexint

The scenario index of the model to save.

nodesiterable (default=None)

An iterable of nodes to save data. It defaults to None which is all nodes in the model

kwargsAdditional keyword arguments to pass to the csv.writer object
__init__(model, csvfile, scenario_index=0, nodes=None, complib=None, complevel=9, **kwargs)

Methods

__init__(model, csvfile[, scenario_index, ...])

after()

Write the node values to the CSV file

aggregated_value(self)

before(self)

finish(self)

is_constraint_violated(self)

Returns true if the value from this Recorder violates its constraint bounds.

load(cls, model, data)

register(cls)

reset(self)

setup()

Setup the CSV file recorder.

unregister(cls)

values(self)

Attributes

agg_func

children

comment

comment: unicode

constraint_lower_bounds

constraint_upper_bounds

epsilon

epsilon: 'double'

ignore_nan

ignore_nan: 'bool'

is_constraint

Returns true if either upper or lower constraint bounds is defined.

is_double_bounded_constraint

Returns true if upper and lower constraint bounds are both defined and not-equal to one another.

is_equality_constraint

Returns true if upper and lower constraint bounds are both defined and equal to one another.

is_lower_bounded_constraint

Returns true if lower constraint bounds is defined and upper constraint bounds is not.

is_objective

is_upper_bounded_constraint

Returns true if upper constraint bounds is defined and lower constraint bounds is not.

model

name

parents

tags

tags: dict