my task is to model a transformator between a medium and a low voltage grid with energy flows in two directions symbolising the two cases:
Feeding energy from the low voltage grid into the medium voltage grid in case of high renewable generation and
consume energy from the medium voltage grid in case of to less renewable generation to satisfy the load at the low voltage side.
The approach was to use two linear transformers with different flow directions connecting the two grids. The objective function of the Investment-Flow-Method uses the invest (equivalent to the nominal value of the flows after optimization) to calculate the total investment costs. As I have two connections between the grids to simulate the energy flow in two directions I have two invests with different values dependent on the energy flows on that connection. This is the problem. What I want to have is the maximum of the two invests.
So I want to write a Constraint which takes the maximum invest of both flow directions to calculate the total investment costs.
For this, does anyone got an idea? Or got an idea how to get access to the invest variable respectively how to index decent energy flows?
Hope you all got the problem and looking forward for some advice.
You can add a constraint to equalizing both investment variables. Below is a working but trivial example. You have to add your own components.
The best way is to create a very simple example (e.g. pv, wind, demand connected to bel1 and an excess Sink and a shortage Source connected to bel2). Afterwards you can test it with and without the additional constraint.
Hello everyone,
first of all I wanted to build an energy system like this:
Lignite source >> Lignite bus >> Lignite powerplant >> Electricity bus >> El_Demand
solar source >> solar bus >> PV powerplant >> power bus >> El_Demand
Gas source >> [Gas bus, methane bus] >> Gas powerplant >> Electricity bus >> El_Demand
Gas powerplant >> Heat bus >> Th_demand
Electricity bus >> Methane powerplant >> methane bus
But it seems that there is no way for oemof to solve this problem. Or to decide which input is the cheaper one.
My idea was to split the gas power plant. In one with a gas input and one with a methane input. But both must have the same investment. So I wanted to add a constraint.
I ended up here in this thread with a similar problem.
But I don’t understand the command correctly.
I have tried this in different versions: om.InvestmentFlow.investment_costs.expr(invest[i, o])
The output is always the total investment of all transformers, no matter what the input is.