-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add example 5bus case, contingency screening capability, and #128
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b9695fb
initial pass at 5bus example
bknueven b498ff3
allowing default forecastables
bknueven b7d9eb3
relaxing line limits
bknueven d83fc15
adding runner script
bknueven 98e5e1f
correcting issue with REAL_TIME period resolution
bknueven 2648385
Revert "relaxing line limits"
bknueven f761158
updating network and adding generator
bknueven 83125f5
Merge remote-tracking branch 'upstream/main' into 5bus_case
bknueven 14c6133
ensure reserve factor is honored even if not pre-existing
bknueven b64e822
first pass at enabling contingency monitoring
bknueven cd27dfa
Merge remote-tracking branch 'upstream/main' into 5bus_case
bknueven db7f120
considering more flexible thermal units
bknueven 6121da4
Merge remote-tracking branch 'upstream/main' into 5bus_case
bknueven 5802160
adding contingency reporting
bknueven 722781f
updating price thresholds
bknueven 5027a88
Merge remote-tracking branch 'upstream/main' into 5bus_case
bknueven f87863d
switching penalty logic to use grid-parity-exchange/Egret#259
bknueven 8e22559
NFC: removing finished TODO
bknueven 70cc152
Merge branch 'main' into 5bus_case
bknueven 2e9f96e
Merge branch 'main' into 5bus_case
bknueven 0dcbd1e
fixing names
bknueven 4c3147f
adding python simulator script
bknueven 0ebc525
Merge branch '5bus_case' of github.com:bknueven/Prescient into 5bus_case
bknueven 57eacf4
more reasonable mipgap
bknueven 99887e8
removing violation, for now
bknueven 3af7f83
Fix spelling, update variable name
darrylmelander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
UID,From Bus,To Bus,R,X,B,Cont Rating,LTE Rating,STE Rating,Tr Ratio | ||
"branch_2_3",2,3,0.00108,0.0108,0.01852,80.0,92.0,104.0,0 | ||
"branch_1_2",1,2,0.00281,0.0281,0.00712,66.6,76.6,86.6,0 | ||
"branch_1_4",1,4,0.00304,0.0304,0.00658,66.6,76.6,86.6,0 | ||
"branch_4_10",4,10,0.00297,0.0297,0.00674,66.6,76.6,86.6,0 | ||
"branch_1_10",1,10,0.00064,0.0064,0.03126,66.6,76.6,86.6,0 | ||
"branch_3_4_0",3,4,0.00297,0.0297,0.00337,66.6,76.6,86.6,1.05 | ||
"branch_3_4_1",3,4,0.003274425,0.03274425,0.003056689,28.4,32.7,36.9,0.952380952 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Bus ID,Bus Name,BaseKV,Bus Type,MW Load,MVAR Load,V Mag,V Angle,Area,Zone | ||
1,bus1,230,PV,0,0,1,0.048935018,1,1 | ||
4,bus4,230,Ref,28.5714286,9.3907143,1,0,1,1 | ||
10,bus5,230,PV,0,0,1,0.06266308,1,1 | ||
2,bus2,230,PQ,21.4285714,7.0435714,1.04407,-0.012822061,2,1 | ||
3,bus3,230,PV,21.4285714,7.0435714,1,-0.009768957,2,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
GEN UID,Bus ID,Unit Type,Fuel,MW Inj,MVAR Inj,V Setpoint p.u.,PMax MW,PMin MW,QMax MVAR,QMin MVAR,Min Down Time Hr,Min Up Time Hr,Ramp Rate MW/Min,Start Time Cold Hr,Start Time Warm Hr,Start Time Hot Hr,Start Heat Cold MBTU,Start Heat Warm MBTU,Start Heat Hot MBTU,Non Fuel Start Cost $,Fuel Price $/MMBTU,Output_pct_0,Output_pct_1,Output_pct_2,Output_pct_3,Output_pct_4,HR_avg_0,HR_incr_1,HR_incr_2,HR_incr_3,HR_incr_4 | ||
3_CT,3,CT,G,0,0,1,20,8,20,-20,1,1,3,,,1,,,51.75,0,0.75,0.4,0.6,0.8,1,,135722.5,97862.5,98072.5,107135, | ||
10_STEAM,10,STEAM,C,0,0,1,76,30,76,-76,4,8,2,12,10,4,11383.41,10488.35,7355.42,0,1,0.394736842,0.596052632,0.798684211,1,,30166.66667,14402.61434,17182.46753,18283.66017, | ||
4_CC,4,CC,G,0,0,1,100,10,55,-55,3,3,3.7,,,3,,,5665.23,0,0.5,0.4,0.6,0.8,1,,51019.54545,26818.18182,29550.90909,30308.18182, | ||
4_STEAM,4,STEAM,O,0,0,1,12,5,12,-12,2,4,1,12,4,2,703.76,455.37,393.28,0,1.5,0.416666667,0.608333333,0.808333333,1,,179457.9999,124504.3483,125050,133643.478, | ||
10_PV,10,PV,S,0,0,1,25.9,0,0,0,,,,,,,,,,0,,,,,,,,,,, | ||
2_RTPV,2,RTPV,S,0,0,1,9.3,0,0,0,,,,,,,,,,0,,,,,,,,,,, | ||
1_HYDRO,1,HYDRO,H,0,0,1,50,0,16,-10,,,,,,,,,,0,,,,,,,,,,, | ||
4_WIND,4,WIND,W,0,0,1,120,0,0,0,,,,,,,,,,0,,,,,,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
3_CT,10_STEAM,4_CC,4_STEAM | ||
24,-24,24,-24, | ||
14,0,40,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Reserve Product,Requirement (MW) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Simulation_Parameters,Description,DAY_AHEAD,REAL_TIME | ||
Periods_per_Step,the number of discrete periods represented in each simulation step,24,1 | ||
Period_Resolution,seconds per period,3600,300 | ||
Date_From,simulation beginning period,01/01/2020 0:00,12/31/2020 0:00 | ||
Date_To,simulation ending period (must account for lookahed data availability),01/01/2020 0:00,12/31/2020 0:00 | ||
Look_Ahead_Periods_per_Step,the number of look ahead periods included in each optimization step,24,2 | ||
Look_Ahead_Resolution,look-ahead period resolution,3600,300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Simulation,Category,Object,Parameter,Data File | ||
DAY_AHEAD,Generator,1_HYDRO,PMin MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Generator,2_RTPV,PMin MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Generator,1_HYDRO,PMax MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Generator,2_RTPV,PMax MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Generator,10_PV,PMax MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Generator,4_WIND,PMax MW,DAY_AHEAD_renewables.csv | ||
DAY_AHEAD,Area,1,MW Load,DAY_AHEAD_load.csv | ||
DAY_AHEAD,Area,2,MW Load,DAY_AHEAD_load.csv | ||
REAL_TIME,Generator,1_HYDRO,PMin MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Generator,2_RTPV,PMin MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Generator,1_HYDRO,PMax MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Generator,2_RTPV,PMax MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Generator,10_PV,PMax MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Generator,4_WIND,PMax MW,REAL_TIME_renewables.csv | ||
REAL_TIME,Area,1,MW Load,REAL_TIME_load.csv | ||
REAL_TIME,Area,2,MW Load,REAL_TIME_load.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from prescient.simulator import Prescient | ||
|
||
# set some options | ||
prescient_options = { | ||
"data_path":"./5bus/", | ||
"input_format":"rts-gmlc", | ||
"simulate_out_of_sample":True, | ||
"run_sced_with_persistent_forecast_errors":True, | ||
"output_directory":"5bus_output", | ||
"start_date":"07-10-2020", | ||
"num_days":7, | ||
"sced_horizon":1, | ||
"ruc_mipgap":0.01, | ||
"reserve_factor":0.1, | ||
"deterministic_ruc_solver":"cbc", | ||
"deterministic_ruc_solver_options":{"feas":"off", "DivingF":"on",}, | ||
"sced_solver":"cbc", | ||
"sced_frequency_minutes":5, | ||
"ruc_horizon":36, | ||
"compute_market_settlements":True, | ||
"monitor_all_contingencies":True, | ||
"output_solver_logs":False, | ||
"price_threshold":1000, | ||
"contingency_price_threshold":100, | ||
"reserve_price_threshold":5, | ||
} | ||
# run the simulator | ||
Prescient().simulate(**prescient_options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
command/exec simulator.py | ||
--data-directory=5bus | ||
--input-format=rts-gmlc | ||
--simulate-out-of-sample | ||
--run-sced-with-persistent-forecast-errors | ||
--output-directory=5bus_output | ||
--start-date=07-10-2020 | ||
--num-days=7 | ||
--sced-horizon=1 | ||
--ruc-mipgap=0.01 | ||
--reserve-factor=0.1 | ||
--deterministic-ruc-solver=cbc | ||
--deterministic-ruc-solver-options="feas=off DivingG=on" | ||
--sced-solver=cbc | ||
--sced-frequency-minutes=5 | ||
--ruc-horizon=36 | ||
--compute-market-settlements | ||
--monitor-all-contingencies | ||
#--output-solver-logs | ||
--price-threshold=1000 | ||
--contingency-price-threshold=100 | ||
--reserve-price-threshold=5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of this function-local static variable makes the code not thread safe. For now that's OK, but at some point we might want to address it. create_sced_instance.shutdown_curves is another example of this.
Linked to Issue #130.