From 866e4c152423bd6e5ea5946bebc664decef4b9aa Mon Sep 17 00:00:00 2001 From: Bo Yuan Date: Wed, 31 Jan 2024 16:00:16 -0500 Subject: [PATCH] Correct day iteration in timestamp loops Adjusted the range of the for loop iterating through the timestamp_list in multiple scripts. Previously, it stopped just before the last element in timestamp_list; now it includes all elements. This will ensure that all days are processed in the OPF calculations. --- nygrid/run_nygrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nygrid/run_nygrid.py b/nygrid/run_nygrid.py index f197bd8..850978f 100644 --- a/nygrid/run_nygrid.py +++ b/nygrid/run_nygrid.py @@ -267,7 +267,7 @@ def run_nygrid_one_day(s_time, e_time, grid_data, grid_data_dir, opts, init_gen) nygrid_sim.set_gen_ramp_sch(grid_data['genramp30_profile']) nygrid_sim.set_gen_cost_sch(grid_data['gencost0_profile'], grid_data['gencost1_profile']) - if grid_data['genmax_profile_vre'] is not None: + if grid_data.get('genmax_profile_vre', None) is not None: nygrid_sim.set_vre_max_sch(grid_data['genmax_profile_vre']) # Relax branch flow limits