Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Critical and Non-Critical Loads #162

Open
smartie2076 opened this issue Nov 15, 2021 · 3 comments
Open

Implement Critical and Non-Critical Loads #162

smartie2076 opened this issue Nov 15, 2021 · 3 comments
Assignees

Comments

@smartie2076
Copy link
Collaborator

smartie2076 commented Nov 15, 2021

@adnanalakori2020 is interested in implementing a new feature for Offgridders about critical and non-critical loads. Here is the description:

Thus, a new feature is required for the Off-gridders to enable the model to satisfy the energy consumption behavior of hospitals as follows: first, the model must distinguish between two types of loads: critical and non-critical loads. Second, when a dispatch optimization occurs the model must prioritize the critical load. While the non-critical load is still important for assessing and limiting the cost of a backup power system. Thus, we must be able to execute load scenarios on non-critical loads (e.g., 0%, 50%, etc.)

adnanalakori/Offgridders_poweringhealth#2

@smartie2076 smartie2076 changed the title Implement Critical and Non-Critical Loads / Demand Side Management Implement Critical and Non-Critical Loads Nov 15, 2021
@smartie2076
Copy link
Collaborator Author

smartie2076 commented Nov 15, 2021

  • Choose how to split demand into 2 parts: Critical Load and Non-Critical Load

    • a) Two explicit demand profiles with 8760 values?
    • b) Define critical load as a share of the total demand? -> CL = D * factor, D = CL + C, shortage = (1-factor) D -> In this case, critical load and non-critical load might also be possible in Offgridders?
    • Check if shortage_max_timestep (variable: SHORTAGE_MAX_TIMESTEP) is implemented correctly, as it could also be used to define the share of non-critical loads.
    • SHORTAGE_MAX_TIMESTEP should be introduced as constraint in: https://github.com/rl-institut/offgridders/blob/dev/src/G2b_constraints_custom.py#L959
    • :X: Check if constraint is integrated into code -> Function is never called in Offgridders, ie. shortage_max_timestep can not be used currently (also shortage_max_timestep is not implemented #163)
    • Check impact of a) or b) on representation of c/nc loads:
      Calculation-Critical-Non-Critical.xlsx -> We think that a ratio could still lead in critical loads being not supplied. b) seems like a bad choice, will go for a)
  • How can we define a critical and a non-critical demand in the excel input file?
    Current:
    grafik
    Proposal: Add title_demand_ac_critical and title_demand_dc_critical
    --- todos now ---

  • implement title_demand_ac_critical and title_demand_dc_critical in the excel, and define constants in

    TITLE_DEMAND_AC = "title_demand_ac"

  • Run simulation, check that new parameters are in simulation_experiments.csv (output)

  • If not, needs to be implemented in D0 https://github.com/rl-institut/offgridders/blob/dev/src/D0_process_input.py

  • Check that timeseries was parsed correctly, add DEMAND_PROFILE_AC_CRITICAL and DEMAND_PROFILE_DC_CRITICAL

  • Add generate_demand for new critical demands, see

    # ------------demand sink ac------------#

    --- For later ---

  • Run a simulation with demands split into normal and critical demand to compare if KPI like demand_total stay the same (do not use shortage here), and also which do not. We might have to adapt KPI definitions accordingly (G3, G3a, G3b`)

  • Add a constraint that allows shortage to replace non-critical demands (G2b)

  • Think of KPI that represents how much non-critical demand is not covered. Should this be in total_shortage etc?

  • Add plausability tests, ie. is critical demand always supplied, and is the shortage activated ADDITIONALLY? (G3a)

  • Define benchmark test, ie. scenarios where you already can estimate some results and with which we can test that the new feature works.

@adnanalakori
Copy link
Collaborator

Hi @smartie2076 , please find my feedback:

  • The demand critical DC/AC to the timeseries has been added --- > not sure if we shall leave their values empty
    image

  • Adding generate_demand for new critical demands -- > seems it needs to be defined as its reference in G2a?

sink_demand_ac_critical = generate.demand_ac_critical(
       micro_grid_system, bus_electricity_ac, experiment[DEMAND_PROFILE_AC_CRITICAL]
   )

image

@smartie2076
Copy link
Collaborator Author

Hi @adnanalakori! To make it very clear, it is best to "quote reply" or "quote" the things that you are commenting on, so that it is clearer what you are referring to (see my style below)

* The demand critical DC/AC to the timeseries has been added --- > not sure if we shall leave their values empty

We should not leave those values open, because then there is nothing that can be parsed by Offgridders.
I can not say if you can tick the first box - you should commit your changes in a meaningful way (in small chunks with commit messages) and create a pull request. Then I can check your code.

* Adding  generate_demand for new critical demands -- > seems it needs to be defined as its reference in G2a?

I see, I tought that the function generate.demand() was generalized, but it is actually generate.demand_ac() and generate.demand_dc(). My goal would be to add the new demand like this:

sink_demand_ac_critical = generate.demand(
       micro_grid_system, bus_electricity_ac, experiment[DEMAND_PROFILE_AC_CRITICAL], demand_name=DEMAND_AC_CRITICAL
   )

For that, we need to merge the functions generate.demand_ac and generate.demand_dc to function generate.demand.

def demand_ac(micro_grid_system, bus_electricity_ac, demand_profile):

def demand_dc(micro_grid_system, bus_electricity_dc, demand_profile):

The only difference is, that we have to add a term demand_name to the function variables.

I think it would be best if you checked the first boxes first, created a pull request, and then we go into these manipulations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants