Short answer is yes.
As for how you would accomplish this, you are welcome to look at the pyomo.contrib.gdpopt
package, which provides the ability to call SolverFactory('gdpopt').solve(model)
in Pyomo. You can write your own solve()
function, which is passed the Pyomo model object, along with any optional keyword arguments. Within the solve()
function, you are welcome to integrate external heuristic solvers or write your own logic.
There is also the question of how to interrogate the Pyomo model, but the scope of that is question is too broad to answer here. You may wish to consult the advanced elements of the Pyomo documentation.