Questions about Pyomo capabilities

465 views
Skip to first unread message

oli...@member.ams.org

unread,
Mar 12, 2016, 3:14:15 PM3/12/16
to Pyomo Forum
Learning Pyomo for the last couple of weeks, I have come across a few questions about a few things I cannot seem to find in the documentation where I wonder if (and how) this can be done in Pyomo:
  1. Can one access "allowable increase" and "allowable decrease", i.e., the objective function coefficient range as e.g. GLPK can produce in its sensitivity report from within Python?
  2. How to determine if a solution is unique, and access information about alternative optimal feasible solutions when they exist?
  3. When solving network optimization problems using sparse indices as explained in the documentation, does Pyomo know to call specialized solvers for such problems, or will they be solved by a general purpose solver?  Can I indicate that a problem has special structure (e.g. max-flow) to select a specialized solver?  Does it matter anyway with modern backends?

Any hints would be appreciated.


--Marcel

Gabriel Hackebeil

unread,
Mar 12, 2016, 4:24:27 PM3/12/16
to Pyomo Forum
Can one access "allowable increase" and "allowable decrease", i.e., the objective function coefficient range as e.g. GLPK can produce in its sensitivity report from within Python?

Our GLPK solver plugin does not currently include this functionality. You can tell GLPK to generate the ranges file by setting a solver option, but you would have to parse that file manually. Also, you would have to use symbolic_solver_labels=True in order to have that file use names that you could map back to components on the model.

The more general solution would be to have the GLPK solver plugin recognize when the user is requesting these values from the solution and to return them as Pyomo suffixes (that is what we do with duals and other auxiliary solution information). This seems like a reasonable feature request for that plugin, so I would recommend you open a ticket at the Pyomo trac site (https://software.sandia.gov/trac/pyomo). We would also gladly accept a patch to that plugin, if you get impatient.

How to determine if a solution is unique, and access information about alternative optimal feasible solutions when they exist?

As far as I am aware, none of the solver plugins in Pyomo include any code for detecting / returning multiple solutions when they exist, but that is not to say they could not be updated to do so.

When solving network optimization problems using sparse indices as explained in the documentation, does Pyomo know to call specialized solvers for such problems, or will they be solved by a general purpose solver?  Can I indicate that a problem has special structure (e.g. max-flow) to select a specialized solver?  Does it matter anyway with modern backends

It is up to you to tell Pyomo which solver to call. Pyomo does not come included with any solvers, just a set of interfaces to solvers. You are required to install any solvers that you wish to use with Pyomo.

Beyond selecting an appropriate solver based on your problem type, you can pass options to the solver through Pyomo (that perhaps give the solver hints about how to solve the problem). The set of options that are available depend on which solver you are using. For instance, you can tell CPLEX to solve your model using the ‘network simplex’ method by setting the ‘lpmethod’ CPLEX option. This thread talks about how to set solver options when scripting with Pyomo.

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages