netallocation.breakdown module¶
Created on Thu Mar 7 15:38:24 2019
@author: fabian
- netallocation.breakdown.by_carriers(ds, n, chunksize=None)[source]¶
Breakdown allocation into production and demand carriers.
Use this funtion to breakdown the share of single production carriers (carriers of generators, storage units, stores) and demand carriers (carriers of loads, storage units, stores). Note that carrier names of all components have to be unique. The funtion will return the a dataset or dataarray with two additional dimensions, source_carrier and sink_carrier.
- Parameters
ds (xarray.Dataset) – Allocation Data with dimension sink and source
n (pypsa.Network) – Network which the allocation was derived from
chunksize (int) – Chunksize of the snapshot chunks passed to dask for computing faster and with less memory usage for large datasets.
Example
>>> ap = ntl.flow_allocation(n, n.snapshots, method='ap') >>> ntl.breakdown.carriers(ap, n)
- netallocation.breakdown.expand_by_sink_type(ds, n, chunksize=None, dim='sink')[source]¶
Breakdown allocation into demand types, e.g. Storage carriers and Load.
These include carriers of all components specified by ‘components’. Note that carrier names of all components have to be unique.
- Parameters
ds (xarray.Dataset) – Allocation Data with dimension ‘sink’
n (pypsa.Network) – Network which the allocation was derived from
chunksize (int) – Chunksize of the snapshot chunks passed to dask for computing faster and with less memory usage for large datasets.
dim (str) – Name of dimension to be expanded by carrier (must contain bus names).
Example
>>> ap = ntl.flow_allocation(n, n.snapshots, method='ap') >>> ntl.breakdown.expand_by_sink_carrier(ap, n)
- netallocation.breakdown.expand_by_source_type(ds, n, chunksize=None, dim='source')[source]¶
Breakdown allocation into generation carrier type.
These include carriers of all components specified by ‘components’. Note that carrier names of all components have to be unique.
- Parameters
ds (xarray.Dataset) – Allocation Data with dimension ‘source’
n (pypsa.Network()) – Network which the allocation was derived from
chunksize (int) – Chunksize of the snapshot chunks passed to dask for computing faster and with less memory usage for large datasets.
dim (str) – Name of dimension to be expanded by carrier (must contain bus names).
Example
>>> ap = ntl.flow_allocation(n, n.snapshots, method='ap') >>> ntl.breakdown.expand_by_source_carrier(ap, n)