Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"with_loss": true,
"files_to_copy": ["maintenance_meta.json",
"params_load.json",
"params_forecasts.json"],
"save_ref_curve": false,
"day_lag": 0,
"debug": false
}
114 changes: 114 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
from grid2op.Action import PlayableAction, PowerlineSetAction
from grid2op.Observation import CompleteObservation
from grid2op.Reward import RedispReward, AlertReward
from grid2op.Rules import RulesByArea
from grid2op.Chronics import Multifolder
from grid2op.Chronics import GridStateFromFileWithForecastsWithMaintenance
from grid2op.Backend import PandaPowerBackend
from grid2op.Opponent import GeometricOpponentMultiArea, BaseActionBudget

try:
from grid2op.l2rpn_utils import ActionIDF2023, ObservationIDF2023
except ImportError:
from grid2op.Action import PlayableAction
from grid2op.Observation import CompleteObservation
import warnings
warnings.warn("The grid2op version you are trying to use is too old for this environment. Please upgrade it to at least grid2op 1.9.1")
ActionIDF2023 = PlayableAction
ObservationIDF2023 = CompleteObservation

lines_attacked = [["26_31_106",
"21_22_93",
"17_18_88",
"4_10_162",
"12_14_68",
"29_37_117",
],
["62_58_180",
"62_63_160",
"48_50_136",
"48_53_141",
"41_48_131",
"39_41_121",
"43_44_125",
"44_45_126",
"34_35_110",
"54_58_154",
],
["74_117_81",
"93_95_43",
"88_91_33",
"91_92_37",
"99_105_62",
"102_104_61",
]]

opponent_attack_duration = 96 # 8 hours at maximum
attack_every_xxx_hour = 32 # can still change
average_attack_duration_hour = 2 # can still change

# after modifications for infeasibility
th_lim = [ 349., 546., 1151., 581., 743., 613., 69., 801., 731., 953.,
463. , 291. , 876. , 649. , 461. , 916., 281. , 204. , 97. , 251.,
1901., 1356., 601., 793., 351., 509., 409., 566., 339., 899.,
356. , 673. , 543. , 1313. , 411. , 551., 633. , 244. , 589. , 285.,
646. , 418. , 479. , 327. , 1043. , 951., 429. , 871. , 449. , 1056.,
939. , 946. , 759. , 716. , 629. , 486., 409. , 296. , 893. , 411.,
99. , 326. , 506. , 993. , 646. , 257. , 493. , 263. , 323. , 513.,
629. , 566. , 1379. , 659. , 3566. , 423., 306. , 479. , 279. , 376.,
336. , 836. , 759. , 151. , 1143. , 851., 236. , 846. , 397. , 483.,
559. , 216. , 219. , 130. , 1533. , 1733., 916. , 1071. , 513. , 289.,
796. , 773. , 849. , 359. , 566. , 273., 252. , 1119. , 535. , 581.,
83. , 353. , 541. , 316. ,1033. , 379. , 316. ,1221. , 599. , 313.,
371. , 301. , 346. , 449. , 571. , 169., 273. , 88. , 113. , 549.,
446. , 589. , 589. , 279. , 256. , 157., 195. , 221. , 119. , 256.9,
287.5, 326. , 376.6, 179.5, 927.9, 223., 90. , 119. , 75. , 79.,
317.9, 921. , 236. , 249. , 118. , 693., 671. , 453. , 318.5, 427.2,
689. , 701. , 372. , 721. , 616. , 616., 108.7, 340.2, 223. , 384.,
409. , 309. , 696. , 1393. , 1089. , 1751., 341. , 883. , 791. , 661.,
689. , 397. , 1019. , 2063. , 2056. , 1751., ]


this_rules = RulesByArea([[0, 1, 2, 3, 10, 11, 116, 13, 12, 14, 4, 5, 6, 15, 7, 8, 9,
23, 27, 28, 26, 30, 114, 113, 31, 112, 16, 29, 25, 24, 17,
18, 19, 20, 21, 22, 24, 71, 70, 72],
[32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, 48, 64, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 66, 65],
[69, 73, 74, 117, 75, 76, 77, 78, 79, 80, 98, 97, 96, 95, 94,
93, 99, 98, 105, 103, 104, 106, 107, 108, 111, 109, 110, 102,
100, 92, 91, 101, 100, 90, 89, 88, 87, 84, 83, 82, 81, 85, 86,
68, 67, 115]
])


config = {
"backend": PandaPowerBackend,
"action_class": ActionIDF2023,
"observation_class": ObservationIDF2023,
"reward_class": RedispReward,
"gamerules_class": this_rules,
"chronics_class": Multifolder,
"data_feeding_kwargs":{"gridvalueClass": GridStateFromFileWithForecastsWithMaintenance,
"h_forecast": [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]
},
"volagecontroler_class": None,
"names_chronics_to_grid": None,
"thermal_limits": th_lim,
"opponent_budget_per_ts": 0.17 * 3.,
"opponent_init_budget": 1000.,
"opponent_attack_cooldown": 0,
"opponent_attack_duration": 96,
"opponent_action_class": PowerlineSetAction,
"opponent_class": GeometricOpponentMultiArea,
"opponent_budget_class": BaseActionBudget,
"kwargs_opponent": {
"lines_attacked": lines_attacked,
"attack_every_xxx_hour": attack_every_xxx_hour,
"average_attack_duration_hour": average_attack_duration_hour,
"minimum_attack_duration_hour": 1,
"pmax_pmin_ratio": 4
},
"other_rewards": {"alert": AlertReward}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"0": {
"NO_OVERFLOW_DISCONNECTION": true,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 9999,
"NB_TIMESTEP_COOLDOWN_SUB": 0,
"NB_TIMESTEP_COOLDOWN_LINE": 0,
"HARD_OVERFLOW_THRESHOLD": 9999,
"NB_TIMESTEP_RECONNECTION": 0,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1,
"ALERT_TIME_WINDOW": 4
},
"1": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 6,
"NB_TIMESTEP_COOLDOWN_SUB": 0,
"NB_TIMESTEP_COOLDOWN_LINE": 0,
"HARD_OVERFLOW_THRESHOLD": 3.0,
"NB_TIMESTEP_RECONNECTION": 1,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1,
"ALERT_TIME_WINDOW": 6
},
"2": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 3,
"NB_TIMESTEP_COOLDOWN_SUB": 1,
"NB_TIMESTEP_COOLDOWN_LINE": 1,
"HARD_OVERFLOW_THRESHOLD": 2.5,
"NB_TIMESTEP_RECONNECTION": 6,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1,
"ALERT_TIME_WINDOW": 9
},
"competition": {
"NO_OVERFLOW_DISCONNECTION": false,
"NB_TIMESTEP_OVERFLOW_ALLOWED": 3,
"NB_TIMESTEP_COOLDOWN_SUB": 3,
"NB_TIMESTEP_COOLDOWN_LINE": 3,
"HARD_OVERFLOW_THRESHOLD": 2.0,
"NB_TIMESTEP_RECONNECTION": 12,
"IGNORE_MIN_UP_DOWN_TIME": true,
"ALLOW_DISPATCH_GEN_SWITCH_OFF": true,
"ENV_DC": false,
"FORECAST_DC": false,
"MAX_SUB_CHANGED": 1,
"MAX_LINE_STATUS_CHANGED": 1,
"ALERT_TIME_WINDOW": 12
}
}
1,792 changes: 1,792 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/grid.json

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/loads_charac.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name,bus,Pmax,zone,PF,type,x,y,vn_kv
load_0_0,0,56.4,R1,0.0,residential,30,-29,138.0
load_1_1,1,22.1,R1,0.0,residential,86,-29,138.0
load_2_2,2,43.1,R1,0.0,residential,57,-71,138.0
load_3_3,3,33.2,R1,0.0,residential,62,-101,138.0
load_5_4,5,57.5,R1,0.0,residential,116,-167,138.0
load_6_5,6,21.0,R1,0.0,residential,152,-171,138.0
load_7_6,7,5.0,R1,0.0,residential,74,-293,345.0
load_10_7,10,77.4,R1,0.1,residential,116,-104,138.0
load_11_8,11,51.9,R1,0.0,residential,191,-82,138.0
load_12_9,12,37.6,R1,0.0,residential,222,-162,138.0
load_13_10,13,15.5,R1,0.0,residential,267,-124,138.0
load_14_11,14,99.5,R1,0.1,residential,284,-159,138.0
load_15_12,15,27.6,R1,0.0,residential,174,-215,138.0
load_16_13,16,11.9,R1,0.0,residential,245,-250,138.0
load_17_14,17,66.3,R1,0.1,residential,317,-250,138.0
load_18_15,18,49.7,R1,0.0,residential,351,-212,138.0
load_19_16,19,19.9,R1,0.0,residential,343,-229,138.0
load_20_17,20,15.5,R1,0.0,residential,352,-367,138.0
load_21_18,21,11.1,R1,0.0,residential,361,-396,138.0
load_22_19,22,7.7,R1,0.0,residential,351,-434,138.0
load_23_20,23,10.0,R1,0.0,residential,489,-345,138.0
load_26_21,26,68.5,R1,0.1,residential,124,-425,138.0
load_27_22,27,18.8,R1,0.0,residential,113,-381,138.0
load_28_23,28,26.5,R1,0.0,residential,115,-337,138.0
load_30_24,30,47.5,R1,0.0,residential,161,-337,138.0
load_31_25,31,65.2,R1,0.1,residential,200,-364,138.0
load_32_26,32,15.9,R2,0.0,residential,505,-95,138.0
load_33_27,33,40.7,R2,0.0,residential,548,-155,138.0
load_34_28,34,22.7,R2,0.0,residential,469,-220,138.0
load_35_29,35,21.4,R2,0.0,residential,570,-214,138.0
load_38_30,38,17.5,R2,0.0,residential,580,-83,138.0
load_39_31,39,12.8,R2,0.0,residential,612,-46,138.0
load_40_32,40,24.0,R2,0.0,residential,662,-46,138.0
load_41_33,41,24.0,R2,0.0,residential,700,-46,138.0
load_42_34,42,11.7,R2,0.0,residential,657,-162,138.0
load_43_35,43,10.4,R2,0.0,residential,675,-128,138.0
load_44_36,44,34.4,R2,0.0,residential,684,-204,138.0
load_45_37,45,18.2,R2,0.0,residential,668,-233,138.0
load_46_38,46,22.1,R2,0.0,residential,702,-238,138.0
load_47_39,47,13.0,R2,0.0,residential,732,-193,138.0
load_48_40,48,56.5,R2,0.0,residential,772,-249,138.0
load_49_41,49,11.0,R2,0.0,residential,828,-142,138.0
load_50_42,50,11.0,R2,0.0,residential,850,-130,138.0
load_51_43,51,11.7,R2,0.0,residential,745,-91,138.0
load_52_44,52,14.9,R2,0.0,residential,749,-47,138.0
load_53_45,53,73.4,R2,0.1,residential,790,-48,138.0
load_54_46,54,40.9,R2,0.0,residential,899,-46,138.0
load_55_47,55,54.5,R2,0.0,residential,844,-45,138.0
load_56_48,56,7.8,R2,0.0,residential,828,-103,138.0
load_57_49,57,7.8,R2,0.0,residential,849,-103,138.0
load_58_50,58,179.8,R2,0.2,residential,950,-69,138.0
load_59_51,59,50.6,R2,0.0,residential,950,-164,138.0
load_61_52,61,50.0,R2,0.0,residential,913,-311,138.0
load_65_53,65,25.3,R2,0.0,residential,845,-311,138.0
load_66_54,66,18.2,R2,0.0,residential,861,-287,138.0
load_69_55,69,68.7,R1,0.1,residential,582,-346,138.0
load_71_56,71,15.0,R1,0.0,residential,540,-337,138.0
load_72_57,72,5.0,R1,0.0,residential,581,-300,138.0
load_73_58,73,70.8,R1,0.1,residential,560,-463,138.0
load_74_59,74,48.9,R1,0.0,residential,582,-485,138.0
load_75_60,75,44.1,R2,0.0,residential,688,-486,138.0
load_76_61,76,39.6,R2,0.0,residential,718,-518,138.0
load_77_62,77,46.1,R2,0.0,residential,740,-462,138.0
load_78_63,78,25.3,R2,0.0,residential,771,-439,138.0
load_79_64,79,84.4,R2,0.1,residential,778,-486,138.0
load_81_65,81,86.8,R3,0.1,residential,685,-554,138.0
load_82_66,82,32.1,R3,0.0,residential,578,-583,138.0
load_83_67,83,17.7,R3,0.0,residential,564,-602,138.0
load_84_68,84,38.6,R3,0.0,residential,560,-643,138.0
load_85_69,85,33.7,R3,0.0,residential,560,-671,138.0
load_87_70,87,77.1,R3,0.1,residential,603,-643,138.0
load_89_71,89,125.3,R3,0.1,residential,654,-685,138.0
load_90_72,90,10.0,R3,0.0,residential,737,-688,138.0
load_91_73,91,104.5,R3,0.1,residential,742,-644,138.0
load_92_74,92,19.3,R3,0.0,residential,769,-620,138.0
load_93_75,93,48.2,R3,0.0,residential,800,-583,138.0
load_94_76,94,67.5,R3,0.1,residential,761,-583,138.0
load_95_77,95,61.1,R3,0.1,residential,772,-556,138.0
load_96_78,96,9.7,R2,0.0,residential,770,-530,138.0
load_97_79,97,22.1,R2,0.0,residential,819,-510,138.0
load_98_80,98,20.0,R2,0.0,residential,858,-487,138.0
load_99_81,99,59.5,R3,0.0,residential,851,-582,138.0
load_100_82,100,35.4,R3,0.0,residential,833,-672,138.0
load_101_83,101,8.0,R3,0.0,residential,777,-671,138.0
load_102_84,102,37.0,R3,0.0,residential,895,-672,138.0
load_103_85,103,61.1,R3,0.1,residential,901,-579,138.0
load_104_86,104,49.8,R3,0.0,residential,942,-583,138.0
load_105_87,105,69.1,R3,0.1,residential,941,-506,138.0
load_106_88,106,44.4,R3,0.0,residential,988,-582,138.0
load_107_89,107,3.2,R3,0.0,residential,948,-625,138.0
load_108_90,108,12.9,R3,0.0,residential,951,-650,138.0
load_109_91,109,62.7,R3,0.1,residential,937,-699,138.0
load_111_92,111,40.2,R3,0.0,residential,987,-699,138.0
load_112_93,112,15.0,R1,0.0,residential,203,-276,138.0
load_113_94,113,8.8,R1,0.0,residential,188,-399,138.0
load_114_95,114,24.3,R1,0.0,residential,229,-401,138.0
load_115_96,115,5.0,R2,0.0,residential,781,-362,345.0
load_116_97,116,22.1,R1,0.0,residential,257,-81,138.0
load_117_98,117,21.4,R2,0.0,residential,628,-487,138.0
17 changes: 17 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/maintenance_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"maintenance_starting_hour": 9,
"maintenance_ending_hour": 17,
"line_to_maintenance": ["26_31_106", "21_22_93", "17_18_88", "4_10_162", "12_14_68",
"29_37_117","62_58_180", "62_63_160", "48_50_136", "48_53_141",
"41_48_131", "39_41_121", "43_44_125", "44_45_126", "34_35_110",
"54_58_154", "74_117_81", "80_79_175", "93_95_43", "88_91_33",
"91_92_37"],
"daily_proba_per_month_maintenance": [0.0, 0.0, 0.0,
0.02, 0.02, 0.03,
0.05, 0.06, 0.03,
0.02, 0.0, 0.0],
"max_daily_number_per_month_maintenance": [0, 0, 0,
1, 2, 3,
3, 3, 2,
1, 0, 0]
}
4 changes: 4 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dt": 5,
"planned_std": "0.01"
}
34 changes: 34 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/params_forecasts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"h": [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60],
"nb_h_iid": 5,
"n_neighbors": 208 ,
"h_std_load_old": [0.0223606797749979,
0.031622776601683795,
0.03872983346207417,
0.0447213595499958,
0.050,
0.05477225575051661,
0.05916079783099616,
0.06324555320336759,
0.06708203932499369,
0.070710678118654755,
0.07416198487095663,
0.07745966692414834],
"h_std_load": [
0.0223606797749979, 0.031622776601683795,
0.03872983346207417, 0.0447213595499958,
0.050, 0.05477225575051661,
0.05916079783099616, 0.06324555320336759,
0.06708203932499369, 0.070710678118654755,
0.07416198487095663, 0.07745966692414834
],
"h_std_wind": [0.00745356, 0.01054093, 0.01290994, 0.01490712, 0.01666667,
0.01825742, 0.01972027, 0.02108185, 0.02236068, 0.02357023,
0.02472066, 0.02581989],
"h_std_solar": [0.00745356, 0.01054093, 0.01290994, 0.01490712, 0.01666667,
0.01825742, 0.01972027, 0.02108185, 0.02236068, 0.02357023,
0.02472066, 0.02581989],
"leaf_size_knn" : 100,
"algorithm_knn" : "kd_tree"

}
9 changes: 9 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/params_load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Lx": 1000,
"Ly": 1000,
"dx_corr": 250,
"dy_corr": 250,
"temperature_corr": 400,
"std_temperature_noise": 0.06,
"load_q_from_p_coeff": 0.7
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../l2rpn_idf_2023_v0/params_loss.json
18 changes: 18 additions & 0 deletions input_data/generation/case118_l2rpn_idf_2023/params_opf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"step_opf_min": 5,
"mode_opf": null,
"reactive_comp": 1,
"losses_pct": 2.5,
"dispatch_by_carrier": false,
"ramp_mode": "hard",
"pyomo": false,
"solver_name": "cbc",
"slack_name": "gen_68_37",
"slack_pmin": 40.0,
"slack_pmax": 300.0,
"slack_ramp_limit_ratio": 0.5,
"PmaxErrorCorrRatio": 0.9,
"RampErrorCorrRatio": 0.9,
"renewable_in_opf": true,
"hydro_ramp_reduction_factor": 1.3
}
Loading