linprog ignores options, why?

I'm executing:
options = optimoptions( 'linprog' );
options.Algorithm = 'interior-point';
%options.Algorithm = 'dual-simplex';
options.Display = 'iter';
options.MaxIterations = 100;
options.OptimalityTolerance = 1e-2;
options.Preprocess = 'basic';
options.MaxTime = 1;
options
x = linprog( c, A, b, [], [], [], [], options );
linprog completely ignores the options: it doesn't show any output, and it takes 2sec instea of 1. No matter the algorithm, the performance is the same.
On the subject. How do I set a warm start x0?
How do I stop the simplex prematurely after finding the 10th feassible vertex?

6 comentarios

John D'Errico
John D'Errico el 12 de Ag. de 2022
Knowing which MATLAB release you are using would be pertinent, before anyone can even try to answer your question..
Walter Roberson
Walter Roberson el 12 de Ag. de 2022
https://www.mathworks.com/help/optim/ug/linprog.html#buusznx-options
MaxTime is supported only for dual-simplex
Zohar
Zohar el 12 de Ag. de 2022
I filled matlab 2021a when I posted the question. I assumed it was shown(?).
It doesn't matter which method--same for dual simplex.
Bruno Luong
Bruno Luong el 12 de Ag. de 2022
Editada: Bruno Luong el 12 de Ag. de 2022
Can you run with exitflag and output
[x, fval, exitflag, output] = linprog( c, A, b, [], [], [], [], options )
and share them?
Bruno Luong
Bruno Luong el 12 de Ag. de 2022
"How do I set a warm start x0?"
It is NOT possible.
"How do I stop the simplex prematurely after finding the 10th feassible vertex?"
What vertex? MATLAB propose 2 algorithms, interior points and dual-simplex.
In both cases the intermediate results are NOT primal feasible vertex. So finding feasible vertex is meanigless for both algorithm.
Zohar
Zohar el 12 de Ag. de 2022
I should have checked the output: it says mosek. Mosek put itself first in the path and overrode matlab functions with its own (linprog in this case), in the style of don't bother yourself with that. Can't say I disagree with the sentiment, but a warning or some info when I request it would have been nice.
I haven't reached yet the part of the course about the dual simplex, and I had the primal simplex in mind, which isn't supported.
Good tips Bruno, consider posting the comments as an answer.

Iniciar sesión para comentar.

 Respuesta aceptada

Bruno Luong
Bruno Luong el 12 de Ag. de 2022
Can you run with exitflag and output
[x, fval, exitflag, output] = linprog( c, A, b, [], [], [], [], options )
and share them?
"How do I set a warm start x0?"
It is NOT possible.
"How do I stop the simplex prematurely after finding the 10th feassible vertex?"
What vertex? MATLAB propose 2 algorithms, interior points and dual-simplex.
In both cases the intermediate results are NOT primal feasible vertex. So finding feasible vertex is meanigless for both algorithm

Más respuestas (0)

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 12 de Ag. de 2022

Respondida:

el 12 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by