Can YALMIP work with Matlab's GADS solver?

356 views
Skip to first unread message

Nazmul Islam

unread,
Jul 29, 2013, 1:58:49 PM7/29/13
to yal...@googlegroups.com

I am trying to solve a mixed integer linear program with YALMIP. I am using 'lpsolve' solver in YALMIP. The program runs well for 10-15 integer variables and ~10,000 continuous variables. However, when these numbers increase (especially when number of integer variables reach 20-25), the problem takes a very long time to solve.
 
I am working in a commercial setting and I can't buy powerful solvers like CPLEX & others. I have a license for Matlab's GADS solvver, i.e., genetic algorithm toolbox. Can I use this solver with YALMIP?
 
I can try to rewrite my code so that it directly fits GADS input parameters. However, GADS requires "min f(x) s.t. A * x<= b" type of formulation. I find it difficult to generate A and b for large number and different types of variables. I prefer YALMIP's problem formulation and I just wonder if I can use GADS via YALMIP?
 
Thanks for your help in advance!
 
Nazmul

Johan Löfberg

unread,
Jul 29, 2013, 2:57:00 PM7/29/13
to
No GADS is not supported. However, before you try a genetic/particle swarm/ant colony/crazy cow algorithm on a standard MILP problem, you should try alternative MILP solvers. There are some public alternatives (scip/glpk/cbc etc)


BTW, note that you can export the numerical model from YALMIP to extract "A" etc (export)

Nazmul Islam

unread,
Jul 29, 2013, 5:18:23 PM7/29/13
to yal...@googlegroups.com
Thanks Johan.
 
I followed http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Commands.export and used the following command:
 

[model,recoverymodel] = export(TotCon,Objective,sdpsettings('solver','lpsolve','cachesolvers',1));

model is coming out to be an empty (0x0) double.  I was able to get solution with following commands:
 

options = sdpsettings('solver','lpsolve','cachesolvers',1);

solution = solvesdp(TotCon,Objective,options);

Am I making any mistake while using 'export' command? Your feedback will be very appreciated. I can give you a more detailed example if you want.
 
 
 
 
Thanks,
 
Nazmul

 

Johan Löfberg

unread,
Jul 30, 2013, 6:04:12 AM7/30/13
to yal...@googlegroups.com
Looks like I haven't added lpsolve to the solver which can be exported directly.

Alternatively, use

solvesdp(constraints,objective,sdpsettings('savedebug',1)

and a file mxlpsolvedebug will be created before lpsolve is called. 

Alternatively, export to gurobi format or glpk format etc 

export(x>=0,x,sdpsettings('solver','gurobi'),[],[],1)

The 1 in the end is a hack to allow export despite not having the solver installed

Nazmul Islam

unread,
Jul 30, 2013, 4:28:56 PM7/30/13
to yal...@googlegroups.com
Thanks a lot for showing those commands.
 
--
 
Nazmul
Reply all
Reply to author
Forward
0 new messages