Closed lbianchi-lbl closed 2 years ago
I'm working with the example as part of one of my projects, and I found that inserting an extra solve between the two costing methods in the "Create and Initialize the NGCC + SOEC Model" cell helps the convergence:
# add capital costing
add_results_for_costing(m)
res = solver.solve(m, tee=True) # solve just new variables
get_ngcc_soec_capital_cost(m)
res = solver.solve(m, tee=True) # solve all costing
@eslickj, it may be useful to update the solver settings such as the solver tolerance or bound push to decrease the runtime. Please let us know your thoughts on this, if you have a moment.
Update: I implemented this fix as part of #151 and it appears to resolve the issue.
Sorry, just noticed this issue. Is it new? I can take a look, but would it be better to just wait for the new costing framework? Since this example saves time by loading saved model states, sometimes changes to core models will break things like this and it helps to delete the saved states and rebuild them.
The failures are relatively new and only occur intermittently on PR or nightly CI runs, sometimes as solver issues but most often as timeouts. @lbianchi-lbl found this and I tagged you before opening the new costing PRs, and I agree with you on waiting for 151 and reassessing.
Long runtimes
Solver failures