Skip to main content

My model does not find a single solution, even if the time limit is set to high numbers.

Answered

Comments

5 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Jordi,

    Did you try the NoRelHeurTime parameter?

    Could you please post the log output of your run?

    Best regards, 
    Jaromił

    0
  • Jordi Kortekaas
    Gurobi-versary
    Curious
    First Comment

    Hi Jaromil, 

    I have tried some things and have gotten the code to work in the case of a single vehicle type for both the cars and tractors, however, in the case that both vehicles get used it seems to make the model infeasible. The infeasibility code I get of the IIS is:

    IIS computed: 2 constraints, 0 bounds
    IIS runtime: 0.04 seconds (0.01 work units)

    The following constraint(s) cannot be satisfied:
    LoadAfterVisit_11_20_3
    LoadAfterVisit_20_11_3

    I think it has something to do with the capacity of the car being to little for some of the demand at the nodes. However, with a simple nearest neighbour heuristic a solution can be found. I am not quite sure how I should edit the code. The updated Code is edited on the original post.

    Thank you in advance!

    Jordi

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Jordi,

    You can write the IIS to a file via

    model.optimize() 
    if model.Status == GRB.INFEASIBLE:
    model.computeIIS()
    model.write("iis.ilp")

    You can then open the file \(\texttt{iis.ilp}\) in any standard text editor and try to find out why it is infeasible. You can also post the IIS here, if you need further advice.

    Best regards, 
    Jaromił

    0
  • Jordi Kortekaas
    Gurobi-versary
    Curious
    First Comment

    Hi Jaromil, 

     

    This is my IIS: 
    \ Model CVRP_copy
    \ LP format - for model browsing. Use MPS format to capture full model detail.
    Minimize
     
    Subject To
     LoadAfterVisit_11_20_3: - 1100 C1701 - C3663 + C3717 >= 1088
     LoadAfterVisit_20_11_3: - 1100 C2949 + C3663 - C3717 >= 904
    Bounds
     C3663 free
     C3717 free
    Binaries
     C1701 C2949
    End

    However, I am not quite sure what to do about it. 

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    You have two binary variables of interest. The continuous variables are not interesting for the infeasibility because they can be free.

    Let's try all 4 cases for the 2 binaries.

    For C1701 = 1, C2949 = 1, we get

    - 1100 * 1 - C3663 + C3717 >= 1088
    - 1100 * 1 + C3663 - C3717 >= 904
    <=>
    - C3663 + C3717 >= 2188
    + C3663 - C3717 >= 2004
    <=>
    + C3663 - C3717 <= - 2188
    + C3663 - C3717 >= 2004

    For C1701 = 1, C2949 = 0, we get

    - 1100 * 1 - C3663 + C3717 >= 1088
    - 1100 * 0 + C3663 - C3717 >= 904
    <=>
    - C3663 + C3717 >= 2188
    + C3663 - C3717 >= 904
    <=>
    + C3663 - C3717 <= - 2188
    + C3663 - C3717 >= 904

    For C1701 = 0, C2949 = 1, we get

    - 1100 * 0 - C3663 + C3717 >= 1088
    - 1100 * 1 + C3663 - C3717 >= 904
    <=>
    - C3663 + C3717 >= 1088
    + C3663 - C3717 >= 2004
    <=>
    + C3663 - C3717 <= - 1088
    + C3663 - C3717 >= 2004

    For C1701 = 0, C2949 = 0, we get

    - 1100 * 0 - C3663 + C3717 >= 1088
    - 1100 * 0 + C3663 - C3717 >= 904
    <=>
    - C3663 + C3717 >= 1088
    + C3663 - C3717 >= 904
    <=>
    + C3663 - C3717 <= - 1088
    + C3663 - C3717 >= 904

    So, independent of how you set the 2 binary variables, the 2 constraint will always be infeasible. Now, it is up to you to understand why these constraints are present in this form in your model.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.