User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
solver:setting_the_sub_solvers [2017/09/02 19:43]
— (current)
Line 1: Line 1:
-====== Setting the sub solvers ====== 
-Q: //I would like to set sub-solvers (LP and NLP) for BARON solver when I tried to solve MINLP problem. I define solvers I want to use as follows//: 
-     ​option minlp = baron; 
-     ​option lp = minos; 
-     ​option nlp = snopt; 
-//However, it seemed to me that BARON always use cplex for LP solver and minos for NLP solver all the times no matter how I defined solvers. // 
-To specify which LP and NLP solvers, use the BARON options lpsol and nlpsol in your baron.opt file. The options are documented in [[https://​​latest/​docs/​S_BARON.html|BARON solver manual]]. 
-If you have not used a baron.opt file before, create a new file of that name and save it in the same directory as your GAMS source file. If you want the options to appear in your GAMS source code, you can use the following code fragment as an example to choose CLP as LP and IPOPT as NLP solver for BARON: <​code>​ 
-Model process /all/ ; 
-Option MINLP = BARON; 
-$onecho > baron.opt 
-lpsol 2 
-nlpsol 9 
-process.OptFile = 1; 
-Solve process maximizing pr using minlp ;  
-Don't forget to tell GAMS to tell BARON to read the options file by adding a line ''​m.OptFile = 1;''​ right before your Solve statement (m is the name of your model). You can also add ''​OptFile 1''​ to the command line (text field to the right of the run button in the IDE). 
-You'll find some extra information about using an option file [[solver:​the_solver_option_file|here]] and at [[https://​​latest/​docs/​UG_SolverUsage.html|Solver Usage]]. 
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY solver/setting_the_sub_solvers.1504374196.txt.gz ยท Last modified: 2017/09/02 19:43 by support