passing solver options

15 views
Skip to first unread message

Gabe Hackebeil

unread,
Apr 27, 2010, 4:34:10 PM4/27/10
to coopr forum
For many of the models I’ve formulated in pyomo, solving the problem
using a script similar to that in the benders decomposition example
turns out to be extremely useful. For example…

mdl = function_defining_my_pyomo_model(inputs)
inst = mdl.create(‘my_data_set’)
solver = SolverFactory("cplex")

solver_manager = SolverManagerFactory("serial")
solve_all_instances(solver_manager, solver, [inst])

x = float(inst.some_variable)
.
.
.

Since I now have the results available in a python environment, I can
use them as I wish and, in my case, solve the problem again with new
inputs.

Is it possible to pass solver options and perhaps other keywords (e.g.
stream solver output) like those available in the pyomo command line?
Looking at the source code I've noticed there is a solver.options
object but I've had no luck with it...


--
Subscription settings: http://groups.google.com/group/coopr-forum/subscribe?hl=en
Reply all
Reply to author
Forward
0 new messages