Skip to content Skip to sidebar Skip to footer

Setting Parameters In Pyomo

I am using CPLEX with pyomo. I would like to set the parameter mip.limits.solutions = 1. How to do this with either .options( or .set_options( or any other way? I have tried the fo

Solution 1:

Pyomo's (LP file-based) CPLEX interface passes options using CPLEX's "Interactive" API. In this case, the interactive version of that option is "mip limits solutions":

from pyomo.environ import *
opt = SolverFactory("cplex")
opt.options['mip limits solutions'] = 1

Post a Comment for "Setting Parameters In Pyomo"