How do I generate decision variables as needed?
I modeled a Time Spatial NETFORM problem, the structure of my network is kind of sparse network, that is generating arcs would not be meaningful among all the defined spatial locations, Take for instance for every time period, there are sets of non-homogenous nodes call it spatial nodes (i,t) where t \in T, and arcs are defined among these spatial locations that is call "f" representing the decision variable for arcs. f has a dimension of |V|*|T|*|V|*|T|, in which the first two tuple (i,t) and the second tuple is destination spatial location.
Set definition
M set of market nodes
S set of Storage area nodes
F set of manufacturing farms
V = M \cup S \cup F
In my problem, as I defined non-homogeneous, all the combination of these nodes are not meaningful, for example, there would be no arc among production facility nodes to market nodes, However, beginning of the arc definition it would be exists.
My Question stems from the way that beginning of model.addVars; it took long time or even memory full notation for generating all the set of combinations. I realized that I need to populize these arcs as I needed, since many of them are useless. How can I implement that without losing the generality of my arcs
Please sign in to leave a comment.
Comments
0 comments