From 7ce75cc759e318534ffd3a14a10ec140f18249d5 Mon Sep 17 00:00:00 2001 From: Aranya Venkatesh <40495316+aranyavenkatesh@users.noreply.github.com> Date: Fri, 1 Jul 2022 15:14:31 -0400 Subject: [PATCH] Include all dual values reported by the solver This commit modifies how duals are reported to the Output_Duals table. Here, all the dual values as reported by the solver are reported directly. Duals with an absolute value of less than 1e-5 are ignored. Note that selecting this option through the config file can cause the output database to increase in size. --- temoa_model/pformat_results.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/temoa_model/pformat_results.py b/temoa_model/pformat_results.py index 0cbf3520..f42ae825 100644 --- a/temoa_model/pformat_results.py +++ b/temoa_model/pformat_results.py @@ -116,8 +116,7 @@ def collect_result_data( cgroup, clist, epsilon): supp_outputs_df = supp_outputs_df.loc[(supp_outputs_df != 0).any(axis=1)] if 'Dual' in supp_outputs_df.columns: duals = supp_outputs_df['Dual'].copy() - duals = -duals - duals = duals[duals>epsilon] + duals = duals[abs(duals)>1e-5] duals.index.name = 'constraint_name' duals = duals.to_frame() if (hasattr(options, 'scenario')) & (len(duals)>0):