Error raised when solving standard Benders decomposition with 'xpress' solver

38 views
Skip to first unread message

Senam Sedzro

unread,
Apr 3, 2018, 3:53:48 PM4/3/18
to Pyomo Forum
Hi All,

I encountered the following error while solving the standard Benders decomposition example found at https://github.com/Pyomo/pyomo/blob/master/examples/pyomo/benders/runbenders


##################################################################################

runfile('C:/Users/kseo/Documents/Python Scripts/BendersPy/runbenders.py', wdir='C:/Users/kseo/Documents/Python Scripts/BendersPy')

Iteration= 1
Profit for scenario=Base Sub-Problem is 179523.0

Profit for scenario=Low Sub-Problem is 125839.0

Profit for scenario=High Sub-Problem is 93830.0

Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/kseo/Documents/Python Scripts/BendersPy/runbenders.py', wdir='C:/Users/kseo/Documents/Python Scripts/BendersPy')

File "C:\Users\kseo\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "C:\Users\kseo\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/kseo/Documents/Python Scripts/BendersPy/runbenders.py", line 74, in
inst.urc[inst.Sell[p,t]]

File "C:\Users\kseo\AppData\Local\Continuum\anaconda3\lib\site-packages\pyomo\core\kernel\component_map.py", line 100, in getitem
% (id(obj), str(obj)))

KeyError: "Component with id '2149761530272': Sell[coils,2]"


##################################################################################

Has anyone experienced a similar issue?

Thank you.
Senam

Gabriel Hackebeil

unread,
Apr 3, 2018, 4:03:07 PM4/3/18
to Pyomo Forum
I can’t reproduce that error. What version of Pyomo are you using? Also, do you have CPLEX installed? I believe that example requires it.

You might try adding "tee=True” to the solve_all_instances call in that example to see if some error is occurring. It looks like the urc solution suffix is not being returned from the solver.

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Senam Sedzro

unread,
Apr 6, 2018, 12:07:17 AM4/6/18
to Pyomo Forum
Thank you, Gabe.

I don't have CPLEX installed.
Reply all
Reply to author
Forward
0 new messages