Problem with configuring minimum uptime of heat pump in oemof


I just stumbled over oemof and I really like it! At the moment am doing my first steps and have a little problem and couldn’t find a solution.

I am trying to set up a minimum / maximum runtime for a heat pump to avoid pulsing. But the optimizer seems to ignore it. The heat pump is still shut on and off just for one time step. The min and max parameter is working. Can you please check if I am doing something wrong?

Here is my code:

energysystem.add(solph.Transformer(label="heatPump", inputs={bel: solph.Flow()},
                           outputs={bheat: solph.Flow(nominal_value=2000,
                           conversion_factors={bheat: 3}))

I am using oemof 0.2.1 and the CBC solver

Thank you!

Hi Gernot,

the min-uptime has to be defined within the nonconvex-object!

From the example repository:

pp1 = solph.Source(
        bel: solph.Flow(
            nominal_value=10, min=0.5, max=1.0, variable_costs=10,
            nonconvex=solph.NonConvex(minimum_downtime=4, initial_status=0)


Now it is working.
Thank you very much!

You are welcome.

Just be aware that the simultaneous usage of up- and downtimes might lead to conflicts (e.g. infeasible problems) in some situtations, especially in the “border regions” meaning the first and last time steps.

Good luck!

Could you mark this topic as solved?

Another way to soften pulsing is to define gradient costs. It is not as strict as a minimum time but may have similar effects. In contrast to minimum times the problem is still linear (faster) instead of mixed integer. You could try that alternatively.

Text and images licensed under CC BY 4.0Data licensed under CC0 1.0Code licensed under MITSite terms of serviceOpenmod mailing list.