java :Simulation is the use of one system to imitate the behavior of another sys
ID: 3828577 • Letter: J
Question
java :Simulation is the use of one system to imitate the behavior of another system. Simulations are often used when it is expensive or dangerous to experiment with the real system. There are physical simulations, such as wind tunnels used to experiment with designs for car bodies. Flight simulators are used to train airplane pilots. Mathematical simulations are systems of equations used describe some system, and computer simulations use the steps of a program to imitate the behavior of a system under study. In a computer simulation, the objects being studied are usually represented as data, often as classes whose methods describe behavior of the objects and whose instance variables describe the properties of the objects. Most importantly, actions being studied are represented as methods of the classes, and the rules describing these actions are translated into computer algorithms. By changing the values of the data or by modifying these algorithms we can observe changes in computer simulation, then we can draw worthwhile conclusions concerning the behavior of the actual system. This project is a simulation of an airport. As a specific example, we consider a small but busy airport with only one runway. In each unit of time, one plane can land or one plane can take off, but not both. Planes arrive ready to land or take off at random times, so at any given moment of time, the runway may be idle or a plane may be landing or taking off, and there may be several planes waiting either to land or take off. In this simulation we need the following classes: Plane class: You need to create a class Plane whose objects represent individual planes. The class needs to maintain data about particular Plane objects. This data must include a flight number, time of arrival at the airport system, and a plane status as either arriving or departing. Since we do not wish clients of this program to modify this data, we shall keep it in private data members. What methods should the class have? Think about what a Plane can do. In this simulation a Plane only has a few things that it needs to do. 2) class Runway : The aim of this simulation is to gather data about likely airport use. The class Runway is used to keep the statistics such as the number of planes processed, the average time spent waiting, the number of planes refused service etc. The class Runway maintains two ArrayLists of type Planes.: A list called landing which keeps the info about landing planes, and a list called takeoff for planes that are ready to take off. Some rules to be implemented by the class Runway. a. It is better to keep a plane waiting on the ground than in the air. So in a small airport a plane can take off only if there are no planes waiting to land. b. The Runway method activity, will service the first plane in the ArrayList of planes waiting to land, and only when this List is empty will it allow a plane take off. Use a specialized type of class known as an enum to describe the three activities of the runway: idle, land, takeoff. (See pages 533-542 of the textbook for a description of how to set up an enum.) The class Runway should have the following instance variables: ArrayList landing ArrayList takeoff int listLimit // to restrict the maximum # of planes in the landing/takeoff list int numLandingRequests //number of planes asking to land int numTakeoffrequests //number planes asking to takeoff int numLandings //number of planes that have landed int numTakeoffs //number of planes that have taken off int numLandAccepted //number of planes lined up to land int numtakeoffAccepted //number of planes lined up to takeoff int numLandRefused //number of landing planes refused int numTakeoffRefused //number of departing planes refused int landWait // total time of planes waiting to land int takeoffWait //total time of planes waiting to take off int idleTime // total time runway is idle. A plane can only be added to the landing list if the list length is less than the list length limit. Otherwise, the plane is diverted to a different airport and service is refused. The same applies to planes asking to takeoff. If the length of the takoff list is less than the listLimit, then only a plane is added to the takeoff list. Otherwise, the plane is asked to takeoff at a different time. Think carefully about constructors. What should instance variables be set to before runway use? What activites take place on the runway? 3) class Simulation: This class will provide a main method, keep track of the runway and planes in the simulation and will count of intervals representing units of time. Things to remember: • In any unit of time, one plane can land or one plane can takeoff, but not both. • Planes arrive ready to land or to take off at random times, so at any given moment of time, the runway may be idle or a plane may be landing or taking off. • More than one plane might arrive at the airport or ask to leave the airport in any given interval of time. • There may be several planes waiting either to land or take off. • Use Random class to generate requests from planes.
Explanation / Answer
flight simulators are used for training pilots in developing new skills in handling aircraft under unusual operating conditions, and discovering the flight characteristics of a new aircraft. The diagram on the right shows a Concept 90 Boeing 747-400 flight simulator manufactured by Rediffusion Simulation Ltd.
In a flight simulator, such as the Boeing 747 simulator, the control panel in a cockpit is identical to one in a real plane. Outside the windows, there are displays generated by the sophisticated computers -- the so called Computer Generated Images (CGI) . When the trainee "takes off" in the simulator, he sees an identifiable airport and its surroundings. The simulation of Boeing Field, for instance, might show a fuel truck on the runway and Mount Rainier in the distance. The pilot also hears the rush of air around the wings that are not actually there. Besides, the simulator is tilted and shakened by six hydraulic systems. These are so convincing which make the trainee feels that he or she is actually controlling Although a flight simulator is also expensive, it has proven to be the most cost-effective method for training pilots. The reason is that it can be operated without damaging the real aircraft and can also enjoy a long life.
For a flight simulator to be useful, it must be able to convince the pilot that he or she is actually inside the cockpit of a real plane. As a result, the flight deck of some specific crafts, such as an Airbus 320, Concorde, or a Boeing 767 is accurately reproduced to create the 'look' and 'feel' of the real thing. Furthermore, every instrument must function identically to their real-world counterparts. This implies that fuel gauges must react to the rate at which imaginary engines consume fuel, which in turn must accurately reflect thrust and temperature characteristics.
Despite the automatic landing systems, the majority of landing approaches are made manually. Consequently, pilots do depend upon what they see through the cockpit windows. This is where computer graphics complements the real cockpit environment to create the illusion of flying.
In order to achieve this, flight simulator makes use of the Rediffusion Simulation's WIDE system which comprises three elements :
Typically, three projectors form a seamless coloured image upon the back- projection screen, with each projector forming an image with 50° horizontal field of view. The translucent back-projection screen is mounted above the cockpit and out of view from the pilots; the image on the screen is then seen as a reflection in the panoramic mirror.
With the correct juxtaposition of the projectors, screen and the mirror, the pilot and co-pilot see a virtual image several metres beyond the physical domain of the cockpit.
In order to achieve the real-time interaction, the data are maintained in the computer system modelling the flight dynamics of the simulated craft, and are made available to the image generator at a rate of 30 Hz. And as the update rate of the image generator is in the order of 50 Hz, the heading samples are interpolated to derive intermediate values.
Once the image generator knows the heading of the plane, there is a delay of approximately 0.06 second before the pilot actually sees the image corresponding to this position. This transport delay arises from the time required to 'walk' through the hierarchical database and retrieve the relevant geometry; apply the perspective transformation and clip surfaces to the viewing volume; and render the image into a frame store.
With virtual reality techniques, flight simulation industry provides cost- effective way of training pilots, either military or civilian. However, in order to make it to be effective, i.e. to provide the user with the illusion of being in a real aircraft, sophisticated computer systems are required to provide 3D graphics, force feedback and to handle real-time interaction.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.