Derivation of Models
Out of the infinitely many possible models of a given real system, the modeler has to commit to one. The simulation pipeline starts here, with that act of commitment — and the commitment is structured by two questions that get answered before any equation is written: what exactly should be modeled, and which quantities matter?
What exactly should be modeled?
The first call is about scope and granularity: what slice of the world does the model cover, and at what resolution?
- Granularity. Modeling the emissions of an engine as a single efficiency number is a different exercise from modeling the detailed combustion chemistry inside one cylinder. Both are valid models of the same system; they answer different questions and need different mathematics.
- Scope. Modeling the spread of a disease across a whole country is a different exercise from modeling its dynamics inside one hospital ward. The boundary moves, and so do the vocabulary and the parameters.
- Aggregate or individual. Modeling a web service by aggregate requests served per second is a different exercise from modeling the journey of one user’s specific click through the same backend. Same system, opposite question.
In every pair, neither side is “more correct” than the other. The choice is made by what we are trying to learn — and getting that wrong is a far worse mistake than picking imperfect equations later.
Which quantities matter?
Even after the slice is fixed, we still have to decide which variables enter the model — and how much weight each one carries. Two layers run in parallel:
- Qualitative: does this quantity belong in the model at all?
- Quantitative: if it does, how big is its effect — strong enough to be load-bearing, or small enough to safely drop?
Both calls rarely sit on the surface. Take a football’s flight after a kick: gravity and air drag are clearly central, the Magnus effect from the spin is genuinely present and often included, the Coriolis force is real but well below any margin we care about for a 30-meter pass, and the gravitational pull of the goalpost is mathematically nonzero and practically meaningless. Or take the price of a particular stock at next Monday’s open: the CEO’s earnings call last night plausibly enters, central-bank policy signals plausibly enter, a thread on a cooking blog plausibly does not — and a hundred candidate signals between those extremes need expertise to triage.
These early calls are rarely obvious. They rest on prior expertise, on previous studies, on working hypotheses — and they get locked in before any equation is written. A wrong call at this stage propagates silently through every later stage of the pipeline. The long public arguments about climate forecasts are a permanent reminder of how far the consequences travel: every debate about whether a model is to be trusted traces back, sooner or later, to which terms got included and which got dropped at the start.
Relationships among the relevant quantities
Picking the relevant quantities is only half the job. Even once we know which variables are in the model, we still have to describe how they hang together — what depends on what, and by how much. Two layers run in parallel here as well, and the names overlap with the previous section by no accident:
- Qualitative. The shape of the dependency, without numbers. Two flavors: signs of derivatives — “more X means more Y” (positive) or “more X means less Y” (negative) — and logical rules of the if/then kind: “if condition C holds, Y is roughly halved.” Enough to draw arrows on a whiteboard, not yet enough to compute anything.
- Quantitative. The concrete magnitude of each dependency. When X changes by one unit, Y changes by exactly this much. Now numbers can be plugged in.
Real systems rarely give us the courtesy of a single, fixed dependency network. The arrows themselves change strength — sometimes drastically — depending on the regime the system is in.
Take a web page’s load time as a function of available bandwidth. In the everyday regime, more bandwidth lands as faster loads, on a near-linear curve. But once the bottleneck moves elsewhere — say the server is slow to respond, or the page runs heavy client-side scripts before it can render — doubling the bandwidth does almost nothing. The dependency bandwidth → load time, strong by default, collapses to noise; what now drives the load time is server latency or browser CPU time, neither of which was the headline variable a moment earlier. The arrows are still the same arrows, but the weights have rearranged.
Generalizing this pattern — a dependency whose strength is itself a function of the system’s state — already pushes us beyond what plain prose can capture cleanly. The natural next question is what formal vocabulary should we reach for when we want to write interactions and dependencies down?
Descriptive tools
Several formalisms are in regular use, each suited to a different shape of dependency. None subsumes the others, and the choice is governed by what the dependencies actually look like — whether the system evolves over time, what its quantities depend on, whether the relationships are deterministic or random, continuous or discrete.
Algebraic equations and inequalities
The most familiar formalism: a single relation among the relevant quantities, or a list of such relations. No derivatives, no evolution — the quantities sit in some configuration, and the relation either holds or it doesn’t.
The first is Einstein’s mass–energy equivalence, a static identity tying two quantities together by the constant (the speed of light). The second is a linear inequality on a vector with weight vector — it carves out the half of where the weighted total of the components stays under a budget of . Relations of this kind capture equilibria, conservation laws, and feasibility constraints — anything where the question is does the configuration satisfy this? rather than how does it change?
Systems of ordinary differential equations
When the system evolves, derivatives enter. An ordinary differential equation (ODE) links a quantity to its rate of change with respect to a single independent variable — typically time . A system of ODEs is several such equations sharing the same time variable, with the equations coupled to one another.
A swinging mass with displacement from rest. The second derivative is the acceleration, and the equation says acceleration is the negative of displacement: pulled to one side, the mass accelerates back toward zero. The solution is a sinusoid — the textbook small-amplitude pendulum.
The rate of change equals the current value. Larger means faster increase, which produces an even larger — the engine of compound growth. Population, capital, an unchecked epidemic in its first days; anything self-amplifying.
with all constants — the arms race of two superpowers. Two countries with current military budgets and . The dotted versions are how fast each budget is growing — the year-on-year increase in spending. Read country ‘s line term by term:
- : the more you already spend, the harder it gets to argue for spending even more next year — domestic political and economic resistance scales with the existing budget. Negative coefficient because this term slows the increase.
- : the more the rival spends, the more pressure there is to keep up. Positive coefficient because this term drives the increase.
- : a constant baseline — there is always some push toward more spending, even when neither side is leading.
Country ‘s equation has the symmetric shape, with its own self-restraint, rivalry, and baseline coefficients. The qualitative outcome — runaway escalation, mutual de-escalation, or settling into an equilibrium — depends on whether the rivalry coefficients () win against the self-restraint coefficients ().
Systems of partial differential equations
When the unknown depends on more than one independent variable — typically space, or space and time — we arrive at a partial differential equation (PDE). Derivatives along each direction enter independently; partial because each is taken with respect to one variable while the others are held fixed.
The deformation of a membrane under load . Picture a drum head: a thin elastic membrane stretched across a frame , with a load pressing on it from above. Let be the vertical displacement of the membrane at each point — a function of two spatial variables. Two conditions hold at once:
- Inside the frame, the second partial derivatives of in and sum to the local load — local curvature of the membrane balances local pressure.
- On the rim , the membrane is clamped to the frame, so all along the boundary.
The notation is shorthand for , and similarly for .
All three formalisms above express dependencies as equations relating numerical quantities — sometimes purely algebraic, sometimes involving derivatives. A different kind of tool takes the system apart by its structure instead, working with discrete states or connections rather than continuous magnitudes.
Automata and state transition diagrams
An automaton sits in one of a discrete set of states and moves between them by transitions that fire in response to events or clock ticks. The picture is a directed graph — nodes are states, arrows are transitions — and the model’s content is the question which state is the system in right now? rather than the magnitude of any quantity.
- Queues. The state is how full the queue is: items waiting. An arrival increments it; a service completion decrements it. Two transition types and an integer-valued state are enough to describe every supermarket checkout, every banking queue, and every request buffer ever modeled.
- Text recognition. The state encodes the structure of what has been read so far — the last few characters seen, or the current position inside a grammar. Each new symbol fires a transition into the next state. Compilers, regex engines, and autocomplete predictions all live on this pattern.
- Cellular automata. A grid of cells, each carrying one of a small set of states (empty, partly filled, full), all updating at every clock tick by a fixed rule that looks only at a cell’s neighbors. Spare mechanics, surprisingly rich behavior — used to model growth processes such as wildfires, urban sprawl, or crystallization.
Graphs
A graph is just a set of vertices with edges between them — a structural skeleton, no geometry, no equations. A surprisingly wide range of modeling reduces to which thing is connected to which thing? once the right vertex/edge interpretation is chosen.
- Traveling salesman. Vertices are cities, edges are roads (typically weighted by distance, time, or cost), and the task is to find the shortest tour that visits every vertex once and returns home — the canonical hard case in the optimization-over-discrete-choices family.
- Ordering problems. Vertices are the sub-tasks of a larger job, and directed edges encode task A must finish before task B may start. The graph captures the precedence structure of the whole job, and a valid execution order is any walk through it that never starts a task with unfinished predecessors.
- Computing systems. Vertices are hardware components, edges are the connecting links between them. The same abstraction underlies layouts at every scale — a single chip’s wiring, a data-center’s switch fabric, the public internet.
- Process modeling. Vertices are processing steps or activities, edges are the data flows or control transitions between them — the language of dataflow diagrams, UML activity charts, and business workflows in software engineering.
Probability distributions
Real systems are often noisy, or our knowledge of them is incomplete. When randomness or uncertainty is part of the picture — when modeling a single outcome doesn’t make sense, only the distribution of possible outcomes does — the natural tool is a probability distribution.
- Arrival processes in a queue. Predicting any single customer’s arrival is hopeless, but the distribution of inter-arrival times has structure (often well approximated by a Poisson process), and that is what the model captures.
- Approval of government policy as a function of the unemployment rate. The two quantities don’t track each other along a clean curve. The model is a distribution over approval at each level of unemployment, not a single number.
- Control theory: error terms, white noise. Real measurements carry noise. A controller designed without modeling the noise behaves brittly when deployed; the model includes an explicit error term — often white noise, uncorrelated zero-mean fluctuations — so the design knows what it has to be robust against.
- Randomized heuristics. Algorithms like greedy with random tie-breaking, or simulated annealing, deliberately make probabilistic choices to escape local optima and explore large solution spaces. Their behavior is described by the distribution they induce over outputs.
- Characterization of data. Priors and posteriors in Bayesian inference, Gaussian and heavy-tailed distributions in classical statistics — the language of any modeling exercise where uncertainty is itself part of the picture.
Fuzzy logic
Classical Boolean logic forces every statement into one of two boxes — true or false, in or out. Fuzzy logic relaxes that: a statement can hold to some degree between 0 and 1. The room is kind of warm (degree 0.7); the laundry is fairly heavy (degree 0.6). Human reasoning rarely picks sharp thresholds, and rules written in fuzzy form often turn out to be more robust than hard cutoffs.
- Consumer electronics. Washing machines, dishwashers, and cameras frequently sit on fuzzy controllers — rules of the shape “if the laundry is fairly dirty and fairly heavy, run a somewhat long cycle” compose into smoothly-acting devices without anyone having to commit to a precise definition of fairly heavy.
Neural networks
A neural network is a layered web of artificial neurons — small computing units that each take several input numbers, combine them by adjustable strengths called weights, and pass the result through a simple nonlinear bend before forwarding it on. The weights are tuned by example until the whole network reproduces a desired input-to-output behavior. The right tool when the form of the dependency is unknown but examples of it are abundant: rather than the modeler deriving the rule, the network learns it from data. The same machinery now powers image recognition, machine translation, autonomous control, and surrogate models inside scientific simulations.
Algebraic structures
Some systems are best described not by numerical quantities but by sets equipped with operations — collections of objects together with rules for combining them (a generalized “addition” or “multiplication”). The standard flavors — groups, rings, fields, lattices — differ in which rules they demand of the combining operations. The model lives in how those operations behave, not in any magnitude. The leverage comes from theorems that hold across every instance of a given structure: once a phenomenon is identified as a group, an enormous body of established results applies.
- Groups in quantum mechanics. The symmetries of a physical system — rotations, reflections, particle exchanges — form a group, and the structure of that group constrains what states the system is allowed to occupy.
- Finite fields in cryptology. A finite field is one of these structures with only finitely many elements. The arithmetic on (the field of elements) underpins block ciphers (modern symmetric encryption, e.g. inside HTTPS), error-correcting codes (the redundancy that lets a scratched disc still play and a noisy radio link still decode), and elliptic-curve cryptography (the public-key schemes behind today’s digital signatures).
Simulation tasks
With a model in hand and a formal vocabulary picked for it, the modeler still has to answer one more question: what is the concrete task? The same equations can be queried in very different ways, and the question shapes everything downstream — which numerical methods apply, what counts as a successful run, how long the computation takes. Six task types account for most of what is actually asked of a model.
- Find an arbitrary solution. Sometimes any answer that satisfies the constraints is enough. Iterative methods that improve a solution step by step usually need a starting point already inside the allowed region before they can begin refining — and locating that first valid point can itself be a real subproblem. Phase I of the simplex method, for instance, exists precisely for this: find any point that satisfies all the constraints, so the actual optimization (Phase II) has somewhere to launch from.
- Find the only solution. When the equations have a unique solution, the task is to compute that one. The canonical case is a uniquely solvable PDE — given the right boundary and initial data, the equation determines exactly one function , and the job is to find it.
- Show existence of solutions. Sometimes the question is not “compute the solution” but “is there any solution at all?” — a yes-or-no feasibility test rather than a numerical value. Does this graph admit a Hamiltonian path — a path that visits every vertex exactly once? is the headline example, and the answer “no” is itself a valid (and often very informative) outcome.
- Solve an unconstrained extremal problem. Find the maximum or minimum of an objective over the natural domain of the problem, without auxiliary side conditions. The shortest path from a source to a sink in a graph is a clean instance — the search space (paths from source to sink) is built into the problem itself, and the optimization searches it for the minimum-cost element.
- Solve a constrained extremal problem. Optimize an objective subject to additional restrictions. The knapsack problem maximizes total value over the items chosen, subject to a weight budget. Linear optimization more generally maximizes (or minimizes) a linear objective over a region defined by linear inequalities. The constraints turn what could be a one-line search into the central technical challenge.
- Find a critical region. Identify the part of the system that limits performance — the bottleneck. The critical path of a project schedule is the longest chain of dependent tasks; speeding up any task off this path leaves the total duration unchanged. The component with maximal load in a structure or a network is whichever part is closest to its limit, and is therefore the next piece to fail or to upgrade.
With the model chosen, the formalism picked, and the concrete task pinned down, the modeling stage of the simulation pipeline is complete — and the next stages take over from here.