solver environment variable

13 views
Skip to first unread message

Cuong P. Nguyen

unread,
Nov 25, 2015, 4:50:39 PM11/25/15
to AMPL Modeling Language
I was wondering if there is an environment variable to indicate the name of the solver to be used, something like
SET OPTIONS_SOLVER= gurobi

instead of using the following line of code in RUN script file:
option solver gurobi;

Thanks
Cuong

Victor Zverovich

unread,
Nov 25, 2015, 6:19:29 PM11/25/15
to am...@googlegroups.com
Yes, if you set the environment variable named "solver" before calling AMPL, it's value will be used to initialize the solver option (and the same for other options):

  > set solver=gurobi;
  > ampl
  ampl: option solver;
  gurobi

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

dangn...@gmail.com

unread,
Nov 26, 2015, 3:23:05 PM11/26/15
to AMPL Modeling Language
Thank you Victor
Reply all
Reply to author
Forward
0 new messages