Planning a flight tour


    {  Exmpl11.5-1_TourPlanning.mpl  }

    {  Applications of Optimization with Xpress-MP  }

    {  Chapter 11.5, Planning a Flight Tour,  Size: 7x42,  Page 229 }


TITLE
    TourPlanning;

DATA
    Ncities := 7;

INDEX
    city := 1..Ncities;
    city2 := city;

DATA
    Dist[city,city2] := (  0,786,549,657,331,559,250,
                         786,  0,668,979,593,224,905,
                         549,668,  0,316,607,472,467,
                         657,979,316,  0,890,769,400,
                         331,593,607,890,  0,386,559,
                         559,224,472,769,386,  0,681,
                         250,905,467,400,559,681,  0);

VARIABLE
    Fly[city,city2<>city];

MODEL

    MIN TotalDist = SUM(city,city2<>city: Dist * Fly);

SUBJECT TO

    VisitCityOnce[city] -> OCIT:
        SUM(city2: Fly WHERE city2<>city) = 1;
    VisitCityOnceA[city2] -> OCITA:
        SUM(city: Fly WHERE city<>city2) = 1;

BINARY
    Fly;

END


Back To Top | Maximal Home Page | List of Models | Previous Page | Next Page