• Gurobi Staff

Hi Rihot,

Sounds like there is an error in your formulation.
You can try writing it to a LP file and make sure that the constraints match the formulation in the book: $$\texttt{model.write("vrptw.lp")}$$.

Cheers,
David

Hi Mr. Sanchez,

Thanks for the response. I did double check the model and seems can't find the error. Actually the time windows constraint seems suspicious, as when i comment that out, the solver was found the solution in a matter of second. I just extracted the lp model and hosted on google drive. Do you mind to have a look and maybe give any insight/advice about this?

Best Regard.

• Gurobi Staff

Hi Rihot,

You are right, as far as I can tell the time window constraints are fine. Looks like these:

$$u_{ik} +s_i + t_{ij} - u_{jk} \leq M(1-x_{ijk})~~\forall (i,j)$$

With $$M=1000$$.

Maybe try constraining the time windows a little bit more, e.g. provide a lower window and maybe a different upper window for each node.
If you are struggling with data creation, you can try using some real instances available and just grab fewer nodes: http://web.cba.neu.edu/~msolomon/c101.htm

Cheers,
David