Critical Path



   {  Exmpl5.3-6_CriticalPath.mpl  }

   {  H.P. Williams, Model Building in Mathematical Programming, 3rd ed.  }

   {  Chapter 5.3,  Example 6,  Critical Path,  Size: 9x7,  Page 92  }


TITLE
    CriticalPath;

INDEX
    time := 0..6;
    activities := (DigFoundations, ObtainTiles, ObtainBricks,
                   LayFoundations, Walls, Dummy24, Roofing,
                   Wiring, Painting);


    FromNode[activities, time]  :=  ((1,0), (2,0), (3,0),
                                     (4,1), (5,3), (6,4),
                                     (7,2), (8,4), (9,5));

    ToNode[activities, time]  :=  ((1,1), (2,2), (3,3),
                                   (4,3), (5,4), (6,2),
                                   (7,5), (8,5), (9,6));

DATA
    Duration[activities] := (4, 12, 7, 2, 10, 0, 5, 3, 4);

VARIABLES
    StartTime[time] -> t;

MODEL

    MIN FinishTime = StartTime[6];

SUBJECT TO

   SeqRelation[activities]:

       SUM(time IN ToNode: StartTime) - SUM(time IN FromNode: StartTime)

     >=

       Duration;

END



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