Modelling Chapter 9
Modelling Chapter 9
rs
ve
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
BEFORE YOU START
ie
id
ev
br
• Do you know how to use a spreadsheet?
am
-R
• Do you understand that spreadsheets can be used for modelling?
-C
s
es
• Are you able to test validation rules within a spreadsheet?
y
Pr
op
ity
C
ve
a kitchen, a building, a motor vehicle or an aeroplane.
y
A computer model is a representation of a real-world
ev
op
ni
C
(3D), manipulating objects within the model, adding
use of a computerised model to predict how a real-life
ge
w
system might behave. Details in a computer model can
angles, applying different effects such as colour and
ie
id
ev
br
-R
Modelling software will include some essential features:
-C
model: a representation of a process • asking what-if questions to see what the result of
y
Pr
life behaviour
mathematical calculations that form the basis
rs
w
of the model
ie
ve
op
ni
modelling software
w
Modelling software is used to create a model. An example of the use of modelling is to create a model
ev
br
Spreadsheets can be used to create computerised of a roller coaster. Variables can include the height of
am
-R
models, but there are also custom-written solutions that each drop, the radius of loops, the starting speed of the
are used to model specific processes. carriage, length of each section and the weight of each
-C
produces a diagrammatic view of the devices connected and down and the g-force that will be experienced by
to the computer network. It will be possible to identify passengers. What-if questions could be asked such as
ity
C
the Internet Protocol (IP) addresses used on the network ‘What would happen if we increased the starting speed
rs
w
and how they are assigned through a Dynamic Host by 2 km/h?’ or ‘What would happen if we increased
ie
can be analysed.
e
w
g
ie
id
ev
br
am
-R
178
-C
s
es
y
9 Modelling
op
ni
U
C
ge
Constructing buildings, kitchens, gardens, motor
w
PRACTICAL ACTIVITY 9.01 vehicles and other objects can be a very costly process. It
ie
id
Experiment with a digital single-lens reflex is important to get it right first time as any adjustments
ev
br
(DSLR) camera simulator by changing the
am that have to be made in the real world will incur
-R
variables and seeing how this affects the end financial costs. Models help to experiment with different
results. You can find an example simulator on the designs to see which look is most aesthetically pleasing
-C
s
Cameraism website.
es
When designing a kitchen using modelling software,
y
Pr
op
9.2 The need for to see which configuration looks the best. Cupboards,
ity
C
rs
w
ve
be changed in a 3D environment to see what the kitchen
y
ev
op
ni
There are a variety of reasons why models might be
R
C
Whatever the reason, a model must be able to answer It’s important for governments to know what future
ge
w
what-if questions. populations will be so they can plan for housing,
ie
id
Models can be used for the purpose of training people transport infrastructure and public services. Scientists
ev
br
to use equipment. This could range from learning to model population growth within natural habitats. They
can identify the existing population and reproduction
am
instructors than learning in a real environment. When its carrying capacity (number of inhabitants that can
es
learning to drive a forklift truck, the trainee may make survive on limited resources) and the growth rate will
y
Pr
as costing money in terms of repairs, but using a model would be expected to increase exponentially. This is
known as density-independent growth.
rs
w
ve
real equipment does not suffer wear and tear, fuel is not
y
ev
the trainee in unpredictable situations such as turbulence Experiment with the Wolfram population growth
C
Unpredictable situations that would happen in real life Demonstrations Project website, by changing
ie
id
can also be removed for trainees when they first start the initial population, growth rate and carrying
ev
br
-R
Patterns that have happened in the past can be analysed between the atmosphere, oceans, land, ice and the sun
es
along with current data to predict what the weather might to estimate climate trends. Climate change models are
y
modelling to predict what might happen to profits or the before it will be known if the model is accurate. Models
ity
C
economy. It is too risky for a business to make sudden will include several scientific rules such as the first law
changes in the marketplace without testing them out of thermodynamics, the Stefan-Boltzmann Law, the
rs
w
with a model first. A variety of what-if questions can be Clausius-Clapeyron equation and the Navier-Stokes
ie
ve
asked using a model to determine how to make the most equations, but they include so many uncertainties
y
ev
op
ni
profit. Variables that could be changed include selling and are so complex that there is no known exact
R
given time, times of year to sell products and the effect of supercomputers. Climate change models differ to
e
weather on seasonal sales. weather forecasting in that they predict average weather
g
ie
id
ev
br
am
-R
179
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
conditions over a long period of time rather than
w
specific weather conditions on a given day. Models from PRACTICAL ACTIVITY 9.04
ie
id
the past can be tested against what really happened to Go to the Onramp traffic simulation website and
ev
br
see if the model was accurate, enabling the models to be
am try out their model of road traffic flow.
-R
improved for the future.
Identify the variables that can be changed and
-C
s
PRACTICAL ACTIVITY 9.03
es
What questions could you ask of the model?
y
Pr
op
ity
C
ve
trillion calculations a second. What-if analysis is the process of asking the question
y
ev
op
ni
‘what would happen if … ?’.
R
C
Models can be used to help with queue management.
ge
KEY WORD
w
This can include queues at a supermarket, telephone
ie
id
helpline queues and amusement parks. Being able to what-if-analysis: experimenting with changing
ev
br
predict the number of customers and having rules variables to see what would happen to the
that define how long it takes to serve each customer
am
a supermarket or they can be complex where different Some examples of what-if questions in a financial
es
customers are given different priorities. These rules such spreadsheet model might include:
y
Pr
queues) and reneging (leaving a queue). Variables will supplier for one of our parts?
ie
ve
-R
movement and projected changes in the number of • What price do we need to sell at in order to sell
vehicles expected along a route. The model can be used 5000 items per month?
-C
such as traffic lights, traffic islands or traffic calming (zero profit and zero loss)?
y
vehicles, vehicle speed, average acceleration of vehicles goal seek: seeing what a variable needs to
ie
ve
and congestion. Different modelling techniques are change to for a goal in terms of output to
y
be achieved
ev
w
g
ie
id
ev
br
am
-R
180
-C
s
es
y
9 Modelling
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 9.05
ie
id
Open 9.01 bike hire.xlsx which is a model to calculate the profit that would be made for different numbers
ev
br
of bikes being hired.
am
-R
1 a What would happen to the profit if the number of short male mountain bikes booked was
-C
changed to 70?
s
es
b What if there were no short male mountain bikes booked? Did any other data change when you
y
Pr
changed the quantity booked?
op
2 What would happen to the profit if the junior hourly rate was increased to £12.50?
ity
C
rs
w
3 Experiment with changing other variables within the spreadsheet model and watch what happens to
ie
the outputs.
ve
y
ev
op
ni
R
C
ge
w
ie
id
9.01 bike hire.xlsx calculates the profits for a bike hire company. In this example, the company wants to see how
ev
br
many bikes of a particular type they need to hire out to increase their profit to £2500:
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
Figure 9.2 shows the result of the goal seek being 65.63333 bikes, which would of course need to be rounded up to
ie
id
70 bikes:
ev
br
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
w
g
ie
id
ev
br
am
-R
181
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 9.06
ie
id
Open 9.02 student marks.xlsx which shows exam and coursework marks for students in a class.
ev
br
am
Use goal seek to answer these questions.
-R
1 What coursework mark would John need to increase his total mark to 390?
-C
s
es
2 John resits exam 3. What mark does he need to increase his total to 425?
y
Pr
op
3 Sameena resits her coursework. What mark does she need to get a total of 380?
ity
C
4 Fathima hasn’t taken exam 3 yet. What mark does she need to get a total of 250?
rs
w
ve
y
ev
op
ni
R
C
9.4 Test a spreadsheet model
ge
w
In Chapter 8 you learned how to choose test data and to test formulas, functions and validation rules within a
ie
id
spreadsheet. When testing a spreadsheet model, it is important to test all aspects of the model. This could include:
ev
br
-R
• validation rules • cell and worksheet protection
-C
• form controls
Pr
op
A test plan needs to be created to test all these aspects of the spreadsheet model. It needs to include clearly identified
ity
C
ve
op
ni
R
9.03 Block Paving.xlsm produces a quote for block paving a driveway. Here is an extract of a test plan for the model:
U
C
ge
-R
2 Customer Name Valid Input Screen: Invoice customer name = ‘Mr. Marzi’
on Invoice Customer Name = ‘Mr. Marzi’
-C
s
es
Length = ‘twelve’
Pr
op
Button Click on ‘View Invoice Button’ mode with same data from input
rs
screen
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
182
-C
s
es
y
9 Modelling
op
ni
U
C
ge
• goal-seek to find out what variables need to be
w
PRACTICAL ACTIVITY 9.07
changed to achieve a given outcome.
ie
id
Open 9.03 Block Paving.xlsm
ev
br
Other advantages of spreadsheet models include the
am
Follow the test plan in Worked Example ability to share the spreadsheet with colleagues easily
-R
1
9.02 and see if the actual results match the so that many people can experiment with the model,
and the fact that most organisations already own
-C
expected results.
s
spreadsheet software which reduces the need for training
es
2 Create another four entries for the test plan and purchase costs.
y
Pr
in Worked Example 9.02
op
ity
C
entries exactly as they are written and see the rules that represent the real world. Unless extremely
rs
w
if there is anything you could have put complex rules are used, then a spreadsheet model will
ie
ve
more clearly. never be an accurate representation. These complex
y
ev
op
ni
Extension 1: add cell protection, additional order to set them up and it can take a very long time
R
C
to create models that are truly representative of the
spreadsheet. Extend your test plan to cover
ge
w
these new features of the model. numbers, but cannot simulate the effect on objects.
ie
id
ev
Extension 2: open 9.04 Theme Park Queue
br
-R
theme park queue model. You will need to spend
a bit of time understanding how the model works 1 Identify three characteristics of modelling software.
-C
and how the graph and conditional formatting 2 Describe, using examples, how a spreadsheet
es
ity
C
ve
y
effectiveness of
ev
-R
• formulas and functions which define the rules forecasting and construction.
s
es
Pr
functions and graphs/charts to answer what-if • changes to the model can be made very quickly and
ie
ve
op
ni
• conditional formatting to highlight the effects • alternative models and designs can be used to see
R
w
g
ie
id
ev
br
am
-R
183
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
• unusual events (for example, earthquakes) can be wind direction or wind speed and emotional reactions
w
tested without the need to wait for them to happen to being evacuated. However, planners can experiment
ie
id
in real life with lots of what-if questions in order to plan for a
ev
br
large variety of circumstances, which means that when
• equipment does not suffer from wear and tear or
am
-R
a natural disaster does occur people can be better
damage when being tested or experimented with
equipped to deal with it.
-C
s
es
failure can be simulated without putting Pilot training
y
people in danger
Pr
When it comes to large aircraft, it can cost thousands
op
• simulations can be ‘sped up’ so that effects can be of pounds just to take off, fly and land. This cannot be
ity
C
analysed over a long period of time without having repeated too often as it will become too costly to train
to wait for that period of time to elapse.
rs
pilots. Flight simulators can help by removing the fuel
w
ve
Disadvantages include:
y
danger that a trainee pilot might pose if they make a
ev
op
ni
• the way a simulation reacts is only as good as the mistake while in the air.
R
C
Flight simulators not only include software, but very
ge
• simulation software and equipment can be very specialised equipment which can cost hundreds of
w
expensive to purchase thousands of pounds. The equipment will be designed
ie
id
• people need to be trained to use simulation to react in a similar way to a real aircraft, so that the
ev
br
equipment and software pilot can feel the physical effects of any movements
am
especially if they are designed to react like the life as possible. The software will include the rules of
s
real process
es
representation of the real-world process. Pilots can also practise landing and taking off at
ity
C
ve
y
the opportunity to respond to malfunctions such as an
ev
When planning for natural disasters, people need to failure. These would be far too dangerous to attempt in
C
know what the effects of a natural disaster might be. real life.
ge
-R
Pr
and firefighting.
ie
ve
y
ev
w
g
ie
id
ev
br
am
-R
184
-C
s
es
y
9 Modelling
op
ni
U
C
ge
Car driving ‘What happens if I increase the temperature?’ and the
w
outcomes can be seen. It’s also possible to speed up the
ie
id
Simulators can be used to help to learn to drive a car. In
simulation so that rather than waiting hours, days or
ev
most countries, learner drivers start immediately on the
br
even years to see what the effects might be, results can be
road having never used any of a car’s controls before.
am
-R
seen much more quickly.
They immediately have to deal with hazards such as
other cars, pedestrians, cyclists, potholes and dangerous Nuclear science requires a lot of computing power
-C
s
junctions. In addition to this, other drivers on the road in order to simulate nuclear reactions. For example,
es
are held up because of the learner driver being slow reactors convert uranium and plutonium through
y
Pr
and hesitant. nuclear fission which involves millions of collisions
op
ity
C
rs
w
hazards before taking a car onto the road for the first
ie
ve
time. A simulator is a safe environment and could
y
PRACTICAL ACTIVITY 9.08
ev
op
ni
C
needs to attempt manoeuvres such as turning in the road
An example can be found on the Dalton
ge
w
Nuclear website.
than having to do this straight away on a real road. Even
ie
id
ev
br
Pr
learning to drive.
crashing. Racing drivers would be able to take the car to
ity
C
the limit knowing that the virtual crash will not result
in an injury. However, a simulation will never behave REFLECTION
rs
w
exactly the same as the real car as the rules of the model
ie
ve
will never be perfect. Therefore it is still necessary to 1 Consider the implications of not being able
y
ev
Nuclear science is very dangerous. Even a small 2 Think about situations that would be too
ie
id
accident could expose a person to radiation that could dangerous for a pilot to learn how to react to
ev
br
cause serious disfigurement or death. It is therefore in a real aircraft but would be better suited
am
to a flight simulator.
-R
changing the way the control rods are used and the rate
Pr
op
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
185
-C
s
es