Conic Programming
Conic programming is useful in a wide variety of application areas
including engineering and financial management.
Conic programming has been used, for example, in
antenna array weight design,
grasping force optimization,
finite impulse response (FIR) filter design,
and portfolio optimization.
This section gives an overview of conic programming and how
conic constraints are implemented in GAMS.
Back to main page.
Conic programs can be thought of as generalized linear programs
with the additional nonlinear constraint
,
where
is required to be a convex cone. The resulting class of
problems is known as conic optimization and has the following
form:
where
is the constraint matrix,
the decision variable, and
the objective function
cost coefficients. The vector
represents the right
hand side
and the vectors
are lower and upper
bounds on the decision variable
.
Now partition the set of decision variables
into sets
, such that each decision variables
is a
member of at most one set
. For example,
we could have
![$\displaystyle S^1 = \left [ \begin{tabular}{c} $x_1$\ \\ $x_4$\ \\ $x_7$\ \\ \e...
...{tabular}{c} $x_6$\ \\ $x_5$\ \\ $x_3$\ \\ $x_2$\ \\ \end{tabular} \right]. \\ $](img16.png) |
(1) |
Let
denote the variables
belonging to set
.
Then define
 |
(2) |
where
must have one of the following forms:
- Quadratic cone: (also referred to as Lorentz or ice cream cone)
 |
(3) |
- Rotated quadratic cone: (also referred to as hyperbolic constraints)
 |
(4) |
These two types of cones allow the formulation of quadratic, quadratically
constrained, and many other classes of nonlinear convex optimization
problems.
GAMS handles conic equations using the =C= equation type.
The conic cases are written as:
- Quadratic cone:
![$\displaystyle {\tt x(\lq 1\lq ) =C= sum(i\$[not ~sameas(i,\lq 1\lq )], x(i)); }$](img23.png) |
(5) |
- Rotated quadratic cone:
![$\displaystyle {\tt x(\lq 1\lq )+x(\lq 2\lq ) =C= sum(i\$[not ~sameas(i,\lq 1\lq ) ~and ~not ~sameas(i,\lq 2\lq )], x(i)); }$](img24.png) |
(6) |
Note that the resulting nonlinear conic constraints result in ``linear''
constraints in GAMS. Thus the original nonlinear formulation is in
fact a linear model in GAMS. We remark that we could formulate conic
problems as regular NLP using constraints:
- Quadratic cone:
![$\displaystyle {\tt x(\lq 1\lq ) =G= sqrt[ sum(i\$[not ~sameas(i,\lq 1\lq )], sqr[x(i)]) ]; }$](img25.png) |
(7) |
- Rotated quadratic cone:
and
are positive variables
![$\displaystyle {\tt 2*x(\lq 1\lq )*x(\lq 2\lq ) =G= sum(i\$[not ~sameas(i,\lq 1\lq ) ~and ~not ~sameas(i,\lq 2\lq )], sqr[x(i)] );}$](img28.png) |
(8) |
The example below illustrates the different formulations
for conic programming problems. Note that the conic optimizer in
MOSEK usually outperforms a general NLP method for the reformulated
(NLP) cone problems.
Consider the following example (cone2.gms) which illustrates the
use of rotated conic constraints. We will give reformulations of the
original problem in regular NLP form using conic constraints
and in conic form.
The original problem is:
![$\displaystyle \begin{tabular}{lccl} minimize & $\sum_i \frac{d_i}{x_i}$\ \\ sub...
... $\in$\ & $[l_i,u_i]$, ~~~$l_i>0$, ~$d_i \ge 0, ~i=1,2,...,n$\ \\ \end{tabular}$](img29.png) |
(9) |
where
is the decision variable,
parameters, and
a scalar parameter. The original
model (9) can be written in GAMS
using the equations:
defobj.. sum(n, d(n)/x(n)) =E= obj;
e1.. sum(n, a(n)*x(n)) =L= b;
Model orig /defobj, e1/;
x.lo(n) = l(n);
x.up(n) = u(n);
We can write an equivalent NLP formulation, replacing the objective
function and adding another constraint:
![$\displaystyle \begin{tabular}{lccl} minimize & $\sum_i d_i t_i$\ \\ subject to ...
...1,...,n$\ \\ & $x$\ & $\in$\ & $[l,u]$, ~~$l>0$, ~$d_i \ge 0$\ \\ \end{tabular}$](img32.png) |
(10) |
where
is a new decision variable. The GAMS formulation
of this NLP (model cnlp) is:
defobjc.. sum(n, d(n)*t(n)) =E= obj;
e1.. sum(n, a(n)*x(n)) =L= b;
conenlp(n).. 2*t(n)*x(n) =G= 2;
Model cnlp /defobjc, e1, conenlp/;
x.lo(n) = l(n);
x.up(n) = u(n);
We can change the equality to an inequality since the parameter
and we are dealing with a minimization problem.
Also, note that the constraint conenlp(n) is almost in
rotated conic form.
If we introduce a variable
, then we can
reformulate the problem using conic constraints as:
![$\displaystyle \begin{tabular}{lccl} minimize & $\sum_i d_i t_i$\ \\ subject to ...
...1,...,n$\ \\ & $x$\ & $\in$\ & $[l,u]$, ~~$l>0$, ~$d_i \ge 0$\ \\ \end{tabular}$](img36.png) |
(11) |
The GAMS formulation using conic equations =C= is:
defobjc.. sum(n, d(n)*t(n)) =E= obj;
e1.. sum(n, a(n)*x(n)) =L= b;
e2(n).. z(n) =E= sqrt(2);
cone(n).. x(n) + t(n) =C= z(n);
Model clp /defobjc, e1, e2, cone/;
x.lo(n) = l(n);
x.up(n) = u(n);
Note that this formulation is a linear program in GAMS, although
the constraints cone(n)... represent the nonlinear rotated
quadratic cone constraint.
The complete model
cone2.gms
is listed below:
Set n / n1*n10 /;
Parameter d(n), a(n), l(n), u(n);
Scalar b;
d(n) = uniform(1,2);
a(n) = uniform (10,50);
l(n) = uniform(0.1,10);
u(n) = l(n) + uniform(0,12-l(n));
Variables x(n);
x.l(n) = uniform(l(n), u(n));
b = sum(n, x.l(n)*a(n));
Variables t(n), z(n), obj;
Equations defobjc, defobj, e1, e2(n), cone(n), conenlp(n);
defobjc.. sum(n, d(n)*t(n)) =E= obj;
defobj.. sum(n, d(n)/x(n)) =E= obj;
e1.. sum(n, a(n)*x(n)) =L= b;
e2(n).. z(n) =E= sqrt(2);
cone(n).. x(n) + t(n) =C= z(n);
conenlp(n).. 2*t(n)*x(n) =G= 2;
Model clp /defobjc, e1, e2, cone/;
Model cnlp /defobjc, e1, conenlp/;
Model orig /defobj, e1/;
x.lo(n) = l(n);
x.up(n) = u(n);
Solve clp min obj using lp;
Solve cnlp min obj using nlp;
Solve orig min obj using nlp;
It is often preferable to model convex programs in seperable form,
if it is possible. Consider the following example of minizing
an objective function
:
where
is a parameter and
the decision
variable. The equation implies an implicit constraint of
. Unfortunately, domain violations can still occur because
no restrictions are set on
. A better approach is to introduce
an intermediate variable
:
This accomplishes two things. It implies an explicit bound on
,
thereby reducing the risk of domain violations. Secondly, it speeds
up computation since computations of gradients and Hessians in
the first (non-seperable) form are more expensive. Finally, it reduces
the amount of memory needed (see the section on ``Memory Options'')