Software designers answer other people's questions--early start time and latest start time

The problem is as shown in the figure, and the solution is as follows:


method:

First find the earliest start time: A is the start node, so the earliest start time of A is 0 , and the earliest start time is equal to the latest start time. Wait until you get the red part in the picture.

The earliest start time of other nodes is the maximum value of the value of all directed arcs with this node as the arc tail + the value of the arc head. It is clear from the example:

Then find the earliest start time of B, the directed arc with B as the arc tail has only <A,B> and the value is 2 , the earliest start time of A is 0 , so the earliest start time of B is 0+2=2 , Get green results.

To find the earliest start time of C, the arc with C as the arc tail has only <B,C> and the value is 3 , the earliest start time of B is 2 , so the earliest start time of C is 2+3=5 , and the yellow result is obtained.

Similarly , the earliest start times of D , G , and E are shown in the figure.

Find the earliest start time of F: the arc with F as the arc tail has <E,F> <B,F> <G,F> The corresponding values ​​are 13 6 13, take MAX{13,6,13} to get The earliest start time for F is 13 , giving the purple result .

The back is the same ...

Then since J is the end node, the earliest start time is the same as the latest start time, and the color result in the figure is obtained. 

 

Then ask for the latest start time : push from back to front.

Find the latest start time of I first. It should be only the arc <I, J> with I as the arc head. Therefore, the latest start time of I is the latest start time of J minus the value of <I, J> 18-2=16

Similarly , the latest start time of FH can also be obtained.

Find the latest start time of E: The arc with E as the arc head has <E,H> <E,F> The latest start time of H minus the value of <E,H> is 12 The latest start time of F minus The value of going to <E,F> is 13-3=10 , take MIN{12,10} to get the latest start time of E is 10

....

The back is the same ....

 

The minimum time to complete the project is the earliest or latest start time of the end node18

Both critical paths are drawn in the diagram

BC is on the critical path, so a day cannot be too late;

The time that BF can be delayed is the latest of F - the earliest of B - the value of <B, F> , that is, 13-4-2=7

 

Formula: the earliest start from the front to the back to see the largest arc tail, and the latest to use the subtraction from the back to the front to see the smallest arc head


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324626571&siteId=291194637