I have implemented a linear programme using Linopy and use the HiGHS solver to solve it with the interior point method.
For this application, I don't need to run crossover on the solution. When I pass the run_crossover='off'
option to HiGHS through linopy, HiGHS behaves as expected and skips the crossover step, however, linopy does not consider the model optimised when this step is omitted. Do you know how to obtain the solution from linopy in this scenario?
Example log message from HiGHS:
Ipx: IPM optimal
WARNING: LP solver residuals: primal = 0.0710581; dual = 0.0473415 yield num/max/sum primal (391784/0.0710581/6.24267) and dual (463677/0.0473415/3.47325) corrections
WARNING: Unwelcome IPX status of Unknown: basis is not valid; solution is valid; run_crossover is "off"
Model name : linopy-problem-m_vf1rkb
Model status : Unknown
IPM iterations: 48
Objective value : -2.8809874134e+07
Relative P-D gap : 7.5484672674e-01
HiGHS run time : 141.71
Writing the solution to /private/var/folders/4p/qywpknvj5qx89qh1g6vy1qlc0000gn/T/linopy-solve-28b76k6g.sol
And the following log message from linopy:
Solution status unknown. Trying to parse solution.
Optimization failed:
Status: unknown
Termination condition: unknown
Solution: 1786176 primals, 1456848 duals
Objective: -2.88e+07
Solver model: available
Solver message: unknown
I have implemented a linear programme using Linopy and use the HiGHS solver to solve it with the interior point method.
For this application, I don't need to run crossover on the solution. When I pass the run_crossover='off'
option to HiGHS through linopy, HiGHS behaves as expected and skips the crossover step, however, linopy does not consider the model optimised when this step is omitted. Do you know how to obtain the solution from linopy in this scenario?
Example log message from HiGHS:
Ipx: IPM optimal
WARNING: LP solver residuals: primal = 0.0710581; dual = 0.0473415 yield num/max/sum primal (391784/0.0710581/6.24267) and dual (463677/0.0473415/3.47325) corrections
WARNING: Unwelcome IPX status of Unknown: basis is not valid; solution is valid; run_crossover is "off"
Model name : linopy-problem-m_vf1rkb
Model status : Unknown
IPM iterations: 48
Objective value : -2.8809874134e+07
Relative P-D gap : 7.5484672674e-01
HiGHS run time : 141.71
Writing the solution to /private/var/folders/4p/qywpknvj5qx89qh1g6vy1qlc0000gn/T/linopy-solve-28b76k6g.sol
And the following log message from linopy:
Solution status unknown. Trying to parse solution.
Optimization failed:
Status: unknown
Termination condition: unknown
Solution: 1786176 primals, 1456848 duals
Objective: -2.88e+07
Solver model: available
Solver message: unknown
Share
asked Mar 3 at 10:43
ModoCharlieModoCharlie
11 bronze badge
1
- Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Bot Commented Mar 5 at 21:57
2 Answers
Reset to default 1The interior point solver converged to a primal-dual feasible point according to its internal test, based on primal and dual feasibility and relative duality gap (you can see this because IPX logs the status optimal, in the first line).
However, after post-processing, the solution does not satisfy the optimality test anymore (this can happen when the problem is badly scaled for example), and so the status that HiGHS returns is not optimal, but unknown.
If you allow crossover, for example by setting run_crossover="choose", the interior point solver runs crossover if the solution is not precise, i.e. exactly the case that you encountered. In that case, the solver would attempt to obtain a more precise solution running crossover, and potentially even running the simplex if everything else failed.
Something must have changed in between v0.3.15 and v0.5.0 of linopy that makes this problem disappear. Maybe it is related to some options that are passed to HiGHS, or maybe the version of HiGHS used internally has changed.
This issue can be resolved by upgrading to the latest version of linopy. The example error runs off v0.3.15. Once upgraded to v0.5.0, this is no longer a problem.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745098463a4611127.html
评论列表(0条)