Dial a ride problem

Problems with modeling
Posts: 1
Joined: 2 months ago

Dial a ride problem

Postby salil » 2 months ago


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.PNG (4.24 KiB) Viewed 49 times

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.

Thank you,

Return to “Modeling”

Who is online

Users browsing this forum: No registered users and 1 guest