Skip to content

Commit 42bc691

Browse files
authored
relaxing sanity check in day-ahead pricing (#122)
1 parent ccffd82 commit 42bc691

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prescient/engine/egret/egret_plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ def solve_deterministic_day_ahead_pricing_problem(solver, ruc_results, options,
500500

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

0 commit comments

Comments
 (0)