diff --git a/prescient/simulator/oracle_manager.py b/prescient/simulator/oracle_manager.py index 57e3ec4c..8a4652dc 100644 --- a/prescient/simulator/oracle_manager.py +++ b/prescient/simulator/oracle_manager.py @@ -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))