Solver stopped prematurely. No integer feasible point found

1 visualizzazione (ultimi 30 giorni)
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);

Risposte (1)

Torsten
Torsten il 31 Mag 2022
Modificato: Torsten il 31 Mag 2022
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 Commenti
Torsten
Torsten il 1 Giu 2022
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.
梦娇 何
梦娇 何 il 15 Lug 2022
Torsten, I changed the version from 2020a to 2021b and the problem wouldn't happen.
Thanks a lot.

Accedi per commentare.

Categorie

Scopri di più su Linear Programming and Mixed-Integer Linear Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by