Modeling weaknesses by using "NonConvex"

Hello OEMOF-Community,
today I found a bigger issue while modeling my energy system in OEMOF.

I tried to give my Hydrogen-Heater a NonConvex-Minimalvalue of 50, what worked fine till I gave it further parameters of working conditions.
First I added Minimum-Values while driving the power plant of minimum bringing 30% of the installed power - what leads to a 30% minimum load, even if heat isn’t needed.
So I decided to add a further restriction “startup_costs” which is a further NonConvex-Variable, which allows the heater to be started and stoped - what also works well.

Adding this restriction, unfortiunately seems to overwrite my NonConvex-Parameter in the Investment-Optimization and sets my Minimum-Value as lowest value (building no heater → installed power = 0) is not possible any more.

Does anybody know a workaround for that? - at the moment I can not find a solution, which alles both NonConvex-Parameters to work together, altough they are not even in the same operation (one in “invest”, one in “flow”)

Here is my code:

Heizkessel_H2 = solph.components.Converter(
    label="Heizkessel_H2",
    conversion_factors = {bus_wärme3: Kennwerte_Wirkungsgrade_Umwandlungsanlagen['Wirkungsgrad/COP in %'][10]/100}, # th. Wirkungsgrad
    inputs={bus_prozessgas_wasserstoff: solph.flows.Flow()},  # Input
    outputs={ bus_wärme3: solph.flows.Flow(
        investment=solph.Investment(
        existing = 0,
        nonconvex= True,
        ep_costs= 180/40/aggregation_factor, # Jährliche Kosten je Inst. Einheit in kW, # Jährliche Kosten je Inst. Einheit in kW bei 40 Jahre Lebensdauer
        minimum = 50*aggregation_factor,  # Mindestanlagengröße 
        maximum = 1000*aggregation_factor),
         min = 0.3,
        nonconvex=solph._options.NonConvex(startup_costs=20),
                )},
      ) 

energysystem.add(Heizkessel_H2)

The above code block provides an example of where the code copy and code view features of Discourse might be useful. If you click on the code view icon you should be able to read the entire stanza without scrolling sideways (although some knowledge of German might help).

Hello @Marius1,

Thanks for taking the time to describe your problem :slight_smile:

Could you share a minimal working example of your model? Such that one could test the two situations which worked independently form each other but not together? Can you also share the version of oemof-solph you are using?

Best Regards,
Pierre-Francois