Different results in CSV files when comparing GLPK outputs vs CBC/otoole
I'll leave this to @trevorb1 to add information because i'm not going to act as if I have any clue what's going on:)
The snakemake workflow solves through CBC and passes the results into otoole to generate the result csv files. There are some weird results in these csvs (such as capacity differences between NewCapacity, TotalCapacityAnnual, and AccumulatedNewCapacity). These differences are not seen if we process the model through GLPK, which generates the csvs automatically.
At first I thought it was me just inputting the arguments into otool wrong, but I stepped through our workflow using simplicity and everything worked fine. The otoole results matched GLPK results. So it seems to be something specific to our workflow.
Compare the raw result files before processing. Check if CBC and GLPK text file outputs are the same (no processing) to help narrow down the issue. Also, run the model through CPLEX to see check the solution quality. It may just be since all our parameter data are not yet populated, weird things are happening in the solve process that GLPK and CBC are handling differently.
Solution quality seems fine according to cplex (see below), as I am specifically looking at condition number (see page 150) and Ax-b residual. But I am still getting different solutions from GLPK, CBC, CPLEX. Maybe since quite a few techs have the same default values for costs and efficiencies, its fairly arbitrary on which one the model decides to invest in?
CPLEX> display solution quality Max. unscaled (scaled) bound infeas. = 4.26326e-13 (3.41061e-12) Max. unscaled (scaled) reduced-cost infeas. = 5.21669e-18 (6.52086e-19) Max. unscaled (scaled) Ax-b resid. = 2.04636e-12 (1.17097e-11) Max. unscaled (scaled) c-B'pi resid. = 4.33681e-19 (4.33681e-19) Max. unscaled (scaled) |x| = 6772.09 (6772.09) Max. unscaled (scaled) |slack| = 6250.21 (50001.7) Max. unscaled (scaled) |pi| = 1 (1) Max. unscaled (scaled) |red-cost| = 7131.17 (7131.17) Condition number of scaled basis = 4.0e+03
@trevorb1 Can this issue be closed?
yeah, I believe this got solved. Thanks @maartenbrinkerink !