rl-institut / offgridders

Models and optimizes capacity & dispatch of electricity supply systems, off-grid or connected to a (weak) central grid
GNU General Public License v3.0
21 stars 9 forks source link

[Question] Is it possible to predefine a solar generator's capacity #67

Open JLuij opened 4 years ago

JLuij commented 4 years ago

Hi, I've been playing around with Offgridders and trying different settings to get to know it. It seems like Offgridders will take the input and suggest a system that is to be built from the ground up. My question is whether I can run a scenario in which I already have, say, 500 Wp of PV panels installed. Then Offgridders could simulate additional solar panels or sources (wind, generator) and batteries to fulfill the demand

I thought I could perhaps subtract the generated energy of the installed PV panels from the total demand Demand = Etotal - Epv. However, I think this will lead to incorrect results in the simulation. Could someone give some suggestions?

smartie2076 commented 4 years ago

Hello @JLuij ! Thank you for your interest in Offgridders :) Sadly it is currently not possible to consider existing capacities when optimizing the PV capacities. Your options are:

  1. Let Offgridders optimize your PV capacity
  2. Try to set the PV capacity to a fix value (float) instead of oem, str, None. I am not sure if this works, but in theory it might. You will not be able to optimize the capacity then.
  3. Dirty fix 1: Do the above proposed fix with Demand = Etotal - Epv > 0
  4. Dirty fix 2: Not sure if it works, but you could try to define a DC demand profile that is negative and equal to the expected generation of your existing solar panel.
  5. Dirty fix 3: Manually change the source code here from this
    solph.Flow(
                    label="PV generation",
                    actual_value=pv_norm,
                    fixed=True,
                    investment=solph.Investment(
                        ep_costs=experiment["pv_cost_annuity"] / peak_pv_generation
                    ),
                    variable_costs=experiment["pv_cost_var"] / peak_pv_generation,
                )

    to this:

     solph.Flow(
                    label="PV generation",
                    actual_value=pv_norm,
                    fixed=True,
                    investment=solph.Investment(
                        ep_costs=experiment["pv_cost_annuity"] / peak_pv_generation
                    ),
                    variable_costs=experiment["pv_cost_var"] / peak_pv_generation,
                    existing = YOUR_CAP
                )

    with YOUR_CAPas your preexisting capacity.

  6. Developer level: Propose integrating the existing cap for Offgridders as a feature, fork Offgridders and implement the feature ;)
JLuij commented 4 years ago

Thank you for your helpful answer! I'll look into it in a couple of days.