I'm modeling a flow problem on graph using sage.
Once the graph was ready I've modeled a MILP problem with constraints.
I've problems having unique variables.

What I do is to use v = p.new_variable() and subsequently use the v
variable in a loop iterating the edges of the graph in such as:

for origin, destination, attributes in G.edges():
    attributes['v_component_for_that_edgs'] = v[('origin', 'destination')]

But at the end some variable are duplicate!

The code producing that strange behavior is attached to this mail.
Is an error of mine or a Sage problem?

Thanks.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Attachment: try.sage
Description: Binary data

Reply via email to