Skip to content

Commit

Permalink
Clean up some key checking
Browse files Browse the repository at this point in the history
Co-authored-by: bknueven <[email protected]>
  • Loading branch information
darrylmelander and bknueven authored Apr 18, 2022
1 parent aa73bae commit 72e3e1e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions prescient/simulator/oracle_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,11 @@ def _report_sced_stats(self, ops_stats: OperationsStats):
if ops_stats.over_generation!= 0.0:
print("Over-generation reported at t=%d - total=%12.2f" % (1, ops_stats.over_generation))

try:
for res in ops_stats.reserve_products:
if ops_stats.reserve_shortfalls[res] != 0.0:
print("Reserve shortfall reported at t=%2d: %12.2f" % (1, ops_stats.reserve_shortfalls[res]))
print("Quick start generation capacity available at t=%2d: %12.2f" % (1, ops_stats.available_quickstart))
print("")
except Exception as ex:
print(ex)
for res in ops_stats.reserve_products:
if res in ops_stats.reserve_shortfalls and ops_stats.reserve_shortfalls[res] != 0.0:
print("Reserve shortfall reported at t=%2d: %12.2f" % (1, ops_stats.reserve_shortfalls[res]))
print("Quick start generation capacity available at t=%2d: %12.2f" % (1, ops_stats.available_quickstart))
print("")

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

0 comments on commit 72e3e1e

Please sign in to comment.