Skip to main content

Obtaining wrong solutions for VRPTW with SDLs

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Mario Ruthmair
    • 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
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Mario,

    thanks for your help, now it works.

    Kind regards

    Alex

    0

Post is closed for comments.