‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
Simulation and Modelling
Modelling
A model is a representation of a real-life process/object which consists of a set of equations
which describes its behavior.
Modeling is the creation of a programmed simulation of a situation/process in order to
predict future trends.
It involves the use of mathematical formulas and calculations to predict what is likely to
happen based on data recorded.
In modeling, we use the computer to solve equations so that we can carry out simulation.
An equation for part of an economic model could be:
Unemployment = people able to work – people working.
You can develop and evaluate your own models or use the models that have already been
set up to simulate a real life situations. 3-D Models can be built using CAD, e.g. for
planning stores.
Advantages of modeling
- No equipment is damaged
- People are not put in any danger
- Expensive prototypes don't need to be built - Time can be sped up or
slowed down
- Models can be run and re-run over and over
- Modifications can easily be made and re-tested quickly Disadvantages of
Modeling
The results depend on how good the model is and how much data was used to
create it in the first place.
- Models and simulations can't ever completely re-create real-life situations.
- Not every possible situation may have been included in the model.
- The equipment and software are expensive to purchase.
- Staff need to be trained how to use the software and equipment.
Simulation
Simulation is the study of the behaviour of a system using models in order to predict future
real life events, like population growth, flight simulator, etc. It involves feeding values into
a model to see how the model behaves.
In simulation, past and present data, as well as models are analysed in order to predict the
future. Simulation is used in the following areas:
Training (e.g. pilots, drivers, medical doctors, etc.), running/testing chemical plants
and nuclear plants, trying out equipment to be used under sea or in outer space,
crash testing cars, financial simulations (e.g. stock market predictions based on
various scenarios), population growth (i.e. predict how the world’s population will
increase based on a number of different scenarios), queues (e.g. simulating queues
at supermarket checkouts), weather forecasting
Advantages of simulation
- saves cost (rather than doing the real thing)
- safer (scenarios tried out on the simulation first before used in reality)
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 1 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
- possible to try out various scenarios in advance
- Some environments make simulations the only way to carry out a task
beforehand (e.g. outer space, under sea, chemical processes, nuclear reactors, etc.)
- faster (no need to build and test real system, so it is possible to get results
more quickly)
Flight Simulator
- Flight simulators are used to train pilots how to fly aircraft.
- They can also be used to test new aircraft before they are actually flown for
the first time.
- Flight simulators are expensive to buy but are much cheaper than actual
aircraft. A landing simulation with ice on the runway, thick fog and only one of the
four engines working would really test the pilot’s ability
Flight simulators enable pilots to experience turbulence, snowstorms, thunderstorms, fog,
etc, without leaving the ground.
Simulation At Road Junction
The following is a series of traffic lights at two busy junctions:
In this simulation it is necessary to consider -
In this simulation it is necessary to consider:
- how and what data is gathered
- how the simulation is done
- how the system would work in real life
- why simulations are done
How data is gathered
To make this as realistic as possible, data needs to be gathered over a long period of time.
This can be done by sensors in/near the road, using cameras or manual data collection.
Data gathered includes:
- number of vehicles passing in all directions at each junction
- number of vehicles passing in all directions at each junction at a particular
time of the day
- Number of cars build up at a junction before lights change
- is it a week day or weekend or public holiday
- how long it takes to clear vehicles at a junction
- other data (e.g. pedestrian crossings)
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 2 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
- time taken for largest/slowest vehicle to pass through a junction
- other factors (e.g. filtering of traffic to the right or left)
How simulation is done
The data is entered into the computer and the simulation is run. The following scenarios
may be tried out:
- timing of lights is varied to see how the traffic flow is affected
- build up number of vehicles stopped at a junction and change timing of
lights to see how it affects the traffic flow
- increase/decrease traffic flow in all directions to see how the traffic is
affected
- try out the impact of accidents
- consider passage of emergency vehicles
- effect of adding in pedestrian crossings
- once the simulation is run, the timing of the lights is determined and how
they interact so that the maximum traffic flow is achieved;
- fault scenarios (e.g. an accident) and their impact are considered
How the system works in real time
- Sensors in/near the road gather data (these can be light/infra-red sensors,
induction loops, pressure sensors, etc.)
- the data is usually number of vehicles passing a particular point
- the data is sent to a control box or computer system
- the gathered data is compared to data stored in the system (the stored data is
based on simulation runs, how the number of vehicles at a junction at a particular
time of day affects the traffic flow, etc.)
- the control box or computer “decides” what course of action to take and
sends signals to the traffic lights to change timing if necessary
- as with any system involving sensors, ADC and DAC interfaces may be
needed
Simulation in Weather Forecasting
Another example of simulation is predicting weather (i.e. a weather forecaster).
How and what data is collected
- Super computers are used since they control satellites in orbit.
- sensors measure the following variables in analogue form
pressure, temperature, relative humidity, wind speed and wind direction
sensors are placed in weather balloons and/or weather stations
- information is also got from satellites
- pilots also send in information regarding weather conditions during long
flights
- The data collected by the data loggers will be in analogue form and the
ADC device converts this to discrete values (digital) for the computer to accept.
How the simulation is done
- Data and information from the sensors/satellites is sent to computer for
processing
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 3 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
- This data is compared to information stored on files which contain known
weather patterns from the past
- predictions are made based on these comparisons
- Calculations are made to produce expected minimum and maximum
temperatures, pressure, moisture content, rainfall patterns, etc
- The computer produces weather maps showing isobars, temperatures, etc.
- computer can show graphically how weather (e.g. cloud formations) will
change with time (i.e. predict weather patterns) – this is often presented as a
computer generated video showing how clouds build up, how temperature and
pressure changes over, for example, the next 7 days, wind speeds etc.
- It is also possible to do statistical analysis and predict the percentage
probability that certain weather conditions will occur.
How future environment/climate changes can be predicted
- Weather forecasting uses the concept of simulation and modelling i.e.
predicting the weather by studying a mathematical weather model.
- The measurements are then entered into a mathematical weather model
which then makes complex calculations to come up with the weather reports.
- based on changes in weather patterns, the processor carries out a statistical
prediction
- model is able to change parameters to see how future climate can be
affected
- there is need to review a lot of previous data over a number of years to
check if changes are genuine, for example 20 years, predictions compared to actual
climate conditions to validate/further refine the model
- can make use of spread sheets and statistical software packages for other
calculations Output:
- Information obtained is displayed on the computer screen ready for
presentation on televisions
- Information can be printed documents. - Tables and graphs are
produced
- Rainfall maps and isobars are produced.
- Expected minimum and maximum temperatures are produced
- Areas of pressure change with time so it is possible to predict rainfall,
strong winds, etc. in advance
- Show how the clouds patterns will change with time so it is possible to
predict rainfall
Advantages of this automatic weather forecasting system include:
- Computer can take readings during weekends and public holidays without
the presence of human beings.
- Computer readings are more accurate.
- Readings can be taken more frequently.
- Readings can be taken any time of day or night.
- Graphs can be produced more easily. - Readings can be taken more reliably.
- Humans can be more productive if not collecting data.
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 4 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
Simulating Queuing in a Supermarket
Collecting data for the model:
- Sensors count number of people at checkouts points at each time of day
and each day of the week
- count how many people build up at the checkouts on either is it a weekday,
weekend or bank holiday
- determine how long it take to serve a customer
Carrying out the simulation
- number of checkouts opened and see how flow of people affected
- Build up number of customers at checkout, open extra checkouts and see
how it affects time to be served, etc.
- Increase/decrease number of customers and observe the affect
- Once simulation is run, number of checkouts needed is determined and
interaction with customers is determined so that optimum throughput is achieved -
Look at fault scenarios (breakdown of equipment etc.)
Embedded Web Technology (EWT)
- This is a new technology that uses the Internet in real time to control/interact with a
device which contains an embedded microprocessor.
- The user needs to be authorised to do this and can control a device anywhere using
a web browser (e.g. from a computer or even a mobile phone which is web-enabled).
- Example: An oven contains an embedded processor. The owner can use a web
ready mobile phone anywhere to control the oven remotely.
- By accessing a web site one is able to send instructions to control the oven.
- It is possible to control any device in this way if it contains an embedded processor
e.g. television, DVD player/recorder, washing machine, scientific experiments in remote
areas such as outer space
Global Positioning Satellites (GPS)
GPS - A navigational system involving satellites and computers that can determine the
latitude and longitude (position) of a receiver on earth by computing the time difference for
signals from different satellites to reach the receiver.
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 5 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
- GPS systems are used to determine the exact location of a car, airplane, ship
or any form of transport which travels from one place to another.
- In vehicles these systems are called Satellite Navigation Systems (sat nav).
- Satellites in outer space transmit signals to the Earth.
- Computers in vehicles (e.g. car, airplane or ship) receive and interpret these
signals.
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 6 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
- Positioning depends on very accurate timing – atomic clocks are used because of
their accuracy to within a fraction of a second per day.
- Each satellite transmits data indicating its position and time.
- The computer in the vehicle calculates its location based on the information from
at least three satellites as shown below:
- In motor vehicles the system is called satellite navigation (sat nav). - The on
board computer contains pre-stored road maps.
- The vehicle’s exact location, based on satellite positioning, can be shown on the
map; the driver can then be given verbal directions e.g. “turn left into Josiah Tongogara
Road” OR a screen output showing the vehicle moving on the map
How satellite navigation systems can be used to calculate a vehicle’s position
- satellites in outer space transmit signals to the Earth
- computers in the bus receive and interpret these signals
- the satellite relies on very accurate timing (atomic clocks)
- each satellite transmits data indicating position and time
- computer in bus calculates its position based on received satellite data
- at least three satellites are used to give the vehicle’s exact position How the
drivers uses the satellite navigation system:
- the computer has a number of pre-stored maps
- bus location shown on appropriate map
- directions are given verbally or on-screen output (on a map)
Advantages
- It is far safer since a driver of a vehicle doesn’t have to consult maps whilst
driving. - it also removes error (e.g. going the wrong way down a one-way street).
- Sat nav systems can also give additional information such as position of speed
cameras, estimate time of arrival, etc.
- GPS can monitor a vehicle’s position if it has broken down or has been stolen
(vehicle tracking system).
- In airplanes GPS can pinpoint its exact location in case of an accident which
enables search teams to quickly respond to the incident.
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 7 of 8Date: 14-Jan-16
‘O’ Level Computer Studies Notes-ZIMSEC Syllabus
-
Disadvantages
- maps may not up to date therefore instructed to turn into a road which no longer
exists
- road closures due to accidents or road works may cause problems to a sat nav
system
- signal loss can cause problems with GPS systems
- potential interferences from external sources (major problem on aircraft) -
incorrect start and end point entered into system can cause problems
Compiled by: Kapondeni T. Cell: 0772 245 866. Email: [email protected] Page 8 of 8Date: 14-Jan-16