NREL / SAM

System Advisor Model (SAM)
BSD 3-Clause "New" or "Revised" License
342 stars 141 forks source link

Add "enter single value" option for grid outage #1132

Open williamhobbs opened 2 years ago

williamhobbs commented 2 years ago

Is your feature request related to a problem? Please describe.

When I use the Grid Outage feature, I often want to model a grid outage in all timesteps. To modify the grid outage array to be "1" in every time step, I have to use an external spreadsheet tool and then copy/paste the values. Adding options for users to automatically set all time steps to "1" (or back to "0") would be nice.

Describe the solution you'd like

Something like this:

image

Or dedicated buttons for "0" and "1", as those are the only valid options.

Describe alternatives you've considered

Copying the default "0" values to a spreadsheet, changing them to "1", copying from the spreadsheet, and pasting back into SAM.

cpaulgilman commented 1 year ago

This requires modifying the Data Array widget to add an optional property like the one for the Monthly Factors widget that assigns a single value to all time steps.

A workaround for now is to use this LK script to assign the value.

grid-outage-single-value.zip

To use the script:

  1. Unzip the file to extract grid-outage-single-value.lk.
  2. Start SAM and open or create a case with behind-the-meter battery storage.
  3. On the File menu, click Open script and open the .lk file from Step 1.
  4. In the script editor, click Run at the top of the window.

The script checks that the Grid outage variable is enabled on the Grid Outage page, prompts you for a single value (0 or 1), and sets the grid outage values to the single value you enter.

cpaulgilman commented 1 month ago

Another option that avoids modifying the Data Array widget and would be easy to implement is to add a "Grid outage in all time steps" checkbox that sets the value of grid_outage to [1,1,...,1,1], although this requires checking for the correct time step.

janinefreeman commented 3 weeks ago

Discussed at SAM meeting using the full adjustment factor widget for this input, going to try to find funding to do that