Modelling Multi period flows
Awaiting user inputHi all,
im trying to model the following network where the arcs represent a specific flow of goods that is send through the network. there are some fixed arcs included in the network (e.g., the flow needs to travel via (RM,MP) and (MP,CPM) before it is allowed to reach (CPM,DC).

i defined the arcs including the different time periods, but am not sure how to ensure that the model reuses/sends back the goods in the network, so that the network will start again from the node that the flow was sent to. (e.g., my goods are send from DC to RM, how do i ensure that the model starts again at RM in that period?)
Arcs are defiend like this:
Arcs = set()
for t in range(0, T):
Arcs.update({
(('PP', t), ('CPM', t))
})
if t + 1 > t:
Arcs.update({
(('CPM', t), ('DC', t+1))
})
if t + 1 > t and t+2 > t+1:
Arcs.update({
(('DC', t+1), ('RET', t+2))
})
if t + 2 > t+1 and t+3 > t+2:
Arcs.update({
(('RET', t+2), ('RC', t+2)),
(('RC', t+2), ('CPM', t+3)),
(('RC', t+2), ('PP', t+3)),
(('RC', t+2), ('DEOL', t+3)),
(('RC', t+2), ('LEOL', t+3)),
(('RC', t+2), ('IEOL', t+3)),
(('DC', t+1), ('CPM', t+2)),
(('DC', t+1), ('PP', t+2)),
(('DC', t+1), ('DEOL', t+2)),
(('DC', t+1), ('LEOL', t+2)),
(('DC', t+1), ('IEOL', t+2))
})
would anyone be able to support me on ensuring that the model keeps looping whenever the goods are send from node A to node B?
thanks a lot in advance
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Anne,
I am not sure if I understand your problem: If the destination of some flow depends on the starting node (having several intermediate nodes), then in a model you might need variables that are not only associated to an arc in your time-space network, but also have an index that refer to your flow start node. Then you can control with flow conservation constraints where this particular flow (coming from a specific start node) is allowed to continue (or end).
Best regards,
Mario0
Post is closed for comments.
Comments
2 comments