how to escape while searching optimal solution for "intlinprog" after 10 seconds?
1 次查看(过去 30 天)
显示 更早的评论
If an optimal solution exists, it takes less than 2 seconds for solving my "intlinprog". But, when it doesn't, searching for the optimal solution won't end forever. I want to stop searching after 10 seconds of searching whatever the result is. Please help me.
0 个评论
采纳的回答
Achyutha Hosahalli
2018-2-20
You can use "MaxTime" option.
For example :
options = optimoptions('intlinprog','MaxTime',10);% where MaxTime is a Positive real value that is the maximum time in seconds that intlinprog runs.Default value is 7200
And then run intlinprog with options
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Robotics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!