简体   繁体   English

在 Mosek+Cvxpy 中访问次优解

[英]Accessing suboptimal solution in Mosek+Cvxpy

We are using Mosek solver via its Cvxpy interface.我们通过其 Cvxpy 接口使用 Mosek 求解器。

We deal with large-scale optimization problem on a regular-basis and sometimes the runtime is very high.我们定期处理大规模优化问题,有时运行时间非常长。 So, we specify a upper limit on runtime using Mosek's mosek.dparam.optimizer_max_time parameter.因此,我们使用 Mosek 的mosek.dparam.optimizer_max_time参数指定了运行时间的上限。

In those cases, the pain-point is that we get no solution.在那些情况下,痛点是我们得不到解决方案。

Is it possible to get the suboptimal/best found solution so far?到目前为止是否有可能获得次优/最佳解决方案?

If Mosek did not find any feasible integer solution within the time limit then there is nothing to return, so you get nothing.如果 Mosek 在限定时间内没有找到任何可行的 integer 解决方案,那么就没有任何东西可以返回,所以你什么也得不到。

If Mosek found some feasible integer solution then CVXPY should return it with solution status s.OPTIMAL_INACCURATE, judging from a quick look at the code.如果 Mosek 找到了一些可行的 integer 解决方案,那么 CVXPY 应该返回它,解决方案状态为 s.OPTIMAL_INACCURATE,从快速查看代码来判断。

So the question is what does it say in the log output and what happens at the end of the optimization when CVXPY is processing the answer from the solver.所以问题是它在日志 output 中说了什么,以及当 CVXPY 正在处理求解器的答案时优化结束时会发生什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM