I would like to ask if someone has modeled dial a ride problem or pick-up and delivery problems. I am having problem combining the origin and destination of a passenger. Since some of my constraints include only pick ups and the other constraints require the information form both pick up and delivery locations.
set s stops / s1*s10 /
p passengers / p1*p3 /
k vehicles /k1*k2/
od(p,s,s) origin-destination for passengers
*introduce orogin-destination pairs for passengers
od('p1','s1','s2') = yes;
od('p2','s3','s4') = yes;
od('p3','s7','s1') = yes;
By this way, I can link origin and destination stops with the passengers. However, I can not define a constraint where it requires only pick up node such as:
constraint(p) .. sum((k,s2), x(p*,s2,k)) =l=1;
where p* would be the source node of passenger 1, i.e., 's1'.
I would appreciate if someone can comment on this issue.
Problems with modeling
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests