I have created a tupledict of variables for an arc flow ,F_A[t,a,d,y] using model.addVars. I have a separate dictionary which
confirms if marketer(t), has access to the arc(a).[value is 1 when marketer has access and 0 when marketer does not have access]
How do I set the solution such that variable F_A[t,a,d,y] should be equal to zero when the marketer (t) does not have access to the arc (a).
My current solution is that i created F_A using only keys from when marketer has access to the arc, this however results in a keyError when I sum it for all T (marketers) and all A (Arcs).
I have not included sample codes as it is part of a much larger equation, but would be happy to post it if required. Thanks a many!!
I am using Gurobi Interface on Python!
Please sign in to leave a comment.