Closed jnnr closed 4 years ago
The usecase runs. Mapping results from oemoflex_scalars to the results template does not work yet - the numbers do not find their way into their place. This is because when filtering for the requested value, a series with an index is returned and not a float.
I could not find out yet why this happens. This leads the script to fail transfering the data just a few lines below.
Update: It was caused by duplicate entries in the multiindex. Marginal costs were listed in the attributes, but they were not processed anywhere. This lead to get_varom_cost
yielding empty data, all with the same index. I removed the marginal_cost
in 0e21c7b , which fixed the problem.
Updated some files after changes on usecase 3 that affect this usecase here, too.
Since this usecase still needs some coding, here are the parts which may need a change if sequences from the Sink
('drive_power'
) subnode have to be processed.
Sink
must be overwirtten just like Source
and Transformer
to let it have the carrier
and tech
property. Use the Source/inflow subnode as a template: https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/facades.py#L7-L19 and hand over the property values in init()
https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/facades.py#L488-L489
The drive_power subnode has to be kept in mind similar to... https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/postprocessing.py#L275-L276 ...and later, all nodes must be checked against it: https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/postprocessing.py#L312-L313
An exception has to be added to the exclusion of bus subnodes: https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/postprocessing.py#L323-L324
Finally, the if conditions to rename the node at https://github.com/modex-flexmex/oemo-flex/blob/991a08dd9a83ca29321d84c7178836fd78d01833/oemoflex/postprocessing.py#L330-L338 have to be extended with:
or isinstance(component, Source) and name[1] == 'drive_power'
... if sequences from the
Sink
('drive_power'
) subnode have to be processed.
They are fixed, so no new information on the drive power is created by running the model. So we will leave that out.
This usecase tests the flexibility option of electric vehicles.
TODO