Latest possible start time for a task that can occur without lengthening the total project time. If the latest start time equals the earliest start time, this task is a critical task.
The
GetEarliestCompletionTime method of the TActivityNetwork component calculates and fills in the
Criticality,
EarliestStartTime and
LatestStartTime properties.
Namespace: ActivityNetwork
Delphi
|
published
property LatestStartTime: Integer read FLatestStartTime write FLatestStartTime;
|
Property Value
Type: Integer
The following example calculates the earliest time the project can be completed. It displays the value in a listbox. It also fills in each task's earliest start time and latest desirable start time:
Delphi
|
var
i, j: Integer;
begin
if G is TActivityNetwork then
begin
TActivityNetwork(g).GetEarliestCompletionTime( G[0] as TAOEEvent, G[G.NodeCount-1] as TAOEEvent, ListBox3.Items, i );
ListBox3.Items.Clear;
ListBox3.Items.Add('Earliest Project Completion Time: '+ IntToStr( i ) );
ListBox3.Items.Add('Tasks and their earliest possible start time and' );
ListBox3.Items.Add('latest desirable start time' );
for i := 0 to G.NodeCount - 1 do
with G.Node[i] as TAOEEvent do
begin
for j := 0 to EdgeCount - 1 do
ListBox3.Items.Add((Edge[j] as TAOETask).Name +' : '+
IntToStr(TAOETask(Edge[j]).EarliestStartTime)+'/'+
IntToStr(TAOETask(Edge[j]).LatestStartTime) );
end;
end;
end;
|
|