Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAO not working with MibS #98

Open
tkralphs opened this issue Sep 25, 2023 · 2 comments
Open

PAO not working with MibS #98

tkralphs opened this issue Sep 25, 2023 · 2 comments

Comments

@tkralphs
Copy link

tkralphs commented Sep 25, 2023

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.

@tkralphs
Copy link
Author

@whart222 Looks like you haven't been working in this repo in a while. If you can push me in the right direction, I can try to work up a PR.

@whart222
Copy link
Contributor

@tkralphs Yes, I don't have active funding to support PAO developments. But I've been OOO a bunch the past month, which is the real reason I didn't catch your issue.

I'll take a look at this before the end of next week to help diagnose the issue and give pointers for maintaining the MibS interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants