Multi-point optimisation - Storage constraints and power lines

Hello all,
I am new in this group, but in modeling and using oemof and python as well.
I am working on a multi-point optimisation of an energy system, where each point, or each node has defined energy components (sources, demand, transformers, storages).
The optimisation objective is efficiency, so the energy should be sent where is most efficient.
I struggle with two problems:

  1. Transfering energy between 2 points: at the moment i am using 2 transforms, point 1–> point 2, and point 2–> point 1. There must be simpler and cleverer solution to define power lines and transfer of electricity. COuld you maybe give me hints in that regard?
    2.Loops in the system: i have the problem where energy is being destroyed by sending it to a lopp between 2 points, or takes big amounts of energy from the storage, uses very small amount of it, and the rest goes back to storage; so it doesn’t just take from storage as much as it needs.
    Is there a way to constrain the storage so that it can’t charge and discharg at the same time?

Hope to hear (read) from you :slight_smile:

Hi Roberta,

  1. If you do not need the Transformer (e.g. for losses) It’s perfectly fine to connect two Busses using Flows. Theoretically, Flows (between Busses) can even be declared to be bidirectional, so there would be no more loop, but that feature is rarely used. So, be careful with that. (Some parts of the code assume Flows to be positive, but there is no check to guarantee that.)
  2. If loops are used to waste energy, it’s beneficial for your system to do so. While it’s possible to forbid these, I would avoid to set up constraints that hide easy indicators like these. (I’d even recommend to have an explicit “excess energy” sink.) If you forbid the loop through the storage, the storage might be used to store energy in one time step and be discharged in the next one. This cannot be forbidden but the only reason for this usage was to waste energy - now in a more sophisticated way.


Thank you Patrick for your response.

Regarding the transfer of eelctricity, i need to consider the transmission losses as well, so i think that the transformer would be better solution.
I tried adding a sink (for the excess energy) for each point → that worked: loops were not created and no energy was sent to the sink since the storage has enpugh capacity.

I will see if this behaviour stays the same when adding more points.