User Tools

Site Tools


solver:setting_the_sub_solvers

Differences

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]
support
— (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://​www.gams.com/​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 
-$offecho 
-process.OptFile = 1; 
-Solve process maximizing pr using minlp ;  
-</​code>​ 
-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://​www.gams.com/​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