Non-fixed end depot - TRS example modification
Hi, I'm triying to modify the TRS example so that the end depot can be different than the start depot. First I removed the following lines:
for k in technicians:
for d in D:
if k.depot != d:
for i in L:
y[i,d,k.name].ub = 0
###y[d,i,k.name].ub = 0
Then, I created a second list of depots called E, just like D:
E = list(set([t.depot for t in technicians]))
And modifiy the end depot constraint as:
m.addConstrs((gp.quicksum(y[e,j,k] for j in J for e in E) == u[k] for k in K),\
name="diffDepot2")
Finally, for testing, I considered only Albert, still starting from Heidelberg, but reducing the distances to Freiburg im Breisgau significantly (about 90%) from every customer. By any measure, he should end his trip in Freiburg im Breisgau.
Those changes on the constraint did not work, because the model still forces Albert to return to his start depot. Can you help with any tips on how to make the end depot flexible?
Please sign in to leave a comment.
Comments
0 comments