필터 지우기
필터 지우기

Intlinprog stopped at the root node because the objective value is within a gap tolerance of the optimal value, options.Ab​soluteGapT​olerance = 0 (the default value). The intcon variables are integer within tolerance, options.IntegerTolerance = 1e-05

조회 수: 28 (최근 30일)
Hi,
I'm trying to solve a integer program, and I'm getting this error:
Intlinprog stopped at the root node because the objective value is within a gap tolerance of the optimal value, options.AbsoluteGapTolerance = 0 (the default value). The intcon
variables are integer within tolerance, options.IntegerTolerance = 1e-05 (the default value).
y =
1.0e+04 *
0.3000
0
0.7000
0.3000
1.0000
0.5000
The actual answer to this solution is 3000,0,7000,3000,10000,5000. But I'm getting it in 10^-4 form. I'm not able to rectify it. Please help me.

답변 (1개)

nathan welch
nathan welch 2020년 3월 6일
편집: nathan welch 2020년 3월 6일
So it appears Intlinprog has found your solution, so it's not really an error. It's just telling you that it's done the best job it can with the tolerances it's got.
The result it displays is just in a form that looks different - probably because they are not exactly integers.
You have two choices:
The simple way, use y = round(y). This will set the values in y to be the nearest integer value, as you've solved it to within 1e-05 this should work well.
The difficult way, you can set options.IntegerTolerance = 1e-12 or even smaller to force Intlinprog to keep solving until it finds the exact integer solution but there's no guarantee that this will work and will depend on the problem - it may just cause it to keep running for a very long time or hit the iteration limit.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by