Possible arcs.select bug?

12 views
Skip to first unread message

cagri.l...@gmail.com

unread,
Apr 20, 2017, 8:32:09 AM4/20/17
to Gurobi Optimization
Hi,

I am having some trouble with selecting some arcs using the select function in python. The details of the problem is in the attached screenshot.

I have a list called sink.

sink[9] is simply the 10th element of the list which is the string 'OrgEgress2' .

When I do arcs.select('*','OrgEgress2'), I correctly get the incoming arcs to 'OrgEgress2'.

<gurobi.tuplelist (5 tuples, 2 values each):
 ( Sup2Sub0 , OrgEgress2 )
 ( Sup2Sub1 , OrgEgress2 )
 ( Sup2Sub2 , OrgEgress2 )
 ( Sup2Sub3 , OrgEgress2 )
 ( Sup2Sub4 , OrgEgress2 )
>


However when I do arcs.select('*',sink[9]), I can't get the correct arcs, I simply get an empty list.

I would appreciate if someone could help me.
Screenshot from 2017-04-20 15-13-36.png

cagri.l...@gmail.com

unread,
Apr 20, 2017, 9:10:46 AM4/20/17
to Gurobi Optimization
The k value in the screenshot is 9. I forgot to mention that in the original post.

cagri.l...@gmail.com

unread,
Apr 20, 2017, 9:10:58 AM4/20/17
to Gurobi Optimization
Simply converting sink[9] to string solved the problem, simply do str(sink[9]) in arcs select.



On Thursday, April 20, 2017 at 3:32:09 PM UTC+3, cagri.l...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages