Skip to main content

Arrival Time VRPTW Need Help

Answered

Comments

1 comment

  • Mario Ruthmair
    • Gurobi Staff

    Hi Maura,

    VRPs with time windows in general have solutions where the vehicles need to wait at some customer locations until the time window starts. So, even in an optimal solution, there could be waiting times at customers. Additionally, there are usually multiple optimal solutions that basically describe the same vehicle routes but differ in the waiting times at the customers (for the objective of minimizing the route distances or minimizing the travel times, it does not matter where the vehicles wait and how long).

    What people usually do is leave some freedom in the model with respect to the service start times. Optimal solutions will not be affected by this. In a postprocessing step, you can trace through each vehicle route and move the service start times to the earliest possible values.

    To your two modeling variants:

    1. You can easily put an upper variable bound of 360 to all your s[i,j,k] variables. Then, the value cannot be 544 anymore. If the vehicles should be at the depot again before time 360, you might need some additional constraints similar to: s[i,j,k] + (sd_j + w_j0)* z[i,j,0,k] <= 360 (provided that the depot is 0).
    2. Since you set the BigM constraint to be an equality, the model is most probably infeasible, and it returns a subset of the model that is already infeasible (which is clearly the case when you look at it).

    Best regards,
    Mario

    0

Please sign in to leave a comment.