Skip to content

Commit

Permalink
Include all dual values reported by the solver
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aranyavenkatesh committed Jul 1, 2022
1 parent 58a029a commit 7ce75cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions temoa_model/pformat_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7ce75cc

Please sign in to comment.