Nonconvex capex

Hello, dear oemof developers! Thank you very much for fast answers. I started to complicate my Investment-Modell. I found variable capex:

As I understood, I have to use “nonconvex” function, but I can’t complitely get, where should I put my variable capex. Normally I use capex in formula of epc:

capex_var_sole=pd.DataFrame({‘capex’:[2586, 2099, 1773, 1593]}, index=[10, 20, 35, 50])
epc_wp = int(economics.annuity(capex=capex_var_sole, n=n_wp, wacc=0.05))

But this function is not working with variable capex.
And in examples epc is always constant, what is wrong in my case. So I want oemof to find the best Heatpump -Power for my energy district considering variable invest costs depends of this Power. Is it possible?

Hi @AngelinaDenisova,

in oemof.solph, investment optimisation is always linear. We do not have an interface for e.g. piece-wise linear cost like you tried it. However, you can work around the limitation using binary decisions: You could have one heat pump that costs 2586 €/kW and needs a power of at least 10 kW to be built, one for 2099 €/kW with a power of at least 20 kW to be build, one for 1773 €/kW that needs a minimum power of 35 kW and so on.

PS: It would be possible to implement piece-wise linear investment, but nobody demanded it.