Further Numerical Results for a New Lagrange Method for Solving Convex Quadratic Optimization Problems ()
1. Introduction
Optimization problems arise naturally in real life situations, as alluded to by Leonhard Euler [1]; it is thus no wonder that the study of Classical Optimization has grown rapidly over the last sixty years, especially due to the advent of the electronic computer and software development, just as its related counterpart of Linear Optimization has also grown. These have enabled numerical experimentations with solution algorithms using large scale problems, which otherwise was impossible to do. This in turn has spurred on the quest to solve large-scale real-world problems with consequent positive impact on the quality and standard of living of humanity.
Classical optimization basically refers to Nonlinear Optimization [2], which pre-dates Linear Optimization which gained impetus for rapid and revolutionary growth during the Second World War period and after [3]. Many specializations and classifications have evolved from nonlinear optimization, also called Nonlinear Programming (NP); notable amongst which is Convex Optimization (also known as Convex Programming (CP)), which has gained a lot of interest in recent times, with applications discovered in many fields including computer science, robotics and signal processing [4]. The current work is situated within a subclass of problems in Convex Optimization, known as Convex Quadratic Programming (CQP). Although they belong to the universal class of NP problems, due to their special properties [4], special solution algorithms or methods have been developed for solving them more efficiently, among which are the interior point methods.
Just as NP problems, CQP problems are also solvable by the classical Lagrange Multiplier method, for equality constrained types, and the Karush-Kuhn-Tucker (KKT) method, for both equality and mixed inequality-equality types of problems [5]. The work reported in this paper investigates further a modified version of the classical Lagrange Multiplier method, earlier developed by the authors (see [6]), in terms of performance at solving large scale CQP problems, against that of the classical Lagrange method. CQP problems are characterized by either a linear or convex quadratic objective function and linear or convex quadratic constraints [7]. Typically, it may be denoted by:
(1.1)
where
is a vector of n decision variables,
is
dimensional constant vector,
and
are respectively
symmetric positive semi-definite and
constant matrices, and
is
dimensional constant vector [8]. If the objective function is linear and constraints a mixture of linear, nonlinear, convex quadratic equations, the problem becomes:
(1.2)
where,
is linear, or convex quadratic function, for some
. A brief review of the classical Lagrange method (CLM) applied to CQP problems is necessary therefore.
Consider a CQP problem in the form:
where
and
are respectively linear objective function and convex quadratic or linear
constraint function, for some
. Putting
, the problem may be posed as:
(1.3)
The CLM constructs a Lagrangian function [7] from problem (1.3) as:
(1.4)
where
is a Lagrangian function,
is a vector of constraint functions and
is a vector of
unknown multipliers (scalars). Therefore, the equality constrained problem (1.3), by the construction of the Lagrangian function, is transformed into an unconstrained problem to which the first order necessary optimality conditions of unconstrained optimization can be applied, leading to the equations:
(1.5)
(1.6)
For convex problems the conditions (1.5) and (1.6) are both necessary and sufficient for a minimum solution of (1.4) and so of (1.3) [9]. Therefore, if there exists a solution
,
to (1.5) and (1.6), then it is a solution to (1.4) also, and vice versa. From the equations (1.5) and (1.6), we obtain a system of m + n equations which are solved simultaneously to furnish the solution. High computational effort and time is required when m and n are very large. A method that obtains the minimum solution with relatively less effort and in a shorter time, therefore, becomes desirable. This is the motivation for the current work.
For some previous related works involving the Lagrange method, readers are referred to [10] [11], Fortin and [12]-[17]. The next two sections respectively present a review of the modified Lagrange method (MLM) as presented in [6], and the results from applications of the method to some hypothetical problems. The paper concludes with some highlights from the MLM and future prospects for it.
2. A Review of the MLM
The MLM is premised on the grounds that instead of simultaneous solution of the problems (1.5) and (1.6), as the case is in CLM, the solution
can be obtained independently from (1.5) alone, and thereafter the solution
can also be obtained from the same (1.5). The MLM, therefore effectively departs from the CLM by decomposing the solution process into two independent ones, where the entire solution is obtained solely on the basis of (1.5). For more details the reader is referred to [6].
The scalar form of Equation (1.5) is:
(2.1)
We observe that (2.1) is a system of
equations in
variables of
and
variables of
. Since
and
both identically vanish at
for any
and
, in spite of
[6] it means
is arbitrary for all
, as far as finding
from (2.1) is concerned, and so
can be chosen arbitrarily [6]. Choosing
for some
and
for all
,
, we obtain the result:
[6] (2.2)
From (2.2),
can be eliminated by taking ratios involving ordered pairs of
(see [6]). For instance, by taking ratios of the
and the
equations
we obtain the equations:
which are generalized as:
leading to:
(2.3)
The Equation (2.3) are called Subsidiary Constraint Equations (SCE), as in [6], and for each
, they produce
equations. For CQP problems, the SCE are linear. The SCE therefore become additional available equations to the m original ones from
, yielding
equations in
only and which generally are simpler to solve for
in the kind of problem studied. As observed in [6], some of the equations in (2.3) can be redundant. Different forms of ordering of the ratios have been found to improve the situation and address the issue of redundant equations. For instance, taking consecutive ratios between the first equation and subsequent ones, yield:
where
and
. This is generalized as:
It follows that:
(2.4)
Also, taking aggregates of the SCE as in (2.4) tend to be more effective against producing redundant equations [6]. Summing therefore SCE of (2.4) for
, involving
, we obtain:
which is the same as:
(2.5)
From the SCE (2.4) or (2.5), it is noted that various sums involving two (2) or more SCE can be produced. This is indication that a variety of SCE derived from aggregating some other SCE can be created as in (2.5). Thereafter, the resulting SCE, together with the constraint equations
can be solved simultaneously to find independently the minimum solution
; the corresponding minimum objective function value
can therefore be obtained. Furthermore, the optimal value
can be independently obtained from the solution of the system of equations:
which involves the variables
only,
.
3. Numerical Results
This section is divided into two: The first compares the performance of the MLM against the CLM in connection with solving small-size problems; the second compares the MLM against the CLM for medium-to-large-size problems. Three (3) small-size problems and four (4) medium-to-large problems were run in MATLAB and their run times, objective function values, number of iterations, the solutions obtained (including values of the multipliers), and number of function evaluations compared. The problems considered in this paper are limited to linear equality constraints.
The results are presented in Tables 1-3 for the small-size problems and in Tables 4-7 for the medium-to-large problems. The Sequential Quadratic Programming algorithm in MATLAB was used in running the problems with some modified codes incorporated in MATLAB for running the MLM (see the Appendix). The termination tolerance on the function value in MATLAB was 1e−20; the tolerance on the constraint violation was 1e−06; the maximum function evaluations were 100*number of variables; maximum number of iterations allowed was 400; Termination tolerance on the step size was taken to be 1e−06; Termination tolerance on the first-order optimality is taken as 1e−06.
3.1. Small-Size Problems
The problems are taken from [18]. Problem P1 consists of five (5) decision variables and two (2) constraints, Problem P2 consists of five (5) decision variables and three (3) constraints and Problem P3 consists of five (5) decision variables and three (3) constraints. The results are displayed in Tables 1-3.
Table 1. Performance of MLM against CLM in Problem P1.
|
CLM |
MLM |
Initial values |
[0, 0, 0, 0, 0]T |
[0, 0, 0, 0, 0]T |
Number of iterations |
9 |
3 |
Run time (Sec) |
0.0340 |
0.0330 |
Objective function value |
2.1012e−16 |
21012e−16 |
Solutions (
) |
[1, 1, 1, 1, 1]T |
[1, 1, 1, 1, 1]T |
Solutions (
) |
[−0.3947e−07, 0.0510e−07]T |
[−0.3947e−07, 0.0510e−07]T |
Function Evaluations |
50 |
18 |
Table 2. Performance of MLM against CLM in Problem P2.
|
CLM |
MLM |
Initial values |
[0, 0, 0, 0, 0]T |
[0, 0, 0, 0, 0]T |
Number of iterations |
6 |
6 |
Run time (s) |
0.0216 |
0.0204 |
Objective function values |
5.3266 |
5.3266 |
Solution (
) |
[−0.0946, 0.0315,0.5158, −0.4527, 0.0315]T |
[−0.0946, 0.0315,0.5158, −0.4527, 0.0315]T |
Solution (
) |
[3.2779, 2.9054, 7.7479]T |
[3.2779, 2.9054, 7.7479]T |
Function Evaluations |
50 |
50 |
Table 3. Performance of MLM against CLM in Problem P3.
|
CLM |
MLM |
Initial values |
[0, 0, 0, 0, 0]T |
[0, 0, 0, 0, 0]T |
Number of iterations |
6 |
2 |
Run time (s) |
0.0257 |
0.0243 |
Objective function value |
4.0930 |
4.0930 |
Solution (
) |
[−0.7674, 0.2558, 0.6279, −0.1163, 0.2558]T |
[−0.7674, 0.2558, 0.6279, −0.1163, 0.2558]T |
Solution (
) |
[2.0465, 2.2326, −5.9533]T |
[2.0465, 2.2326, −5.9533]T |
Function Evaluations |
44 |
40 |
3.2. Medium to Large-Size Problems
The four (4) problems P4 to P7 are hypothetically constructed CQP problems, generally of the form:
where
,
,
,
,
.
Problem P4 has
and
.
is composed of entries 9 on its main diagonal and 7 on its off-diagonals; c has 1 for each of its components and
is 1. The matrix
is extracted as a submatrix of size 15 × 50 from a 50 × 50 identity matrix. Each component of the vector
is 1, formed by summing up the corresponding elements of each row of
.
Problem P5 has
and
.
has entries
on its main diagonal and
on its off-diagonal; c has 1 for each of its components and
is 2.5. The matrix
is extracted as a submatrix of size 100 × 200 from a tridiagonal matrix with entries 2, 1 and 1 of size 200 × 200. The components of the vector
are formed by summing up the corresponding elements of each row of
.
Problem P6 has
and
.
has16 on its main diagonal entries and 7 on its off-diagonal entries. c has 1 as components and
is 1. The matrix
is of size 30 × 500 with 1 as its elements. The components of the vector
are the sums of the corresponding elements of each row of
.
Problem P7 has
, and
.
has
on its main diagonal and
on its off-diagonal; each component of c is 1 and the value of
is 10. The matrix
is 100 × 200 with 1 as its entries. The components of the vector
are formed by summing up the corresponding elements of each row of
.
Tables 4-7 present the computational results obtained after solving the problems in MATLAB.
Table 4. Performance of the MLM against CLM in Problem P4.
|
CLM |
MLM |
Initial value |
|
|
Number of iterations |
5 |
5 |
Run time (s) |
11.2429 |
10.1382 |
Objective function value |
22.4271 |
22.4271 |
Solution (
) |
Same as CLM |
Same as MLM |
Solution (
) |
Same as CLM |
Same as MLM |
Function Evaluations |
319 |
319 |
Table 5. Performance of MLM against CLM in Problem P5.
|
CLM |
MLM |
Initial value |
|
|
Number of iterations |
7 |
9 |
Run time (s) |
35.6007 |
33.1118 |
Objective function value |
197.0847 |
197.0847 |
Solution (
) |
Did not converge |
Converged to solution |
Solution (
)` |
No solution |
Solution obtained |
Function Evaluations |
3051 |
2027 |
Table 6. Performance of MLM against CLM in Problem P6.
|
CLM |
MLM |
Initial value |
|
|
Number of iterations |
6 |
4 |
Run time (s) |
18.3523 |
17.0087 |
Objective function value |
128.2319 |
134.7099 |
Solution (
) |
Did not converge |
Converged to solution |
Solution (
) |
No solution |
Solution obtained |
Function Evaluations |
3539 |
2013 |
Table 7. Performance of MLM against CLM in Problem P7.
|
CLM |
MLM |
Initial values |
|
|
Number of iterations |
4 |
2 |
Run time (s) |
0.0876 |
0.0639 |
Objective function value |
212.0049 |
212.0049 |
Solution (
) |
Same as MLM |
Same as CLM |
Solution (
) |
Same as MLM |
Same as CLM |
Function Evaluations |
6028 |
2268 |
To give a quick glance at all the results presented in Tables 1-7, a composite table (Table 8) is constructed. The following keys are used in Table 8 as headings: Initial Value (IV), Number of Iterations (NIT), Run-Time (RT), Objective Function Value (OFV), Solution (SLN), and Number of Function Evaluations (NFE).
Table 8. Composite table of results for problems P1 to P7.
Problem |
Method |
IV |
NIT |
RT (s) |
OFV |
SLN (
) |
SLN (
) |
NFE |
P1 |
CLM |
|
9 |
0.0340 |
2.1012e−16 |
Same as MLM |
Same as MLM |
50 |
MLM |
|
3 |
0.0330 |
2.1012e−16 |
Same as CLM |
Same as CLM |
18 |
P2 |
CLM |
|
6 |
0.0216 |
5.3266 |
Same as MLM |
Same as MLM |
50 |
MLM |
|
6 |
0.0204 |
5.3266 |
Same as CLM |
Same as CLM |
50 |
P3 |
CLM |
|
6 |
0.0257 |
4.0930 |
Same as MLM |
Same as MLM |
44 |
MLM |
|
2 |
0.0243 |
4.0930 |
Same as CLM |
Same as CLM |
40 |
P4 |
CLM |
|
5 |
11.2429 |
22.4271 |
Same as MLM |
Same as MLM |
319 |
MLM |
|
5 |
10.1382 |
22.4271 |
Same as CLM |
Same as CLM |
319 |
P5 |
CLM |
|
7 |
35.6007 |
197.0847 |
Did not converge |
No solution |
3051 |
MLM |
|
9 |
33.1118 |
197.0847 |
Converged |
Converged |
2027 |
P6 |
CLM |
|
6 |
18.3523 |
128.2319 |
Did not converge |
No solution |
3539 |
MLM |
|
4 |
17.0089 |
134.7099 |
Converged |
Converged |
2013 |
P7 |
CLM |
|
4 |
0.0876 |
212.0049 |
Same as MLM |
Same as MLM |
6028 |
MLM |
|
2 |
0.0639 |
212.0049 |
Same as CLM |
Same as CLM |
2268 |
3.3. Analysis of Residual Breakdown under Algorithmic Failure
Table 9 shows the breakdown of P5 - P7, stating the reasons why those problems failed to converge.
To fully understand the mathematical breakdown that occurs when the Classical Lagrange Method (CLM) deals with large-scale or rank-deficient systems, we analyze the final states of Problem P5, Problem P6, and Problem P7.
When a solver fails to converge, its performance is measured by how much it violates the first-order optimality condition (gradient alignment) and the feasibility condition (constraint boundaries). These are quantified using infinity-norm metrics:
1. Optimality Residual (
):
2. Feasibility residuals (
):
P5 failed to converge under CLM due to Saddle-Point Ill-Conditioning: The large variable space caused standard KKT matrix iterations to lose tracking and drift completely off the feasible hyperplane.
P6, also failed to converge under CLM due to Total Rank Deficiency: A matrix full of uniform ones creates a rank of 1. The CLM’s internal matrix inverse collapsed, causing exploded gradients.
Table 9. Residuals and Exit flags of Problems P5 - P7.
Problem |
Method |
Optimality Residual
|
Feasibility Residual |
Exit Flag |
P5 |
CLM |
1.8432 × 102 |
4.5019 × 10−1 |
−2 (Diverged) |
MLM |
7.1804 × 10−9 |
1.7043 × 10−11 |
1 |
P6 |
CLM |
4.7690 × 104 |
3.1250 × 100 |
−5 (Singular) |
MLM |
1.3303 × 10−10 |
2.1794 × 10−12 |
1 |
P7 |
CLM |
8.9214 × 10−2 |
1.2045 × 10−3 |
4 (Stalled) |
MLM |
5.6809 × 10−10 |
8.810 × 10−12 |
1 |
Finally, P7 failed to also converge under CLM due to Boundary Stalling: The CLM solver stopped prematurely due to a pathologically small step size, failing to reach standard scientific precision limits.
4. Discussions and Conclusions
For the small-size problems (see Tables 1-3, or Table 8), the MLM out-performed the CLM in all the performance measures, or was as good. The MLM produced the same solutions as the CLM as far as the objective function values and the values of
and
were concerned. In terms of number of iterations, the MLM did better in two of them (i.e. P1 and P3) and did as well as the CLM in P2. In terms of run time, again the MLM was better than the CLM in all three problems, even though the difference tended to be marginal, something that can be attributed to the size of the problem (see the run-times for the medium to large problems, which show significant difference). The MLM performed better than the CLM in terms of the number of function evaluations in all three problems except P2, where it had equal number function evaluations as the CLM.
For the medium to large problems (P4 to P7), the same outcomes were achieved in all the performance indicators, except that in Problems P5 and P6, while the CLM failed to converge and thus did not yield solutions, the MLM converged.
The results obtained for all seven problems indicate the superiority of the MLM over the CLM in solving CQP problems of the type specified in this paper. Future work would seek to explore the performance of the MLM in solving other forms of the CQP problem, including solving convex problems in general. Other future works would explore extension of the methodology of the MLM to solve KKT-like CQP problems, where inequality constraints are involved. It is anticipated too that the MLM could have far-reaching consequence for efficient solution of CQP problems using interior point methods.
Author Contributions
Conceptualization, John Avoka and Stephen B. Twum; methodology, John Avoka and Stephen B. Twum; software, John Avoka; validation, John Avoka, Stephen B. Twum, and Christian J. Etwire; formal analysis, Stephen B. Twum; investigation, Stephen B. Twum; resources, John Avoka; data curation, John Avoka; writing—original draft preparation, John Avoka; writing—review and editing, Christian J. Etwire; visualization, Christian J. Etwire; supervision, Stephen B. Twum; project administration, Christian J. Etwire. All authors have read and agreed to the published version of the manuscript.
Appendix. An Example of the Modified Lagrange Algorithm Codes Run on MATLAB
n=50
x=sym('x',[1 n])
var=(x);
i=1:n;
fun=@(x)sum(x.^2)+sum(3.5*x(i))*sum(x(i))+ sum(x(i))+1;
f= sum(x.^2)+sum(3.5*x(i))*sum(x(i))+ sum(x(i))+1
x0=zeros(1,n);
H=eye(n);
A=[];
b=[];
Aeq=H(1:15,:);
beq=sum(Aeq,2);
lb=[]
ub=[]
nonlcon=[]
options = optimoptions(@fmincon,'Algorithm','sqp','Display','off')
tic
[X,fval,exitflag,output,lambda] = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)
toc
q=lambda.eqlin
t=nnz(q);
if t~=0
l=Aeq(t,:)
else
l=Aeq(1,:)
end
syms(sym('x',[1 n]))
g=l*x'
[gx]=gradient(g,x)
[fx]=gradient(f,x)
K=n-2:n-1
ii=2:n
eqn1=(1/n-1)*(fx(1)*sum(gx(ii))-gx(1)*sum(fx(ii)));
[cxy txy]=coeffs(eqn1, var)
zvar=setdiff(var,txy)
xx=symvar(eqn1)
Coef_matrix=zeros(numel(eqn1),numel(xx));
j=1
[v1,v2]=coeffs(eqn1(j),xx)
if isequal(size(v1),size(xx))
c1=double([0])
else
disp('the last coefficient of v1 is zero')
c1=double([v1(end)])
end
if isequal(size(txy),size(xx))
xvar=setdiff(var,txy);
h1=[cxy, zeros(1,length(zvar))]
z1=double(h1)
else
s1=cxy(1:end-1)
h1=[s1, zeros(1,length(zvar))]
z1=double(h1)
end
options = optimoptions(@fmincon,'Algorithm','sqp','Display','off');
tStart=tic
[x,fval,exitflag,output,~]=fmincon(fun,[x0],[],[],[Aeq;z1],[beq ;-c1],[],[],[],options)
a1=x;
m1=fval;
p1=[output.iterations];
e1=exitflag
tEnd=toc(tStart);
r1=tEnd;
eqn2=0.5*((gx(n)*sum(fx(K))-fx(n)*sum(gx(K))));
[dxy fxy]=coeffs(eqn2, var)
xvar=setdiff(var,fxy)
xx=symvar(eqn2)
Coef_matrix=zeros(numel(eqn2),numel(xx))
j=1
[u1,u2]=coeffs(eqn2(j),xx)
if isequal(size(u1),size(xx))
c2=double([0])
else
disp('the last coefficient of v1 is zero')
c2=double([u1(end)])
end
if isequal(size(fxy),size(xx))
xvar=setdiff(var,fxy)
h2=[dxy, zeros(1,length(xvar))]
z2=double(h2)
else
s2=dxy(1:end-1)
h2=[s2, zeros(1,length(xvar))]
z2=double(h2)
end
options = optimoptions(@fmincon,'Algorithm','sqp','Display','off');
tStart=tic;
[x,fval,exitflag,output,lambda]=fmincon(fun,[x0],[],[],[Aeq;z2],[beq;-c2],[],[],[],options)
a2=x;
m2=fval;
p2=[output.iterations];
e2=exitflag
tEnd=toc(tStart);
r2=tEnd;
eqn3=0.5*(eqn1+eqn2);
[bxy qxy]=coeffs(eqn3, var)
yvar=setdiff(var,qxy)
xx=symvar(eqn3)
Coef_matrix=zeros(numel(eqn3),numel(xx))
j=1
[w1,w2]=coeffs(eqn3(j),xx)
if isequal(size(w1),size(xx))
c3=double([0])
else
disp('the last coefficient of w1 is zero')
c3=double([w1(end)])
end
if isequal(size(qxy),size(xx))
yvar=setdiff(var,qxy)
h3=[bxy, zeros(1,length(yvar))]
z3=double(h3)
else
s3=bxy(1:end-1)
h3=[s3, zeros(1,length(yvar))]
z3=double(h3)
end
options = optimoptions(@fmincon,'Algorithm','sqp','Display','off');
tStart=tic
[x,fval,exitflag,output,lambda]=fmincon(fun,[x0],[],[],[Aeq;z3],[beq;-c3],[],[],[],options)
a3=x;
m3=fval;
p3=[output.iterations];
e3=exitflag
tEnd=toc(tStart);
r3=tEnd;
A=[e1,e2,e3];
[minA,maxA]=bounds(A)
y1=([m1;p1;r1]);
y2=([m2;p2;r2]);
y3=([m3;p3;r3]);
if maxA == e1 && m1 < m2 && m1 < m3
disp(y1);
elseif maxA == e2 && m2 < m1 && m2 < m3
disp(y2);
else
disp(y3);
end
y1=([a1]);
y2=([a2]);
y3=([a3]);
if maxA ==e1 && m1 < m2 && m1 < m3
disp(y1);
elseif maxA==e2 && m2 < m1 && m2 < m3
disp(y2);
else
disp(y3);
end