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)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(model, csvfile[, scenario_index, …])Initialize self.
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(type cls, model, data)register(type cls)reset(self)setup()Setup the CSV file recorder.
unregister(type cls)values(self)Attributes
agg_funcchildrencommentcomment: unicode
constraint_lower_boundsconstraint_upper_boundsepsilonepsilon: ‘double’
ignore_nanignore_nan: ‘bool’
is_constraintReturns true if either upper or lower constraint bounds is defined.
is_double_bounded_constraintReturns true if upper and lower constraint bounds are both defined and not-equal to one another.
is_equality_constraintReturns true if upper and lower constraint bounds are both defined and equal to one another.
is_lower_bounded_constraintReturns true if lower constraint bounds is defined and upper constraint bounds is not.
is_objectiveis_upper_bounded_constraintReturns true if upper constraint bounds is defined and lower constraint bounds is not.
modelnameparents