# Why are simulations important?
> On the critical importance of simulations in modern science.
Imagine you had a switch. A switch to turn _on_ or _off_ the light from our sun, much like a colossal light bulb. What primary consequence [^extreme] would turning it _off_, for a year or so, have on the plant life of our planet? Pause for a minute and take a guess.
_Please take a guess! Don't just skip ahead._
The _intuitive_ answer seems to be straightforward: Planet-wide, vegetation would suffer greatly and a great majority of it would perish. But how did we arrive at this _intuitive_ answer?
Well, when posed with the question - knowingly or unknowingly - we performed a quick [gedankenexperiment](https://en.wikipedia.org/wiki/Thought_experiment). The experiment, if paraphrased into a series of questions & answers, would probably unfold as follows:
- What information is sought by the experiment?\
$\qquad$ Effect on **_all_** plants if they do not receive sunlight for a year.
- Is it possible to conduct this experiment?\
$\qquad$ **Nope**. We wouldn't dare eclipse the sun for a year, even if it was technologically feasible.
- Sensibly so. Well, can we then simulate this experiment?\
$\qquad$ **Also, no**. It's _impossible_ to simulate the planet in its entirety, including everything from climate and ocean currents to humans and vegetation in full detail. Too many components, and relationships between them, exist for us to evaluate; plus we don't even know/understand all of them.
- Then, can we then simplify the experiment somehow? So as to make it feasible.\
$\qquad$ **Yes**. We can instead experiment on a _model_ by reducing our question to its fundamentals. We can focus solely on the _primary_ effect of sunlight deprivation and reduce our scope of study to a small cluster of plants (instead of all of plant life).\
$\qquad$ In other words, if we place a few plants in a dark cellar, we can reliably observe what happens to them in a year. And, from this result, we can extrapolate and answer the actual question.
- Great! Now, do we have the _resources_ (time, space etc.) to conduct an experiment that employs the model?\
$\qquad$ **Not really.** This is supposed to be a quick thought experiment and we want the answer kind of immediately. (Though this experiment is now feasible.)
- Okay... Can we _simulate_ the _model_ in our minds, by drawing on prior knowledge? What's the outcome?\
$\qquad$ **Yes!** (Our brain is powerful enough to simulate the model as long as we are judicious about the level of detail we are care about.)
> We know that plants need sunlight to make their food. In its absence, they fall back on their reserves. However, such reserves are unlikely to last for a year. Therefore, the plants will starve and possibly die at some point of time in the year. They may even rot by the end of the year.
- Perfect! We have a solution from our model. Can it be extrapolated to answer the real question?\
$\qquad$ **Yes**, if we extrapolate it to all the plants on earth, we realize that lack of sunlight for a year or so will have fatal consequences for the planet's plant life.
- Last but important point about assumptions and extrapolation: Are there any caveats we should be mindful of?\
$\qquad$ **Yes**. The outcome of our model depends largely on the selection of plants that we choose for storing in the cellar. If these are plants that can go dormant or have large food reserves (such as tubers) to survive in the dark, we may end up with results that are not truly representative of the _real_ world. Results derived from models are always at risk of the [GIGO principle](https://en.wikipedia.org/wiki/Garbage_in,_garbage_out) and therefore used carefully.
---
**Modelling and Simulation**
The exercise above is an example of a big/complex problem that we solved using _modelling and simulation_. We _modelled_ the process we wanted to study by making reasonable assumptions; this helped us simplify the accompanying experiment. We then _simulated_ the experiment, in our head, making use of an appropriate amount of prior knowledge.
Modern science is very reliant on _modelling_ and _simulation_: The [scientific method](https://en.wikipedia.org/wiki/Scientific_method) involves coming up with hypotheses to explain away things and processes. These hypotheses often take form of [models](https://en.wikipedia.org/wiki/Scientific_modelling) which are then tested against carefully performed experiments and established facts.
```{epigraph}
By a model is meant a mathematical construct which, with the addition of certain verbal interpretations, describes observed phenomena. The justification of such a mathematical construct is solely and precisely that it is expected to work — that is, correctly to describe phenomena from a reasonably wide area.
-- [John von Neumann](https://en.wikipedia.org/wiki/John_von_Neumann)
```
A major, often unmentioned, advantage of coupling models with simulations is that simulations allow the model be tweaked beyond what is naturally permissible. For example, one can study the role of gravity in the process of fruit development by scaling gravity in a model. This model won't be _natural_ (and therefore _must_ be simulated) but it could be very useful in discerning what we want to know.
Further, sometimes experiments can have quite convoluted results and trying to understand what or which processes (or mistakes) are leading to such a result can be very difficult. In such cases, simulating the processes that are being observed in the experiment can make the task a lot easier. Because we know the model behind our simulation in exact detail, successful replication of (even a convoluted) experiment is extremely helpful in understanding the experimental result. In some fields, simulating experiments has become part of the standard _experimental_ methodology. In some others, where experiments are dangerous (such as in nuclear weapon development), they have largely replaced experiments completely.
```{admonition} Good to know
:class: tip
- Good models are clearly defined and targeted to solve the problem at hand. The level of detail that is included in a model usually takes form of balancing a trilemma between complexity of the problem, (computational, human and temporal) resources, and the degree of accuracy desired.
- Models can be _tweaked_ to study complex cause-and-effect relationships in phenomena that may not be readily amenable to experimentation.
- Models can be tweaked to _fit_ convoluted experimental results and, therefore, used to understand such results.
- Simulating a problem is a good idea when [^non-exhaustive]:
1. it is impossible or unreasonable to do an experiment (like our example here),
0. techniques to observe/measure the subject of investigation (such as [crystal defects](https://en.wikipedia.org/wiki/Crystallographic_defect)) are comparatively expensive, insufficiently developed or non-existent, and
0. experiments have convoluted results and are in need of help.
```
[^extreme]: An even extreme version of this is discussed [here](https://youtu.be/rltpH6ck2Kc).
[^non-exhaustive]: The list is non-exhaustive, you are [welcome to contribute](https://docs.google.com/forms/d/e/1FAIpQLSdvAPCeVKejBZuYFWHZcnN9LtTBs29c5YRBWFxMnm8Dz0W74g/viewform).