modex-flexmex / oemof-flexmex

oemof-flexmex is an oemof model built for model comparison within the Modex project FlexMex.
https://oemof-flexmex.readthedocs.io
MIT License
0 stars 0 forks source link

Usecase 7: Electric vehicles #62

Closed jnnr closed 4 years ago

jnnr commented 4 years ago

This usecase tests the flexibility option of electric vehicles.

skizze_bev

TODO

jnnr commented 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.

https://github.com/modex-flexmex/oemo-flex/blob/de08222b1cfd8eab3551eebaa86d6d180080ca4e/oemoflex/postprocessing.py#L547-L551

I could not find out yet why this happens. This leads the script to fail transfering the data just a few lines below.

https://github.com/modex-flexmex/oemo-flex/blob/de08222b1cfd8eab3551eebaa86d6d180080ca4e/oemoflex/postprocessing.py#L560

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.

unndreay commented 4 years ago

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.

  1. 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

  2. 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

  3. 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

  4. 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'
jnnr commented 4 years ago

... 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.