Thread: need help quick

  1. #1
    Registered User
    Join Date
    May 2003

    Question 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!!!!!!!!!!!!!!!!!!!

  2. #2
    Join Date
    Mar 2005
    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?

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001

    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.

  4. #4
    Super Moderater.
    Join Date
    Jan 2005
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  3. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 09:06 AM
  4. Quick Sort Help
    By NavyBlue in forum C Programming
    Replies: 1
    Last Post: 03-02-2003, 09:34 PM
  5. Replies: 0
    Last Post: 04-30-2002, 07:24 PM