Solver stopped prematurely. No integer feasible point found

조회 수: 1 (최근 30일)
梦娇 何
梦娇 何 2022년 5월 31일
댓글: 梦娇 何 2022년 7월 15일
Solver stopped prematurely. No integer feasible point found (exitflag=0)
Problem description: There are value ranges of N units respectively, and their sum is required to be fixed, and the value of unit should be 0 as far as possible. Where, the sum of the units is the input value of the function, and the value ranges are the operation result of the previous code. The integer variable is the state variable of whether the unit has a value of 0.
Using intlinprog function: Put it into the optimization algorithm, there will be problems (Solver stopped prematurely. No integer feasible point found) if the number of iterations is too long. But it worked fine again when I ran only the outermost part of the code that reported the error. In theory, integer variables can all be 1 or 0, and that situation (No integer feasible point found) won't happen. So i don't kown why?
Code (MATLAB R2020a): n=9
f=[0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1];%objective
aeq=[1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0];
beq= -1.1918e+03;%change
A=[-1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0 0 0;1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0 0 0;0 -1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0 0;0 1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0 0;0 0 -1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0;0 0 1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0 0;0 0 0 -1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0;0 0 0 1 0 0 0 0 0 0 0 0 8000 0 0 0 0 0;0 0 0 0 -1 0 0 0 0 0 0 0 0 8000 0 0 0 0;0 0 0 0 1 0 0 0 0 0 0 0 0 8000 0 0 0 0;0 0 0 0 0 -1 0 0 0 0 0 0 0 0 8000 0 0 0;0 0 0 0 0 1 0 0 0 0 0 0 0 0 8000 0 0 0;0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 8000 0 0;0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 8000 0 0;0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 8000 0;0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 8000 0;0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 8000;0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 8000];
B=[8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000 8000];
intcon=[10 11 12 13 14 15 16 17 18];
lp=[-108.1824 -274.4183 -336.4196 -124.7959 -74.1171 -45.8906 -307.1947 -307.1947 -293.3694 0 0 0 0 0 0 0 0 0];%number1-9 change
up=[3.7743 0 0 -15.7397 34.9391 63.1656 0 0 13.8253 1 1 1 1 1 1 1 1 1];%number1-9 change
options = optimoptions('intlinprog','Display','off');
[jz1,fval,exitflag,output]=intlinprog(-f,intcon,A,B,aeq,beq,lp,up,options);

답변 (1개)

Torsten
Torsten 2022년 5월 31일
편집: Torsten 2022년 5월 31일
I get the following solution
0.
- 159.2453
0.
- 124.7959
0.
0.
- 307.1947
- 307.1947
- 293.3694
1.
0.
1.
0.
1.
1.
0.
0.
0.
with a value of -4 (since you maximize f, +4) of the objective function.
  댓글 수: 9
Torsten
Torsten 2022년 6월 1일
Up to now, you didn't show a setup for which intlinprog failed.
So just post the case and I'll try to find out the reason.
梦娇 何
梦娇 何 2022년 7월 15일
Torsten, I changed the version from 2020a to 2021b and the problem wouldn't happen.
Thanks a lot.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Programming and Mixed-Integer Linear Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by