Skip to main content

Obtaining wrong solutions for VRPTW with SDLs

Answered

Comments

2 comments

  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    Hi Alex,

    The first issue is quite obvious: You have created variables x(i,i) that do not exist in the problem. We recommend only creating those variables that have a representation in your optimization problem. So, first create all feasible tuples (i,j) and use this list as parameter in addVars().

    To debug model issues, it is recommended to construct a very small problem instance, only with a few nodes in this case, and write out the model as LP file with mod.write("model.lp"). This file format can be easily read with a text viewer.

    Best regards,
    Mario

    0
  • Alexander Fischer
    First Comment
    Gurobi-versary
    First Question

    Hi Mario,

    thanks for your help, now it works.

    Kind regards

    Alex

    0

Please sign in to leave a comment.