Airplane Gate Scheduler in C Your task is to develop a tool

Airplane Gate Scheduler (in C++): Your task is to develop a tool that assists Airport Operations managers in allocating Boarding gates to scheduled airline flights. Each Operations Manager should input how many gates they have to schedule (Expect 2 to 5 gates). The operations manager will have an arbitrarily long list of flights in a text file with the following format: a. Airline Code (2 char code, such as AS, AA, DL, etc.) b. Flight Number: (String – 4 chars) c. Arrival Time: (hhmm 24 hour clock) Example: AA 241 1420 AS 31 1142 Additional Constraints: 1. The airport is only open from 0600 to 2100. Planes cannot depart or arrive when the airport is closed. 2. Each plane will only be on the ground for 1 hour. After that, the gate is free. 3. The flights file may not be in order of arrivals. 4. Do not assume that you can schedule all the flights on the list. Notify the Operations Manager when you cannot schedule a flight, and the reason, i.e. gates full at that arrival time. 5. Assume that there will be more flights than you have gate time, so you will need to use all the gates. 6. You only need to schedule the flights on a single operational day, all flights are for same day. 7. The only optimization needed is to schedule the next flight as close a departing flight as possible, therefore, minimizing gaps where a gate isn’t being used. Once you schedule a flight, don’t move it around to make space for other flights 8. The implementation must use linked lists (SLL, DLL CLL, etc). d. Output: i. Output 1: of the program should be a listing by Gate of each flight in order of time, starting with the earliest flight of the day and ending with the latest flight of the day. ii. Output 2: A list of unscheduled flights iii. Output 3: A listing, by gate of the remaining available valid slots for Airplanes (should one happen to arrive unexpectedly, the Operations Manager would like to know which gate would be available.)

Solution

// A Dynamic Programming primarily based resolution that uses table C[][] to

// calculate the Binomial constant

#include<stdio.h>

// paradigm of a utility operate that returns minimum of 2 integers

int min(int a, int b);

// Returns worth of Binomial constant C(n, k)

int binomialCoeff(int n, int k)

{

    int C[n+1][k+1];

    int i, j;

    // Caculate worth of Binomial constant in bottom up manner

    for (i = 0; i <= n; i++)

    zero || j == i)

                C[i][j] = 1;

            // Calculate worth victimization previosly keep values

            else

                C[i][j] = C[i-1][j-1] + C[i-1][j];

        }

    }

come back C[n][k];

}

// A utility operate to come back minimum of 2 integers

int min(int a, int b)

{

come back (a<b)? a: b;

}

/* Drier program to check on top of function*/

int main()

main:

j mm

mm:

la $a3, array_A # base address for array_A loaded into $a3

la $a1, array_B # base address for array_B loaded into $a1

la $a2, array_C # base address for array_C loaded into $a2

li $t1, four # $t1 = four (row-size and loop end)

li $s0, zero # i = 0; initialize first for loop

loop1:

li $s1, zero # j = 0; restart 2d for loop

loop2:

li $s2, zero # k = 0; restart third for loop

sll $t2, $s0, two # $t2 = i * four (size of row of c)

addu $t2, $t2, $s1 # $t2 = i * size(row) + j

sll $t2, $t2, two # $t2 = computer memory unit offset of [i][j]

addu $t2, $a2, $t2 # $t2 = computer memory unit offset of [i][j]

lw $t4, 0($t2) # $t4 = two bytes of c[i][j]

loop3:

sll $t0, $s2, two # $t0 = k * four (size of row of b)

addu $t0, $t0, $s1 # $t0 = k * size(row) + j

sll $t0, $t0, two # $t0 = computer memory unit offset off [k][j]

addu $t0, $a1, $t0 # $t0 = computer memory unit address of b[k][j]

lw $t5, 0($t0) # $t5 = two bytes of b[k][j]

sll $t0, $s0, two # $t0 = i * four (size of row of a)

addu $t0, $t0, $s2 # $t0 = i * size(row) + k

sll $t0, $t0, two # $t0 = computer memory unit offset of [i][k]

addu $t0, $a3, $t0 # $t0 = computer memory unit address of a[i][k]

lw $t6, 0($t0) # $t6 = two bytes of a[i][k]

mul $t5, $t6, $t5 # $t5 = a[i][k] * b[k][j]

add $t4, $t4, $t5 # $t4 = c[i][j] + a[i][k] * b[k][j]

Airplane Gate Scheduler (in C++): Your task is to develop a tool that assists Airport Operations managers in allocating Boarding gates to scheduled airline flig
Airplane Gate Scheduler (in C++): Your task is to develop a tool that assists Airport Operations managers in allocating Boarding gates to scheduled airline flig
Airplane Gate Scheduler (in C++): Your task is to develop a tool that assists Airport Operations managers in allocating Boarding gates to scheduled airline flig

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site