Modeling a system which would choose either District Heating system or decentral heating system

Hello modelers,
I am working on a model in oemof solph to optimize district heating system. I am wondering which function to use if I want my model to decide either to opt for DHS or decentral heating system. Could someone give some hints on this? My guess is to use limit_active_flow_by_keyword() , but it seems a bit complicated to use it.

Thank you in advance.

Best Regards,
Dev Malla

Hi Dev Malla,

my first approach would be to allow the system to invest into both, district heating and decentralised heating systems. If one option is better, it will be chosen even without additional constraints. (limit_active_flow_count allows to have both as long as they are not used at the same time, so it won’t help. If needed, it should be possible to have a shared_limit for binary variables in a non-convex investment optimisation. However, that would slow down optimisation significantly.)

Cheers,
Patrik