Description
I tried to run the simple example from the documentation with PAO version 1.0.2 and Pyomo 6.6.2 using MibS 1.2 as the solver using Python 3.9.10 on Ubuntu in WSL.
import pyomo.environ as pe
from pao.pyomo import *
M = pe.ConcreteModel()
M.x = pe.Var(bounds=(0,None), domain=pe.NonNegativeIntegers)
M.y = pe.Var(bounds=(0,None))
M.o = pe.Objective(expr=M.x - 4*M.y)
M.L = SubModel(fixed=M.x)
M.L.o = pe.Objective(expr=M.y)
M.L.c1 = pe.Constraint(expr= -M.x - M.y <= -3)
M.L.c2 = pe.Constraint(expr= -2*M.x + M.y <= 0)
M.L.c3 = pe.Constraint(expr= 2*M.x + M.y <= 12)
M.L.c4 = pe.Constraint(expr= 3*M.x - 2*M.y <= 4)
with Solver('pao.pyomo.MIBS') as solver:
results = solver.solve(M)
print(results)
print(M.x.value)
print(M.y.value)
There was no error, but also just a solution of (0,0)
. I debugged and everything initially seemed correct. I could actually solve the instance that was created with MibS on the command line from the MPS and AUX files that were output. But when I traced the execution within PAO, it finally ended up on this line and I couldn't really tell what happened.
FYI, the output format of the solution has changed a little in MibS 1.2 so I was originally thinking that might be the issue, but it seems that no output was obtained for some reason. I didn't try it on any other platforms. I didn't allocate a huge amount of time to this, just wanted to see if I could make it work :).
Edit: As an aside, I had to install pyutilib manually. It didn't get installed with pip install pao
.