Integer variables and logarithmic functions

56 views
Skip to first unread message

Nazmul Islam

unread,
Feb 5, 2013, 5:07:31 PM2/5/13
to yal...@googlegroups.com
Hello,

I am trying to solve a mixed integer non-linear programming that contains logarithmic functions. Apart from the integer variables, the function is convex. I have the problem in CVX form:

cvx_begin

variable p(2) r

variable x(2) binary

maximize r

subject to

   r <= sum(log (1 + p)) ;

   p <= 2 * x ;

   sum(x) <= 1;

cvx_end


Unfortunately, cvx cannot handle integer variables and logarithmic functions simultaneously. Can YALMIP handle this? If so, can I solve these problems for large number of variables? (50-60 integer variables)


Thanks,


Nazmul



Johan Löfberg

unread,
Feb 6, 2013, 12:52:52 AM2/6/13
to yal...@googlegroups.com
Yes,

r = sdpvar;
p
= sdpvar(2,1);
x
= binvar(2,1);

Objective = -r;
Constraints = [r <= sum(log (1 + p)) ;

               p
<= 2 * x ;

          sum
(x) <= 1]
solvesdp
(Constraints,Objective)    

The problem is solved using either the internal nonlinear mixed-integer solver bnb (using fmincon/snopt/ipopt/filtersd as local nonlinear solver) or the mixed-integer solver bonmin shipped with OPTI Toolbox. I assume you have this nice convex form (i.e., convex when relaxing integrality). Otherwise, you would have address that nonconvexity too (using bmibnb in YALMIP)

Whether it can solve problems with 50-60 variables is an impossible question to answer. It depends completely on the model (there are mixed-integer linear programs with less than 10 variables where all state-of-the-art solvers fail)
Reply all
Reply to author
Forward
0 new messages