Problem when using linprog - interior-point algorithm

Hello! I am trying to solve the following linear programming problem using MATLAB linprog function
optionsLin = optimoptions('linprog','Display','iter','Algorithm','interior-point',...
'OptimalityTolerance', 1e-8,'MaxIterations',1000,...
'ConstraintTolerance',5e-3);
c = 0.00*grad_displ + 0*1e-5*grad_compr;
LB = []; UB = [];
[Fopt,energy,exitflag] = linprog(c,AA,BB,KCon,bCon,LB,UB,optionsLin);
Since yesterday, the same code seems not to work when a relatively large number of constraints is imposed. Does anyone have any information about possible updates of the optimization toolbox that have caused this issue? Or anyone knows why I am experiencuing this difficulties? ANd above all, anyone that knows how to circumvent this problem?
I am using Matlab 2022b licence, but the same with matlab2023b and 2024a.
Thank you in advance!

9 comentarios

Torsten
Torsten el 21 de Mzo. de 2024
And what has changed since yesterday on your computer ? A new MATLAB installation ?
It didn't change anything (for what I am able to control) when I experienced this problem for the first time.
Then I reinstalled Matlab, updating the version, hoping in a bug to be fixed, but it continued with the same problem. I installed MATLAB also on a different workstation (with UBUNTU) and I have the same problem.
Torsten
Torsten el 21 de Mzo. de 2024
What is the length of c = 0.00*grad_displ + 0*1e-5*grad_compr ?
Does it equal size(AA,2) and size(Kcon,2) ?
What error message do you get from "linprog" ?
It's almost impossible to find the problem with the information given.
The sizes are correct, the ones I have ever used and that work for smaller number of constraints.
The error is inside the built-in MATLAB function linprog. Here is the error message:
===============================================================
Error using optim.algorithm.LinprogInteriorPoint/getExitInfo
This combination of exitflags is not supported.
Error in optim.algorithm.GeneralizedLinear/createExitflagAndMsg
Error in optim.algorithm.GeneralizedLinear/performExitflagAndMsgActions
Error in optim.algorithm.LinprogInteriorPoint/run
Error in linprog (line 366)
[x, fval, exitflag, output, lambda] = run(algorithm, problem);
Error in Turchini_sup (line 190)
[Fopt,energy,exitflag] = linprog(c,AA,BB,KCon,bCon,LB,UB,optionsLin);
===============================================================
Thank you very much for your interest and help
Torsten
Torsten el 21 de Mzo. de 2024
Editada: Torsten el 21 de Mzo. de 2024
I always see the options as
optionsLin = optimoptions(@linprog,...
instead of
optionsLin = optimoptions('linprog',
in the MATLAB documentation. Does this change anything ?
What if you don't use the options command at all ?
Does the error appear right at the beginning of the computation or after a while when the solver could have finished ?
Matt J
Matt J el 21 de Mzo. de 2024
@ANDREA MONTANINO Run the code for us here in the online Matlab environment and see if you get a different result.
It does not change anythong between 'linprog' and @linprog.
If I don't use option command it seems to work, but the algorithm is extremely slow and above all I have no information about what it happening (no display option). The other possible algorithm is the 'dual-simplex' but it is not adapt to my case.
Torsten
Torsten el 21 de Mzo. de 2024
Editada: Torsten el 21 de Mzo. de 2024
Then you should test which of the optimoptions causes the problem by first using display, then display + algorithm etc.
Maybe it's the optimality tolerance because you work with c = 0 - thus you only try to find a feasible solution without optimizing at all.
Thank you for your comment. I removed all the options and finally the problem arises when adopting the 'Algorithm','interior-point'.
Unfortunately the alterantive algorithm ('dual-simplex') is extremely slower and returning very bad solutions, compared with the 'interior-point'. So I absolutely need to restore the functionalities of the previous algorithm.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Versión

R2022b

Preguntada:

el 21 de Mzo. de 2024

Comentada:

el 21 de Mzo. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by