# How can I solve a nonlinear optimization problem where constraint contains exponential term?

I have the optimization problem as below:

$\hspace{10mm} \text{Maximize} \sum_{k} \alpha_k {R}_k$

$\hspace{10mm}\text{subjcet to:}$

$\hspace{10mm}\exp \left[ - (2^{{R}_k } -1) \left( \frac{\tilde{Z} g_{k} p_{\max} + \sigma^2}{g_{pu} p_{pu}} \right) \right] \leq q$

$\alpha_k$ is the weight factor associated to the $R_k$.

Obviously this is a nonlinear optimization. But I am completely new to optimization. So any help is highly appreciated. thank you.

As you say, it is a nonlinear program, so you simply use a nonlinear solver.

Here is an implementation in YALMIP (disclaimer: developed by me) which is a modelling toolbox in MATLAB. It interfaces various solvers, such as the nonlinear solvers fmincon, ipopt, snopt.

Trial data

n = 100;
alpha = -rand(n,1);
g = rand(n,1);
sigma = rand(1);
q = rand(1);
gpu = rand(1);
ppu = rand(1);
Z = rand(1);
pmax = rand(1);


Straightforward model (fmincons SQP implementation solves the problem best. Negate objective as default is minimize). Solved in roughly 0.1 seconds

R = sdpvar(n,1);
Objective = -(alpha'*R);
Constraints = exp(-(2.^R-1).*(Z*g*pmax + sigma^2)/(gpu*ppu)) <= q;
ops = sdpsettings('solver','fmincon','fmincon.algorithm','sqp');
optimize(Constraints,Objective,ops)
value(R)


The exponential in your model is redundant, less complex model is

Constraints = (-(2.^R-1).*(Z*g*pmax + sigma^2)/(gpu*ppu)) <= log(q);


A variable change leads to linear constraints and a simple sum of logarithms in the objective. fmincon solves this problem in 0.01 seconds

w = sdpvar(n,1);
Constraints = (-(w-1).*(Z*g*pmax + sigma^2)/(gpu*ppu)) <= log(q);
Objective = -(alpha'*log2(w));
optimize(Constraints,Objective,ops)
value(log2(w))


Since this means you are maximizing a weighted sum of logarithms over a simple box, I wouldn't be surprised if you could solve it analytically.

• Thank u so much for such an elaborated comment @Johan. I have feq questions though. (1) If I change the variable and make the objective function into a logarithmic function along with log in constraint also, will it become convex optimization? (2) If it becomes convex optimization, then which algorithm can be used to solve it? (3) When it becomes convex optimization, can I use the global optimization algorithm? Actually my ideas are not clear on optimization yet. But I am working on it. thanks again. – jhon_wick Aug 14 '15 at 12:05
• They are all convex (the first form from the fact that exponential is convex and the argument inside is concave decreasing, hence composition is convex), and in the reformulated model trivially as the maximized sum of logarithms is concave. Essentially all nonlinear optimization algorithms have global convergence, i.e., convergence to a locally stationary point from any initial point, i.e., they find the global optima for a convex problem. – Johan Löfberg Aug 15 '15 at 7:16
• Thanks to your idea, I have simplified the problem as below: $\text{Minimize} \sum_k- \alpha_k \log_2 W_k$ $\text{subject to}: 0\leq W_k \leq \left\{ 1- \frac{\ln q g_{pu} p_{pu}}{\tilde{Z} g_{k} p_{\max} + \sigma^2}\right\}, 0 \leq \alpha_k \leq 1$ $k =0,1,\cdots, N$ But how should I proceed next to solve this? Is it possible to get an analytical solution? If not, then which is the best approach to solve this? Can I use Global Optimization Algorithm like- Simulated Annealing? – jhon_wick Aug 15 '15 at 7:41
• No, you should absolutely not use some random thing like simulated annealing. As an optimization problem, it could basically not get any easier than this problem. Any decently implemented gradient based method for constrained nonlinear optimization will work (Newton, quasi-newton, sqp, interior-point, steepest descent, etc.). However, as it seems you are unfamiliar with the field, you should use a solver off the shelf, don't reinvent the wheel unless you really have to. – Johan Löfberg Aug 15 '15 at 7:46
• thank u so much for your help.and I have understood that I have a long way to go in this field. – jhon_wick Aug 15 '15 at 8:53