intlinprog returns non-optimal solution. Can you help me finding the problem?

2 Ansichten (letzte 30 Tage)
I have large constraint Matrix A,b, Aeq, beq. I select an easy case where I know the solution for x (and negative cost) and I can prove true:
logical(A*x_example <= b)
logical(Aeq*x_example == beq)
logical(x_example >= lb )
logical(x_example <= ub)
But intlinprog returns a result with zero cost.
options = optimoptions('intlinprog','Display','final');
[x_sol,fval,eflag,output] = intlinprog(-f,1:length(f),A,b,Aeq,beq,lb,ub,options);
This is a my cost (positiv real) function f =
(1,1) 0.2300
(3,1) 0.1069
(4,1) 0.2700
(5,1) 0.0400
(6,1) 0.1100
(8,1) 4.0000
(15,1) 0.2300
(19,1) 4.0000
%...
(106,1) 0.2300
(108,1) 0.1069
(109,1) 0.2700
(110,1) 0.0400
(111,1) 0.1100
(113,1) 4.0000
(120,1) 0.2300
(124,1) 4.0000

Antworten (1)

Frederik Hesselmann
Frederik Hesselmann am 21 Feb. 2018
Bearbeitet: Frederik Hesselmann am 21 Feb. 2018
I found two Problems.
the function 'logical()' doesnt care about whether x is integer or not. The solution I have suggested is not integer. This is the reason why my test using 'logical()' wasnt correct. Checking 'isinteger(x)' is also necessary.
Though this doesnt explain why my result is wrong using 'intlinprog' but I know now that I have to look in the constraints. I found indeed that due to cutting of digits some equalities are violated. Using boundary solves the problem.
  1 Kommentar
Nicola Blasuttigh
Nicola Blasuttigh am 1 Dez. 2021
Hi man, sorry but probably I have the same problem about cutting digits. How do you solve it? What do you mean with boundary?
Thanks

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by