Tables Recorder
General Description
Section titled “General Description”A recorder that saves to PyTables CArray
This Recorder creates a CArray for every node passed to the constructor. Each CArray stores the data for all scenarios on the specific node. This is useful for analysis of Node statistics across multiple scenarios. API Reference
Attributes
Section titled “Attributes”| Name | Description | Required |
|---|---|---|
| model | The model to record nodes from | Optional |
| h5file | The tables file handle or filename to attach the CArray objects to. If a filename is given the object will open and close the file handles | Required |
| nodes | Nodes to save in the tables database. Can be an iterable of Node objects or node names. It can also be a iterable of tuples with a node specific where keyword as the first item and a Node object or name as the second item. If an iterable of tuples is provided then the node specific where keyword is used in preference to the where keyword (see below) | Required |
| parameters | Parameters to save. Similar to the nodes keyword, except refers to Parameter objects or names thereof | Required |
| where | Default path to create the CArrays inside the database | Required |
| time | Default full node path to save a time tables.Table. If None no table is created | Optional |
| scenarios | Default full node path to save a scenarios tables.Table. If None no table is created | Optional |
| routes_flows | Relative (to where) node path to save the routes flow CArray. If None (default) no array is created | Optional |
| routes | Full node path to save the routes tables.Table. If None not table is created | Optional |
| filter_kwds | Filter keywords to pass to tables.open_file when opening a file | Required |
| mode | Model argument to pass to tables.open_file. Defaults to ‘w’ | Optional |
| metadata | Dict of user defined attributes to save on the root node (root._v_attrs) | Required |
| create_directories | If a file path is given and create_directories is True then attempt to make the intermediate directories. This uses os.makedirs() underneath | Optional |
Example
Section titled “Example”coming soon…
{
}