# need help quick

• 04-19-2005
theOracle
need help quick
here is the problem
write a simulation program for a small airport that has only one runway. there will be a queue of planbes waiting to land and a queue of planes waiting to take off. However, only one plane can use the runway ant a time. So there can be only one takeoff and only one landing. Assume that all takeoff take the same amount of time . Assume that all landing take the same amount of time, although this does not need to arrive for landing at random times, but with a specified probability of a plane arriving during any given minute.

where do i start?
needs help!!!!!!!!!!!!!!!!!!! :confused:
• 04-19-2005
JoshR
so what exactly will the program be doing? if planes are waiting to land and take off, what is the program supposed to do? manage them? if so, how many planes are landing and taking off? is that supposed to be an input to the program?
• 04-19-2005
DougDbug
You need 2 queues, and a random time delay, etc.
This assignment is a bit vague. Either you will have to assume (make-up your own) details, or they will be provided as the next part of the assignment.

Landing time?
Take-off time?
Flight frequency (i.e average time between flights)?
Is there any takeoff schedule?
How long do planes remain on the ground?

I'd suggest that you start-out by writing the program without the randomness, and without worrying about the "busy runway" issue... just get the queue-sequencing working first... Into the first queue... out of the first... into the second... out of the second.

When you get that working, add the "busy runway" delay, then some randomness.

Simulation implies randomness within some paramaters/limits or known probability. A simulation generally runs automatically... like a game that plays itself. :)

OK. You need 2 queues. A landing queue, and a takeoff queue.
The planes should probably be identified as a number or letter sequence (1, 2, 3, or A, B C). That way, its easy to demonstrate that plane A is the first to enter the landing queue, and the first to take-off, etc.
You may need a "runway clear" or a "runway busy" status variable.

1- As planes arrive, they enter the landing queue at random intervals. They can enter the queue at eny time, even during takeoff and landing.

2- As planes land, they exit the landing-queue. They can only land if if no other planes are landing or taking off. (time delay?)

The runway becomes busy during a landing. No other planes can land or takeoff.

3- Planes enter the takeoff queue after landing. (After a time-on-ground delay?)

4- As planes takeoff, they exit the takeoff queue They can only takeoff if no other planes are landing or taking off.

The runway becomes busy during a takeoff. No other planes can land or takeoff.
• 04-20-2005
treenef
Like Doug said, if this is an assignment I'm surprised as to how vague the specification is.

There are so many variables to consider you can become quite lost as to deciding the best course of action. Of course how complicated your program will be, will depend on how complicated your model is.

My advice would be to ask your examiner/lecturer for some guidance. At least then you will have a better idea as to how to continue this project.

Remember, a lot can go wrong with completely opened ended question such as the one you have posed.

:confused: