Skip to content

Commit

Permalink
relaxing sanity check in day-ahead pricing (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven authored Oct 29, 2021
1 parent ccffd82 commit 42bc691
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion prescient/engine/egret/egret_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,9 @@ def solve_deterministic_day_ahead_pricing_problem(solver, ruc_results, options,

## Debugging
if pricing_results.data['system']['total_cost'] > ruc_results.data['system']['total_cost'] and not \
math.isclose(pricing_results.data['system']['total_cost'], ruc_results.data['system']['total_cost']):
math.isclose(pricing_results.data['system']['total_cost'],
ruc_results.data['system']['total_cost'],
rel_tol=1e-06, abs_tol=1e-06):
print("The pricing run had a higher objective value than the MIP run. This is indicative of a bug.")
print(f"pricing run cost: {pricing_results.data['system']['total_cost']}")
print(f"MIP run cost : {ruc_results.data['system']['total_cost']}")
Expand Down

0 comments on commit 42bc691

Please sign in to comment.