Dual simplex method for problems not dual feasible
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I understand that MATLAB uses the HiGHS Dual Simplex algorithm tas its default solver for Linear Programming problems. What I wanted to know was how does it use the Dual Simplex problems for LP problems that are not Dual Feasible? I am teaching a subject on Linear Programming and I would like my students to have some idea of what is going on behid the scenes. I understand how to use Dual Simplex for problems that are dual feasible, but not sure what MATLAB does when the problem isn't.
Can anyone point me to any references that detail how the dual simplex method works for problems that are not dual feasible. The standard textbooks suggest the two-phase method, but that uses the Primal Simplex method, not the Dual Simplex method. In the reference by Vanderbai he suggests a method where you replace the objectivive function with a dual feasible one for Phase One but then phase 2 uses the Primal simplex method, which misses out on the advantages of the dual simplex method.
Any pointers to the actual method used woulf be much appreciated.
Thanks, Glenn
2 comentarios
Matt J
el 25 de Jun. de 2025
Editada: Matt J
el 25 de Jun. de 2025
If the dual problem is not feasible, the primal is unbounded or infeasible, so the solver will just bail out in that case with an empty solution and a diagnosis message (primal unbounded or primal infeasible). Are you just asking what procedure is followed, after determining dual infeasibility, to diagnose the primal? If so, I imagine that that is handled by the HiGHS software called by Matlab. I don't think Matlab itself does much of the work.
Respuestas (2)
Matt J
el 26 de Jun. de 2025
Editada: Matt J
el 26 de Jun. de 2025
This is not always true.
It is always true, by the Strong Duality Theorem. Once it has been determined that the dual is infeasible, neither Matlab nor HiGHS should have anything else to do but report whether the primal is unbounded or infeasible.
Regarding your example,
max z = -x_1 + 2x_2
s.t. 2x_1 + x_2 <= 4
x_1 - x_2 <= -1
x_1 >= 0, x_2 >= 0
by my math, the dual to this problem is as below, and it is not infeasible. For example y1=2, y2=0 is one feasible point.

6 comentarios
Matt J
el 28 de Jun. de 2025
Editada: Matt J
el 28 de Jun. de 2025
To my understanding:
(1) The dual simplex algorithm (both the HiGHS and legacy implementations) does not introduce slack variables into the dual problem. It still operates on the primal in standard form.
(2) Dual feasibility at a particular iteration is violated iff the reduced cost vector z has some negative entries.
(3) The dual simplex method will not necessarily choose the slack variables as the initial basis. It has ways of choosing the initial basic variables so that the starting point is always dual feasible, i.e., so that z>=0.
In your example problem, the basis x2, s1 works as an initial basis:
f= -[-1; 2];
A = [2 1; 1 -1];
b = [4; -1];
i=[2,3]; %basic variables
Q=[A,eye(2)];
B=Q(:,i);
c=[-f;0;0];
z=c.'- c(i).'*(B\Q) %z>=0 ==> dual feasible
How it locates the initial basis to ensure dual feasibility is murky to me... But if one cannot be found, it means that the dual LP is infeasible as a whole and therefore (by strong duality) the primal LP is not solvable.
Matt J
el 28 de Jun. de 2025
Editada: Matt J
el 28 de Jun. de 2025
Can anyone point me to any references that detail how the dual simplex method works for problems that are not dual feasible.
I came across this,
Section 4 seems relevant to the question of how to get a dual feasible initial basis.
So is MATLAB/HiGHS then using a two-phase method, where it introduces an additional artifical variable?
According to ChatGPT (to the extent you can trust it), both the legacy dual simplex and the HiGHS implementation will indeed resort to a two-phase method if the standard, slack-based initialization fails. However HiGHS has all kinds of preprocessing that might make it harder for that failure to occur.
The Phase I problem is set up as below with auxiiliary variables
.

This auxiliary LP, which always has a trivial dual and primal feasible starting basis (x=0,a=b), is solved using dual simplex. In the course the dual simplex iterations, the reduced cost of both the auxiliary LP and the original LP are monitored. As soon as the following conditions are satisfied at a given iteration, the iterations of Phase I can stop and Phase II can begin.
(1) All a_i=0
(2) All reduced costs in the original problem are >=0
Eventually condition (1) will be reached, since that is the optimal solution for the Phase I LP. However, there is never a guarantee that condition (2) will be reached, even once Phase I converges. In that case, Phase I has failed to find a dual feasible point for the original LP.
If Phase I fails, the algorithm resorts to subsequent heuristic stops, which ChatGPT doesn't elabroate upon, but claims that this event is rare.
0 comentarios
Ver también
Categorías
Más información sobre Direct Search en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!