Hello pypsa community!
I have been using pypsa-eur for a few months, doing simulations on the spanish electricity system and the behaviour of the resulting market.
With the latest addition of the statistics module, I have been playing around the concept of market value, which I believe is computed as n.statistics.revenue / n.statistics.dispatch for each technology in pypsa network, where n.statistics.dispatch is the active power at the bus.
This gives a measure of the price captured for each technology in terms of €/MWh
However, in the case of StorageUnits, the active power at the bus, computed for all the snapshots and properly weighted, will always be less or equal than 0. This is because computing the active power involves subtracting the discharge to the charge. Given that the roundtrip efficiency of the unit is less or equal than 1, the charge will always be higher than the discharge and the corresponding n.generator.dispatch will be negative.
Consequently, the market value displayed for StorageUnits loses its meaning.
I propose to compute the market value for StorageUnits as revenue/abs(charge), which maintains the techno-economic meaning of captured price.
Let me know if I missunderstood any othe above concepts or if you find this idea interesting.
Best,
Eduardo.