Skip to content

soc and energy is calculated and written twice for storage units #710

@gugrimm

Description

@gugrimm

There are 2 places with similar / same functionality to calculate and write "energy" and "soc" of storage units to their outputs.

  • "set_dispatch_plan(self, marketconfig, orderbook)" of class SupportsMinMaxCharge, expanding on the "set_dispatch_plan" function of BaseUnit
  • "execute_current_dispatch(self, start, end)" of class Storage

When a UnitsOperator handles market feedback regarding a Storage, (handle_market_feedback), he does "self.set_unit_dispatch", where "set_dispatch_plan" of class SupportsMinMaxCharge is called (soc and energy are written to the unit output the first time).
Then he does "write_actual_dispatch", where "get_actual_dispatch" is called, which includes "execute_current_dispatch" of class Storage (soc and energy are written to the unit output again).

For PowerPlant and Demand units, this is not the case (correct behavior): When handling market feedback of a PowerPlant, the UnitsOperator does "self.set_unit_dispatch", calling "set_dispatch_plan" of class BaseUnit (which does NOT write "energy" to outputs). Then when self.write_actual_dispatch is executed, calling "execute_current_dispatch" of PowerPlant, where "energy" is written to outputs.

Is there an explanation for the double calculation and overwriting of outputs? Opinions welcome on how to solve this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions