Benders Decomposition Help

34 views
Skip to first unread message

Eumpf...@wayne.edu

unread,
Aug 5, 2011, 4:14:16 PM8/5/11
to coopr forum
Hi,

I am trying to code a bender's decomposition using coopr. I have no
experience with python. The first thing I did was try to run the
bender's decomposition example distributed with coopr. I did not
modify the file, but am getting an error. The output is below. My plan
is to try and code my problem line by line along with the example, so
I need to first understand what the problem is. Any help is
appreciated. I have experience with Matlab but am only marginally
familiar with object oriented languages.

C:\Packages\Coopr\examples\pyomo\benders>python runbenders

Iteration= 1
Traceback (most recent call last):
File "runbenders", line 50, in <module>
solve_all_instances(solver_manager, solver, sub_insts,
suffixes=['rc', 'd
'])
File "c:\python27\lib\site-packages\coopr\opt\parallel\manager.py",
line 32
n solve_all_instances
instance_map[action_handle].load(results)
File "c:\python27\lib\site-packages\coopr\pyomo\base\PyomoModel.py",
line 3
in load
self._load_solution(arg.solution(0),symbol_map=arg.symbol_map,
allow_cons
ent_values_for_fixed_vars=allow_consistent_values_for_fixed_vars)
File "c:\python27\lib\site-packages\coopr\pyomo\base\PyomoModel.py",
line 5
in _load_solution
var_value.setattrvalue(attr_key, attr_value)
File "c:\python27\lib\site-packages\coopr\pyomo\base\var.py", line
126, in
attrvalue
raise RuntimeError,"Variable="+str(self.var.name)+" does not have
an attr
ted defined with name="+str(attr_name)
RuntimeError: Variable=Make does not have an attributed defined with
name=Lrc
Message has been deleted

Zev Friedman

unread,
Aug 9, 2011, 4:42:05 PM8/9/11
to coopr forum
Hello. We apologize for the inconvenience, but this was a bug in
Pyomo. I just committed the fix, which will be included either in the
Coopr 3.1 release and are available in the latest trunk revision, if
you are using the latest branch.

On Aug 5, 2:14 pm, "Eumpfenb...@wayne.edu" <Eumpfenb...@wayne.edu>
wrote:
Reply all
Reply to author
Forward
0 new messages