Page 1 of 1

1. Problem Definition A critical-path analysis is a technique used to determine the schedule for a project. One method f

Posted: Sat Nov 27, 2021 2:24 pm
by answerhappygod
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 1
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 1 (156.61 KiB) Viewed 91 times
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 2
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 2 (125.25 KiB) Viewed 91 times
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 3
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 3 (252.26 KiB) Viewed 91 times
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 4
1 Problem Definition A Critical Path Analysis Is A Technique Used To Determine The Schedule For A Project One Method F 4 (311.24 KiB) Viewed 91 times
1. Problem Definition A critical-path analysis is a technique used to determine the schedule for a project. One method for this analysis starts by dividing a project into sequential events and then dividing each event into various tasks. Although one event must be completed before the next one is started, various tasks within an event can occur simultaneously. The time it takes to complete an event, therefore, depends on the number of days required to finish its longest task. Similarly, the total time it takes to finish a project is the sum of the time it takes to finish each event. Table 1 illustrates an example of the critical-path information for a major construction project where each row in the table contains an event number, a task number, and the number of days required to complete the task. The data are arranged so that all the tasks for event 1 are followed by all the tasks data for event 2, and so on. Event Number Task Number Number Of Days 1 15 3 1 27 6 1 36 4 2 15 5 3 18 4 3 26 1 4 15 2 4 27 7 4 26 7. 5 16 4 Write a Python program that generates random critical path information for a given project and stores it into three lists: events, tasks, and days. Then, it repeatedly displays the following menu: 1- Display all Tasks 2- Find the event with longest duration 3- Compute the time to finish a given event 4- Compute project completion time 5- Plot events time chart 6- Add new task 7- Exit program

When the user selects option 7, your program must ask the user to confirm whether he/she actually wants to exit the program (see the sample runs). No global variables are allowed in this assignment. Use parameter passing and decide on appropriate parameters to communicate between various functions in the program. Your program must include at least the following functions: 1

1) generateData(....): Fills the events, tasks and days lists with the required values. Your program should, initially, store ten values in each of the three lists. The events list should eventually contain sorted integer values in the range [1,5] and must include all the values 1 to 5. For this purpose, first, fill the list with the five values of 1 to 5. Then add to the list five random integer values in the range (1,5). Then, sort the list in ascending order. The tasks list should contain random integer values in the range [10,30] that are distinct for every event (i.e., no task value should be repeated for any event). The days list should contain random integer values in the range [1,9]. 2) displayMenu(): Prints the menu and returns the user's choice. 3) display AllTasks(...): Displays the events, tasks and days lists' values in a readable tabular format as shown in the provided sample runs. 4) computeLongestEvent(....): Returns the event number for the event with the longest duration (i.e., the event with the most time consuming task). 5) computeEventTime(....): Returns the number of days needed to complete the specified event. 6) computeProjectTime(....): Returns the total number of days needed for the project completion. 7) plotEventTimeChart(....): Displays an asterisk bar chart of the events completion times as illustrated in the given sample runs. 8) addNewTask(...): Prompts the user for a new task information (event number, task number and the number of days), verifies the new task information, and adds the valid new task information at the proper position in the event, task and days lists, so that the events list stays in its sorted form after the addition of the new task information. Confirm the addition of the new task. 9) main(): Defines the events, tasks and days list variables, and fills them with data using function generateData(...). Then, it repeatedly presents the menu to the user and handles various user choices. It calls various functions as needed.

3. Sample Run: (Refer to PA4SampeRunl.txt and PA4SampeRun2.txt for extensive sample runs) Critical Path Analysis Critical Path Analysis 1 - Duplay all IMRE 2. Find the event with locant duration - Compute the time to finish given avant 4- Compute project completion tim 5. Plot vant time chart ਦੀ ਤੋਂ ਵੀ ਵਾਲ : ਬN . 7- Exit pro - Diena Il Tanks 2. Find the event with langt duration 1- Compute the time to finish 4- Computer project completion ti - Plotti tim chart ME 7. Exit program Enter your choice: Invalid choice Inter your chale Critical Path Analysis Entervent number Invalid unt number into ant nu Invalid at number 1. Display all Tanks 2. Find the went with longent duration 1- Compute the time to finishen avant Compute project completion time 5. Plat sunt in chart Add new task 7. Exit program Interrumber 1 ut number 1 Embu completed in 1 day Critical Path Analyse inter your choice 1 tent Task Number of Days 1. Deplay all fade 2- Find the went with longue duration 1- compute the inte finth givant 1- Contact completion time 1 Platt ta Ant 7. Exit pro 3 2 2 Enter your chalez 5 Intar the nut Intention and take number nu of days Invalid new tatton 6 in the new uk Information avant um af days): 122 Invalid Intan itical Path analysis Display all Tasks ne the vat with lumut duration compte the time to tih in avant toute peasest olutta h કે એક સારા ના રાજા In the 9 a 12 mdr ur of days) 19 lastended E Critical Hath Analysis - Display all lasku Fina hvor - Casute the event CREE Blatt Mart Adana 1 ELE In your chal Critical Fath Analysis Ar you sure you wt ta ut the polication in Arvou sure you cut to suit the value la VAN Compute the time to the event Compute project completin tim FL Athly LL 1- blyplay 11 HE મક યાત્રા માં કામ મ મ મ મ મ મ માથ, Ecout the u un V 4- daudelatum , Plat varetur aan Enter your cho la pre Cinta analysis ------------- Екан унали как се the are EL Find us with largest nu Compute the time to takih . sive 4 - Compute projet completion Add tau 7= 11 1 adu 4 L + um AL LE That is the days En des you want the vella