Skip to main content

Adding subtour elimination lazy constraints with callbacks for multiple vehicles & multiple days.

Awaiting user input

Comments

2 comments

  • Daniel Saßmannshausen
    Gurobi-versary
    First Comment
    First Question

    I ran some more tests for n=8 turbines. Therefore all_nodes = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]

    with [1-8] as delivery nodes, [9-16] as pickup nodes, and [0,17] as the harbor nodes.

    For Vessel 0 I got the following routes:

    For Day 1:

    0-17-0
    1-9-8-16-3-11-1

    For Day 2: (correct!)

    0-17-7-15-5-13-0

    For Day 3:

    0-17-0
    2-10-4-12-6-14-2

    So my model successfully suppresses all subtours apart from the subtour from harbor to harbor.

    It should be only a few changes in my callback function to also include the harbor nodes in the subtour suppression, but I cannot find them.

    Help me Obi Wan Kenobi, you're my only hope

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Daniel,

    You could check in the callback which subtours are eliminated by printing them. You will then see whether you even come across subtours with harbors and if yes, you can then more easily understand what is happening in the subtour function. If the computed subtour is correct, then maybe you are missing some  variables in your \(\texttt{vessels}\) and \(\texttt{days}\) \(\texttt{for}\)-loops when adding lazy constraints.

    Best regards, 
    Jaromił

    1

Please sign in to leave a comment.