Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
2.02k stars 518 forks source link

Soving on PYOMO-ERROR: Unexpected exception while running model: 99316737415 #976

Closed moaddab closed 5 years ago

moaddab commented 5 years ago

Hi there, I am using cplex to solve an optimization problem with pyomo-python, while I am soling it on cmd, I got this Error, Some one may help me?!

this is the simple code I am trying to run:

from pyomo.environ import from pyomo.bilevel import model=ConcreteModel() model.x=Var(bounds=(1,2)) model.v=Var(bounds=(1,2)) model.sub=SubModel() model.sub.y=Var(bounds=(1,2)) model.sub.w=Var(bounds=(-1,1))

model.o=Objective(expr=model.x+model.sub.y+model.v) model.c=Constraint(expr=model.x+model.v>=1.5) model.sub.o=Objective(expr=model.x+model.sub.w, sense=maximize) model.sub.c=Constraint(expr=model.sub.y+model.sub.w<=2.5)

qtothec commented 5 years ago

Could you provide the full stack-trace for the error?

moaddab commented 5 years ago

This is the error message. Number of error changes every time I run it.


c:\Users\Sepanta\Desktop>pyomo solve simple.py --solver=glpk [ 0.00] Setting up Pyomo environment [ 0.00] Applying Pyomo preprocessing actions [ 0.02] Creating model [ 0.02] Applying solver [ 0.02] Pyomo Finished ERROR: Unexpected exception while running model: 70098443212

blnicho commented 5 years ago

pyomo.bilevel was deprecated in the most recent Pyomo release. It's possible that you're running into a known issue with this modeling extension. I recommend manually implementing the modeling constructs/transformations you were trying to use from pyomo.bilevel and following up on the Pyomo forum if you're still having trouble.