Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To import SolverFactory from either pyomo.opt or pyomo.environ, you can use the following code:

from pyomo.environ import SolverFactory
# or
from pyomo.opt import SolverFactory

This will allow you to use the SolverFactory to create solver objects in your Pyomo models.