Skip to content

Commit 72e3e1e

Browse files
Clean up some key checking
Co-authored-by: bknueven <30801372+bknueven@users.noreply.github.com>
1 parent aa73bae commit 72e3e1e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

prescient/simulator/oracle_manager.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,11 @@ def _report_sced_stats(self, ops_stats: OperationsStats):
325325
if ops_stats.over_generation!= 0.0:
326326
print("Over-generation reported at t=%d - total=%12.2f" % (1, ops_stats.over_generation))
327327

328-
try:
329-
for res in ops_stats.reserve_products:
330-
if ops_stats.reserve_shortfalls[res] != 0.0:
331-
print("Reserve shortfall reported at t=%2d: %12.2f" % (1, ops_stats.reserve_shortfalls[res]))
332-
print("Quick start generation capacity available at t=%2d: %12.2f" % (1, ops_stats.available_quickstart))
333-
print("")
334-
except Exception as ex:
335-
print(ex)
328+
for res in ops_stats.reserve_products:
329+
if res in ops_stats.reserve_shortfalls and ops_stats.reserve_shortfalls[res] != 0.0:
330+
print("Reserve shortfall reported at t=%2d: %12.2f" % (1, ops_stats.reserve_shortfalls[res]))
331+
print("Quick start generation capacity available at t=%2d: %12.2f" % (1, ops_stats.available_quickstart))
332+
print("")
336333

337334
if ops_stats.renewables_curtailment > 0:
338335
print("Renewables curtailment reported at t=%d - total=%12.2f" % (1, ops_stats.renewables_curtailment))

0 commit comments

Comments
 (0)