What is system dynamics?

What is system dynamics?
What is system dynamics?

System dynamics is a method for understanding how complex systems change over time. It describes a system through stocks, flows, feedback loops, and delays, then uses simulation to show how those parts interact. The System Dynamics Society’s definition calls it a computer-aided approach for strategy and policy design.

Anyone who has adjusted a shower knows the pattern. The water runs cold, so you turn the tap toward hot, and nothing changes for a few seconds, so you turn it further. Then the water scalds, and you overcorrect the other way.

The tap works fine. The delay between your action and the result causes the swings, and system dynamics models that kind of behavior.

This page explains the building blocks, the history, the situations where the method fits, and how to add uncertainty and optimization to a model.

What are stocks and flows in a stock and flow diagram?

A stock is a quantity that accumulates, such as customers, water in a reservoir, or installed solar capacity. A flow is a rate that changes a stock, such as customers joining, water draining, or panels entering service. A bathtub captures the idea: the water level is the stock, the faucet is an inflow, and the drain is an outflow.

A stock changes only through its flows, which gives it memory. Shut the faucet, and the water level doesn’t drop at once; it falls at the drain rate. That memory slows systems down, and it is why the stock-and-flow diagram is the core picture in the field.

A stock and flow diagram draws each stock as a box, each flow as a pipe with a valve, and the sources and sinks beyond the model’s edge as clouds. Take a hypothetical customer base of 1,000 customers. Each month, referrals add 5 percent of the current customers and cancellations remove 2 percent, so the stock grows by 3 percent a month and reaches about 1,426 customers after 12 months.

What are feedback loops and causal loop diagrams?

A feedback loop exists when a change in a stock eventually changes the flows that feed it. Reinforcing loops amplify change, and balancing loops resist it. The customer example includes both: more customers generate more referrals, which generate more customers, and more customers also generate more cancellations, which pull the count back down.

These two loop types explain basic behavioral patterns. Reinforcing loops produce exponential growth or decline. Balancing loops produce goal-seeking, as a thermostat does when it pulls a room toward its setpoint, and a balancing loop with a delay produces oscillation.

A causal loop diagram maps these links before anyone writes equations. Arrows connect variables, a plus sign marks a link where both variables move the same way, a minus sign marks a link where they move in opposite directions, and a letter such as R or B names the loop type. The diagram shows structure and calculates nothing, so a stock-and-flow model usually follows it.

Why do delays matter?

A delay separates an action from its result, and it can turn a calm balancing loop into an oscillating one. People who ignore the delay keep pushing after the fix starts working, then push back the other way. The shower problem recurs at business scale.

Take a hypothetical inventory with a target of 100 units. Each week the manager orders the week’s demand plus 40 percent of the gap between the target and the current stock, ignoring orders still in transit, and orders arrive four weeks later. Demand then rises from 10 to 12 units a week.

Inventory first falls to 92 units, because the extra orders have not arrived. It then overshoots to about 106 units and drops below 95 units again before the swings fade. The ordering rule is sensible, and the delay produces the cycle.

Capacity cycles in industries with long construction times follow the same logic: investment responds to today’s prices and arrives years later.

How does systems thinking differ from the simulation approach?

Systems thinking sees a problem as connected parts and feedback loops. Its tools are qualitative, such as causal loop diagrams, stakeholder maps, and recurring failure patterns. System dynamics adds quantification by assigning equations and numbers to stocks and flows, then simulating the results.

The System Dynamics Society says its approach complements systems thinking approaches, and the two serve different purposes. Systems thinking helps a group agree on how a problem works. System dynamics tests whether the group’s theory produces the behavior it observes and what a policy would change.

A team can start with a causal loop diagram on a whiteboard and build the simulation when the questions need numbers.

Who was Jay Forrester, and where did the field begin?

Jay Forrester created system dynamics at MIT in the mid-1950s. He came from engineering: he developed servomechanisms (feedback control systems), radar controls, and flight-training computers for the U.S. Navy, and he led Project Whirlwind, an early MIT digital computing project.

He turned his attention to management in the mid-1950s and joined the MIT Sloan faculty in 1956. In that work, he studied a General Electric appliance factory and applied control-engineering feedback principles to management problems. His book Industrial Dynamics, published by the M.I.T. Press in 1961, became the first classic of the field.

Forrester extended the method from firms to cities in Urban Dynamics (1969), and then to the world in World Dynamics. The Club of Rome commissioned The Limits to Growth, which Donella Meadows, Dennis Meadows, Jørgen Randers, and William Behrens published in 1972, and its World3 model built on Forrester’s work.

John Sterman’s textbook Business Dynamics followed in 2000. Today the System Dynamics Society and academic groups such as MIT Sloan’s system dynamics group continue the work.

When is the method the right choice?

System dynamics fits persistent, cross-functional problems in which policies interact over months or years. Typical signs include a problem that keeps returning despite repeated fixes, a policy that works at first and fails later, and a result that depends on delays between departments or regions. System dynamics modeling works with aggregates such as populations, inventories, and budgets, not with individuals.

It fits poorly when individual behavior drives the outcome, which calls for agent-based modeling, or when the question concerns queues and events, which calls for discrete-event simulation. The table below compares the three approaches.

ApproachWhat it modelsBest forTypical question
System dynamicsAggregate stocks, flows, and feedbackPolicy questions over months or yearsHow will this policy change behavior over time?
Agent-based modelingIndividual agents that follow their own rulesBehavior that emerges from individual choicesHow do individual decisions add up to a pattern?
Discrete-event simulationEntities moving through queues and resourcesProcesses with waiting, capacity, and schedulingHow long will the queue get?

Many projects combine approaches, with system dynamics supplying the big picture and a discrete-event model detailing one process.

How do you add uncertainty and optimization to a model?

Classic system dynamics models often run one deterministic trajectory, so they show what happens if every input takes its best-guess value. Cory Welch’s 2017 paper notes that classical software can support uncertainty analysis, such as Monte Carlo sensitivity.

Three additions turn a trajectory into decision support. First, assign probability distributions to uncertain parameters and run Monte Carlo simulation, which produces probability bands over time instead of a single line. Second, run sensitivity analysis to find which parameters, and therefore which loops, drive the outcome. Third, use optimization to search for the best policy across the sampled futures.

A real example comes from the Northwest Power and Conservation Council, which plans long-range electricity resources for Idaho, Montana, Oregon, and Washington. Navigant Consulting built a dynamic model of the region’s electricity future in Analytica, with Cory Welch as lead consultant and developer. The model covers a 20-year horizon, samples uncertain demand growth, fuel prices, generation costs, and climate effects on hydropower, and combines linear programming for dispatch with nonlinear optimization for capacity planning.

How does Analytica handle feedback models?

Analytica builds dynamic models with feedback over time. A variable indexed by time can depend on its value in the previous period, and the Dynamic function sets the starting value, so delayed loops work naturally. Analytica’s tutorial on a dynamic system model builds a hare and fox population model this way, and the influence diagrams page explains that Analytica allows a loop when it contains a time lag, which the diagram marks with a dashed arrow.

Intelligent Arrays let you run the same model across regions, products, or scenarios without copying its structure. Cory Welch, then at Navigant Consulting, made this case in a paper at the 2017 International System Dynamics Conference, Making the Case for Using Analytica for System Dynamics Modeling. In an interview with Lumina, he says the array abstraction gave him more flexibility than tools such as Vensim and MATLAB and made multidimensional models much easier to build than on other system dynamics platforms.

Monte Carlo simulation and optimization work on the same model, so you can add probability bands and policy search without rebuilding.

One difference matters if you come from Vensim or Stella. Analytica does not use classic stock and flow icons: it expresses dynamic behavior inside variable definitions through a time index and Intelligent Arrays, and Welch’s paper notes that stock and flow variables have no distinct structures or icons. Teams trained on the classic notation will see a different diagram style, which Lumina’s comparison of system dynamics software discusses.

Which sectors use these models?

Four sectors illustrate where the method earns its place.

  • Energy transition and capacity build-out. Investment raises installed capacity, and retirement lowers it, while permitting and construction delays shape the path. Lumina’s energy and power page describes related work.
  • Water resources. Reservoirs and aquifers are stocks that rainfall and demand fill and drain, and the balance shifts with the seasons and the years. Lumina’s water and ocean resources page covers water supply and demand modeling.
  • Epidemics and healthcare capacity. Susceptible, infected, and recovered people form stocks; infection and recovery are flows, and hospital beds and staff form capacity stocks that fill with a delay.
  • Workforce and supply chain. Hiring pipelines, training time, and inventories carry the delays that produce the swings described above.

Each example shares the same ingredients: accumulations, feedback, and delays.

Further reading

The sources below cover the method, its history, and the Analytica case.

Forrester’s book sets out the original method, Sterman’s textbook teaches the modeling craft, and Meadows’s primer introduces the ideas.

Frequently asked questions

Is it “system dynamics” or “systems dynamics”?

The correct form is the singular, “system dynamics,” and it is the form the System Dynamics Society uses. The plural “systems dynamics” is common in search queries and everyday speech, and it refers to the same field. Use the singular in formal writing.

What is the difference between a causal loop diagram and a stock and flow model?

A causal loop diagram shows which variables influence each other and which loops reinforce or balance, but it does not calculate. A stock and flow model adds accumulations, rates, and equations, so you can simulate it and see behavior over time. Many teams draw the causal loop diagram first to agree on the structure, then build the stock-and-flow model to test it.

Is system dynamics the same as simulation?

No. System dynamics is one type of simulation, focusing on aggregate stocks, flows, and feedback. Agent-based modeling simulates individuals, and discrete-event simulation follows entities through queues and resources. Each answers a different kind of question.

Can system dynamics models include uncertainty?

Yes. You can assign probability distributions to uncertain parameters and run Monte Carlo simulation, which produces probability bands over time instead of one line. Classical software offers some capability for this, and Analytica includes Monte Carlo simulation as a core feature. Sensitivity analysis then shows which parameters and loops matter most.

What software do people use for system dynamics?

Vensim and Stella are the classic tools, and Cory Welch calls Vensim the most commonly used package in the field. Analytica takes a different approach, with array-based models, built-in uncertainty analysis, and optimization, and it does not use stock and flow icons. Choose by the problem: classic tools suit conventional stock and flow modeling, and Analytica suits models with many dimensions, uncertainty, or optimization.

What is sensitivity analysis?

Best Optimization and Solver Software: 2026 Comparison
What is sensitivity analysis?

Sensitivity analysis measures how much a model’s results change when its inputs change, and therefore shows which assumptions matter. It answers a simple question: if this number is wrong, how much does the answer change? A model with fifty inputs resembles a mixing desk with fifty sliders, because moving most of them changes nothing you can hear. The analysis finds the handful that matter before you argue about the other forty-five.

Finance teams know the simplest version as what-if analysis. The methods range from changing one input at a time to varying every input together, and each answers a different question. The sections below follow that ladder, and one hypothetical example, a utility evaluating a battery storage investment, shows what each rung reveals.

Why does it pay to find the inputs that matter?

Four practical benefits explain why reviewers ask for it, especially in fields such as energy and power, where investments last for decades, and the future is uncertain.

  • Focus your effort. Spend data collection and expert time on the few inputs that move the answer, and accept rough estimates for the rest.
  • Test the recommendation. Check whether the preferred option stays preferred when your assumptions prove wrong.
  • Build trust. Boards, regulators, and review panels want to see which assumptions carry the conclusion. GAO’s cost estimating guide lists sensitivity analysis as step 8 of its twelve-step estimating process and gives it a chapter of its own.
  • Find model errors. An input that should matter but does not, or one that matters far more than it should, often points to a mistake in the formulas.

Quantifying the uncertainty in your inputs is a separate step, which the risk analysis page covers, and this analysis then ranks which of those uncertainties deserve your attention.

How does one-at-a-time testing work?

One-at-a-time testing changes a single input while every other input stays at its nominal value. You record the change in the output, restore the input, and repeat for the next input. Finance teams call the method what-if analysis, and decision analysts call it one-way sensitivity analysis. It is quick and easy to explain, which makes it the right first step.

Consider a hypothetical example with illustrative round numbers. A utility evaluates a battery that delivers 100 megawatts for four hours, which stores 400,000 kilowatt-hours. At nominal values, the battery costs $300 per kilowatt-hour ($120 million), earns net revenue of $150 per kilowatt-year ($15 million per year), lasts 15 years, and faces an 8 percent discount rate. These values yield a net present value of about $8 million, and the model deliberately excludes operating costs, taxes, and degradation.

Now vary revenue alone. At $110 per kilowatt-year, the net present value falls to about negative $26 million, and at $190 it rises to about $43 million. Repeating the test for capital cost, discount rate, and project life produces one result for each input.

Analysts often plot the output against a range of values for one input, a technique that Analytica’s documentation calls parametric analysis. Spreadsheet users often build a similar view with a data table, which varies one or two input cells across a set of values. Either way, the result shows how the answer responds to one input at a time, and it shows nothing about inputs that move together.

What is a tornado diagram (tornado chart)?

A tornado diagram, or tornado chart, shows the results of one-at-a-time testing for many inputs in a single picture. Each input gets a horizontal bar that runs from the output at the input’s low value to the output at its high value, with every other input at nominal. The chart sorts the bars by length, so the widest bar sits on top and the narrowest at the bottom. That outline resembles a funnel cloud, although this one only flattens assumptions.

In the battery example, revenue produces the widest bar, a swing of about $68 million. Capital cost follows at about $48 million, the discount rate at about $32 million, and project life at about $28 million. Every bar crosses zero, which means each input alone could turn the project from a gain into a loss somewhere within its range.

Read the chart in three steps. First, find the widest bars, because those inputs move the answer most. Second, check each bar’s direction: higher capital cost lowers the value, and higher revenue raises it. Third, check whether a bar crosses the line where your decision changes.

The chart has two blind spots. It varies one input at a time, so it hides interactions between inputs, and it depends on the low and high values that you choose. A wide range on an input you know well makes that input look more important than it is. For the steps to build one in software, see the tornado charts documentation.

What are local and global methods?

Local methods measure the effect of a change around one point, usually the nominal case. One-at-a-time testing and tornado diagrams are local methods. Global methods vary all inputs together across their full ranges and report each input’s share of the variation in the output.

Local methods can mislead when a model is nonlinear or when inputs interact. In the battery model, revenue passes through a factor that depends on both the discount rate and the project life, so the effect of a revenue shortfall depends on those two inputs. A tornado holds them at nominal values, so it shows only one slice of that relationship.

Sobol indices are the best-known global measure, and the approach comes from I. M. Sobol, whose 1993 paper is the standard citation. The method splits the output variance into shares attributable to each input. The first-order index of an input is the share that input explains on its own, and the total index adds the share that comes from its interactions with other inputs.

Morris screening offers a cheaper alternative for models with many inputs. Morris’s 1991 method repeats one-at-a-time changes from many random starting points across the input space, then averages the effects and records how much they vary. An input with a large average effect matters, and an input whose effect varies widely from point to point either interacts with other inputs or acts nonlinearly.

Andrea Saltelli and colleagues cover these methods in Global Sensitivity Analysis: The Primer, and an open textbook on sensitivity analysis methods offers a free introduction.

How does a Monte Carlo sample rank the inputs?

Probabilistic sensitivity analysis, which Analytica calls importance analysis, ranks inputs by how much of the output’s uncertainty each one causes. It starts with a Monte Carlo simulation, in which each uncertain input has a probability distribution, and the simulation draws thousands of random combinations. The analysis then computes the rank-order correlation between each input’s sampled values and the output. A high correlation, positive or negative, marks an input that drives the result.

Because every input varies together, the ranking reflects interactions that a tornado diagram misses. It also weights each value by its probability, so an unlikely extreme counts for less than a likely value.

Suppose each battery input follows a triangular distribution that peaks at the nominal value and spans the same low and high values as the tornado. A simulation then gives rank-order correlations of about 0.72 for revenue, negative 0.50 for capital cost, negative 0.32 for the discount rate, and 0.28 for project life. The ranking matches the tornado. The simulation also shows about a 34 percent chance that the net present value falls below zero, a figure that a tornado cannot produce.

Variance shares from the same run, which are first-order Sobol indices, tell a similar story. Revenue explains about 53 percent of the variation in the net present value, capital cost 26 percent, the discount rate 11 percent, and project life 9 percent. Those shares add up to about 100 percent, which means the inputs act almost independently over these ranges, so the tornado ranking holds. When a model’s shares add up to well under 100 percent, interactions carry the rest, and one-at-a-time testing misses them.

Readers who want to compare simulation tools can read Lumina’s comparison of Monte Carlo software.

Does the recommended decision change?

A wide bar on a tornado diagram does not prove that an input matters to the decision. What matters is whether the input can push the result across the line that separates one choice from another. A switchover value, or break-even value, is the input value at which the preferred option changes.

The battery project breaks even when revenue falls to about $140 per kilowatt-year, which is about 6.5 percent below the nominal $150. It also breaks even when capital cost rises to about $321 per kilowatt-hour, which is about 7 percent above the nominal $300. Those two numbers show how little margin the recommendation has.

Value of information goes a step further. The expected value of perfect information states, in the units of the decision, the most you should pay to learn an uncertain input before you decide. In the battery model, perfect knowledge of revenue is worth about $2.5 million, capital cost about $1.1 million, and the discount rate and project life about $0.2 million each.

On the tornado, the discount rate and project life swing the result by roughly $30 million each, yet learning either one is worth little. The reason is that the expected net present value turns negative only in the least favorable tenth or so of each input’s distribution, against nearly three tenths for revenue. That comparison points the research budget at revenue and capital cost. The decision analysis page explains how value of information fits into the wider process.

How does scenario analysis differ?

The difference between sensitivity analysis and scenario analysis comes down to how many variables change at once. Sensitivity analysis moves inputs by a controlled amount, usually one at a time, to learn which ones matter. Scenario analysis changes many inputs together to tell a coherent story about the future, such as a recession with tight credit, to see what happens in that world. The table below compares the two.

FeatureSensitivity analysisScenario analysis
What changesOne input at a time, or all inputs by designA coherent set of inputs together
Question answeredWhich inputs matter, and by how much?What happens in this possible future?
Typical outputTornado diagram or importance rankingSide-by-side results for named scenarios
Main weaknessIgnores whether input combinations are plausibleCovers only the futures that someone imagines

The two methods complement each other. A recession scenario for the battery that combines revenue of $110 per kilowatt-year, capital cost of $360 per kilowatt-hour, and a discount rate of 10 percent gives a net present value of about negative $60 million, a result that no single bar on the tornado shows. Sensitivity analysis tells you which inputs to watch, and scenario analysis tells you what a bad combination does.

How do you present the results?

Match the display to the audience. A tornado diagram suits a board, because the bars need no explanation. An importance ranking suits analysts because it accounts for each value’s probability. A switchover table suits decision makers, because it states the change that would reverse the recommendation.

Limit each display to the five or so largest drivers and group the rest under one label, such as all other inputs. State the low and high values behind every bar, because readers otherwise compare bars drawn on different ranges. Finish with one sentence that says what the picture means for the decision.

How does Analytica handle this work?

Analytica includes these analyses in the same environment where you build the decision model. Its tornado chart varies each input one at a time between low and high values you set as absolute numbers, percentages around the nominal value, or, for uncertain inputs, fractiles such as the 10th and 90th percentiles. When the output is an array, Analytica produces one tornado for each element. Importance analysis uses the Monte Carlo sample to rank inputs by rank-order correlation with the output.

A parametric analysis needs no data tables. You add a dimension that lists alternative values for an input, and Intelligent Arrays carry that dimension through every downstream variable, so the output appears for each value at once. Value of information analysis calculates the expected value of perfect information for an uncertain input.

With Analytica Cloud Platform, you publish the model from the desktop and invite collaborators by email, and they run it in a browser without installing anything. Readers who want to compare tools can read Lumina’s comparison of sensitivity analysis software.

Further reading

The sources below cover the methods and examples on this page.

  • Morgan, M. G., and M. Henrion. Uncertainty: A Guide to Dealing with Uncertainty in Quantitative Risk and Policy Analysis. Cambridge University Press, 1990.
  • Saltelli, A., et al. Global Sensitivity Analysis: The Primer. Wiley, 2008.
  • Sobol, I. M. “Sensitivity Estimates for Nonlinear Mathematical Models.” Mathematical Modelling and Computational Experiments, volume 1, number 4, pages 407 to 414, 1993.
  • Morris, M. D. “Factorial Sampling Plans for Preliminary Computational Experiments.” Technometrics, volume 33, pages 161 to 174, 1991.
  • Clemen, R. T. Making Hard Decisions: An Introduction to Decision Analysis.
  • U.S. Government Accountability Office. Cost Estimating and Assessment Guide. GAO-20-195G, 2020.

Morgan and Henrion’s book treats uncertainty in quantitative models, and the primer details the global methods.

Frequently asked questions

What is an example of sensitivity analysis?

A utility evaluating a battery storage investment might raise and lower its capital cost, revenue, discount rate, and project life, then record the effect on net present value. In the hypothetical example above, raising capital cost from $240 to $360 per kilowatt-hour changes the net present value from about $32 million to about negative $16 million. Repeating the test for every input and sorting the swings produces a tornado diagram.

Is sensitivity analysis the same as what-if analysis?

They overlap but differ in scope. What-if analysis asks what happens when one assumption changes, and one-at-a-time testing is its most common form. Sensitivity analysis is broader, because it also ranks inputs with tornado diagrams, weights values by probability with importance analysis, measures interactions with global methods, and checks whether the decision changes. A what-if question gives you one answer, while sensitivity analysis tells you which questions deserve asking.

Can Excel do sensitivity analysis?

Yes, for the one-at-a-time version. An Excel data table varies one or two input cells across a set of values and shows the result for each. Ranking many inputs, simulating probability distributions, and measuring interactions take extra setup or additional software. Solver, the optimization add-in, can create a report after it finds a solution, and the page on optimization and solvers explains what solver output can say about how a best answer responds to change.

What is the difference between local and global sensitivity analysis?

Local sensitivity analysis changes inputs one at a time around a base case and measures the effect of each change. Global sensitivity analysis varies all inputs across their full ranges and measures each input’s share of the output’s variation, including interaction effects. Local methods run faster and are easier to explain, and global methods work better when a model is nonlinear or its inputs interact.

How many inputs should a tornado chart show?

Show about five. Most audiences can follow five bars, and the bars below the top five usually add little to the message. In an analyst’s report, you can extend the chart to ten when many inputs have similar swings, and you can group the remainder under one label.

Optimization and solvers: finding the best decision

What is system dynamics?
Optimization and solvers, finding the best decision

Mathematical optimization, often shortened to optimization, is the search for the best decision among all decisions the rules allow. You describe the choices as decision variables, the goal as an objective, and the rules as constraints. A solver, which is an algorithm, then finds the values that maximize or minimize the objective while it respects every constraint. That complete description is an optimization problem.

The search needs an algorithm because trying every option is hopeless. Ten decisions with ten options each produce ten billion combinations, and checking one combination per second would take about 317 years. Nobody has that long, so a solver rules out whole regions of combinations at once instead.

This page explains the building blocks, the main problem types, how solvers work, how to handle uncertain inputs, and where Analytica fits.

What are decision variables, objective functions, and constraints?

Decision variables are the quantities you control, such as how much energy to buy from each source or how many plants to build. The objective function is the single number you want to minimize or maximize, such as total cost or expected profit. Constraints are the rules every answer must obey, such as a demand to meet, a budget, or a physical limit. A set of decisions that satisfies every constraint is feasible, and the best feasible set is the optimum.

Consider a hypothetical utility that must supply 1,000 gigawatt-hours (GWh) of electricity next year at the lowest cost. It can buy gas at $40,000 per GWh, wind at $60,000 per GWh up to 600 GWh, and solar at $70,000 per GWh up to 300 GWh. A regulation caps emissions at 100,000 metric tons of carbon dioxide, and gas emits 400 metric tons per GWh.

The decision variables are the GWh bought from gas, wind, and solar. The objective function is total cost, which equals 40 times the gas GWh plus 60 times the wind GWh plus 70 times the solar GWh, in thousands of dollars. The constraints are the 1,000 GWh demand, the emissions cap (gas limited to 250 GWh), and the two contract limits.

The optimum buys 250 GWh of gas, 600 GWh of wind, and 150 GWh of solar for $56.5 million. Without the emissions cap, the cheapest plan buys 1,000 GWh of gas for $40.0 million. The cap therefore costs $16.5 million and removes 300,000 metric tons of emissions, an average of $55 per metric ton.

An influence diagram draws this structure with decision nodes that feed an objective node, and in Analytica, constraint nodes hold the rules.

Which type of problem do you have: linear, integer, or nonlinear?

The shape of the equations decides which algorithms apply, so the first step is to identify the problem type. The utility example is a linear program, because the objective and every constraint add up decision variables, each times a constant. The table below lists the common types, each with its typical form, an example, and the family of algorithms that handles it.

Problem typeWhat it looks likeTypical exampleSolver family
Linear programming (LP)Linear objective and constraints, with variables that take any value in a rangeThe generation mix above, blending, shippingSimplex or interior point
Integer programming and mixed integer programming (MIP)Some or all variables must be whole numbers or yes/no choicesWhether to build a plant, which units to run each hourBranch and bound
Quadratic and conic programmingSquared terms in the objective or cone-shaped constraints, with linear structure otherwisePortfolio risk against returnInterior point (barrier)
Nonlinear optimization (NLP)A curved objective or curved constraintsEfficiency curves, economies of scale, physical lawsGradient-based local search or global search methods
Constraint programmingLogical and scheduling rules, such as one task cannot start before another endsShift rosters, timetablesConstraint propagation with search
Stochastic optimizationUncertain inputs, with some decisions coming before the outcomeCapacity contracts that precede the demand outcomeScenario-based LP or MIP

Start with the simplest type that describes the facts, because each step down the table makes the search harder. For a deeper reference on each type, see the NEOS Guide to Optimization.

Three questions sort most problems. If any decision must be a whole number or a yes/no choice, the problem is an integer or mixed integer programming problem. If any equation curves, so that doubling a variable does not double its effect, the problem is nonlinear, or quadratic when the curve is a square. If any input is uncertain, stochastic optimization applies on top of whichever type remains.

How does a computer find the best answer?

The simplex method, which George Dantzig devised in 1947, exploits a fact about linear programs. At least one optimal solution always lies at a corner of the feasible region, so the method moves from corner to corner, each time to a better neighbor, until no neighbor improves. In the utility example, the optimum sits where the emissions cap, the wind limit, and the demand requirement all bind. Interior point methods take a different route, cutting through the interior of the region toward the optimum.

Integer problems need branch and bound. The solver first ignores the whole-number rule and solves the relaxed problem. If a variable comes out fractional, such as 2.5 plants, the solver splits the problem into two, one that allows at most 2 plants and one that requires at least 3, and solves each. It discards any branch that cannot beat the best whole-number answer found so far.

Linear solvers also report a shadow price for each constraint. In the example, the emissions cap has a shadow price of $75 per metric ton because tightening the cap by 1,000 metric tons adds $75,000 when solar replaces gas at the margin.

Nonlinear problems add a hazard. A solver follows the slope uphill or downhill and stops when no direction improves, so it finds the nearest peak and not necessarily the highest one. In a convex problem, every local optimum is also the global optimum, but a nonconvex problem can have many peaks, so analysts often start the search from several points.

An optimization solver packages these methods behind one interface, and the NEOS Server lets you try one problem on different solvers online.

Why does the way you write the problem matter so much?

A solver answers the question you wrote, not the question you meant. A model with a missing constraint returns a confident plan that breaks a rule, and a badly structured model may never finish. Formulation, turning a decision into variables, an objective, and constraints, therefore matters more than the software that runs it.

Three habits keep models solvable. First, keep the model linear wherever the facts allow, for example, by approximating a gentle curve with a straight line over the relevant range. Second, give every variable realistic lower and upper bounds, such as the 600 GWh wind limit, because bounds shrink the space the search must cover. Third, avoid unnecessary integers, since thirty yes/no decisions already allow 230 = 1,073,741,824 combinations.

Treat a decision as continuous when whole numbers do not matter, for example when you buy energy in GWh instead of whole plants. Then test the model on a small case you can check by hand. The utility example works for this purpose, because its answer follows from simple arithmetic.

What happens when the inputs are uncertain?

Real inputs vary. Demand, fuel prices, rainfall, and equipment failures all move, and the usual shortcut replaces each with its average and solves once. That shortcut repeats the Flaw of Averages, because the plan that is best for the average case is rarely best across the cases that can occur. The Monte Carlo simulation page explains the flaw in more detail.

Extend the hypothetical utility. Next year’s demand will be 900 GWh or 1,100 GWh with equal probability; the utility must sign the wind and solar contracts before anyone knows which, and each GWh of unserved demand costs $200,000. The plan optimized for the average demand of 1,000 GWh signs 600 GWh of wind and 150 GWh of solar, and the model reports a cost of $56.5 million. If demand reaches 1,100 GWh, gas hits its 250 GWh emissions limit, 100 GWh goes unserved, and the cost climbs to $76.5 million.

Stochastic optimization builds the uncertainty into the search. It chooses the contracts, which are the first-stage decisions, to minimize the expected cost across the demand cases, and it treats gas dispatch and shortfalls as second-stage decisions that adjust to each outcome. The table compares the two plans.

PlanWind (GWh)Solar (GWh)Cost if demand is 900 GWhCost if demand is 1,100 GWhExpected cost
Optimized for average demand600150$52.5 million$76.5 million$64.5 million
Stochastic optimization600250$55.5 million$63.5 million$59.5 million

The average-demand plan promised $56.5 million but costs $64.5 million in expectation, which is $8.0 million more than it promised. The stochastic plan buys 100 GWh more solar as insurance and saves $5.0 million against the average-demand plan.

A real model replaces the two demand cases with many Monte Carlo samples. Robust optimization offers a second approach because it protects against the worst case within a defined set of scenarios rather than the average. Before building a large stochastic model, run a sensitivity analysis to identify which uncertain inputs drive the best decision, and describe those inputs using risk-analysis methods.

How do simulation, search, and decision analysis differ?

Simulation shows what happens for a given decision. It runs the uncertain inputs through a model and reports the range of outcomes. Optimization searches for the best decision under a stated objective and constraints. Decision analysis frames the choice before either one starts, by defining the alternatives, the uncertainties, the objectives, and the decision maker’s attitude toward risk.

The three combine. Decision analysis defines what best means, optimization proposes the best decision for that definition, and Monte Carlo simulation tests whether the proposal holds up across uncertain futures. The strongest models use all three, and the stochastic example above already combines the last two.

Who developed the field, and when?

Leonid Kantorovich developed linear programming techniques in 1939 and shared the 1975 Nobel Memorial Prize in Economic Sciences with Tjalling Koopmans. Dantzig devised the simplex method in 1947, and the word programming in linear programming meant planning, not computer code. John von Neumann’s duality theory, developed in the same period, showed that every linear program has a companion problem whose solution yields the shadow prices.

Ailsa Land and Alison Doig described branch and bound in 1960, the search strategy behind integer programming. Narendra Karmarkar introduced an interior point method in 1984. Commercial and open-source solvers now package all of these methods.

How do you build and solve these models in Analytica?

Analytica draws a decision problem as an influence diagram, so the diagram doubles as the model structure. The utility example needs three decision nodes for gas, wind, and solar, one objective node for cost, and constraint nodes for demand, the emissions cap, and the contract limits. The Analytica Optimizer selects the solver best suited to the problem automatically, across linear, mixed integer, quadratic, and nonlinear programs.

The standard engines handle linear and quadratic problems with up to 8,000 variables, including up to 2,000 integer variables, conic problems with up to 2,000 variables, and nonlinear problems with up to 500 variables. Plug-in engines, including Gurobi and Knitro, handle larger problems with few or no changes to the model, and the Solver engines page lists them. Lumina’s comparison of optimization and solver software reviews the options side by side.

Intelligent Arrays add dimensions such as time and scenarios to a model without copying its structure. To make demand uncertain, specify it as a chance variable with a probability distribution, which Lumina’s Optimizer page describes as the route to stochastic optimization. Monte Carlo simulation and sensitivity analysis then run on the same model.

Where do utilities use these models?

Electric utilities use optimization for planning and operations, and Lumina’s energy and power page describes related work. The list below names six common problems.

  • Economic dispatch. Choose how much each generator produces in each period to meet demand at the lowest cost.
  • Unit commitment. Decide which units run in each period, which makes it a mixed-integer problem because a unit is either on or off.
  • Capacity expansion. Choose which plants to build and when, under uncertain demand, fuel prices, and policy. Navigant Consulting built a model of the Pacific Northwest’s electricity future in Analytica that combines linear programming for dispatch with nonlinear optimization for capacity planning.
  • Transmission planning. Decide which grid links to add or upgrade.
  • Storage scheduling. Decide when to charge and discharge batteries or reservoirs against prices and demand.
  • Grid flow balancing. Match supply and demand across a network of lines.

Each problem has the same three parts, which are decisions, an objective, and constraints.

Further reading

The sources below cover linear programming, operations research, stochastic programming, and the Analytica Optimizer.

  • Dantzig, G. B. Linear Programming and Extensions. Princeton University Press, 1963.
  • Hillier, F. S., and G. J. Lieberman. Introduction to Operations Research. McGraw-Hill.
  • Birge, J. R., and F. Louveaux. Introduction to Stochastic Programming. 2nd ed. Springer, 2011.
  • Lumina Decision Systems. Analytica Optimizer Guide. Analytica Docs.

Dantzig’s book comes from the originator of the simplex method, Hillier and Lieberman’s textbook covers the wider field, and Birge and Louveaux’s covers stochastic programming.

Frequently asked questions

What is the difference between optimization and simulation?

Simulation shows what happens for a decision you choose, and optimization searches for the best decision. A simulation of the utility example would report the cost of one contract mix across many demand outcomes. An optimization would search across contract mixes for the one with the lowest expected cost. Most useful models combine the two.

What is a solver in optimization?

A solver is the software algorithm that searches for the best values of the decision variables. You supply the model, meaning the variables, the objective, and the constraints, and the solver returns the best values it can find or reports that no values satisfy the constraints. Different solvers specialize in different problem types, such as simplex-based solvers for linear programs and branch-and-bound solvers for integer problems.

Linear vs nonlinear optimization: how do I tell?

A problem is linear when the objective and every constraint are linear combinations of decision variables, each times a constant, so doubling a variable doubles its effect. If any term squares a variable, multiplies two variables, or applies a curve such as a logarithm or an efficiency table, the problem is nonlinear. Nonlinear problems can have several local optima, so the answer can depend on the starting point.

Can Excel Solver handle large problems?

Frontline Systems, the company behind the add-in, states that the standard Excel Solver limits a model to 200 decision variables. The utility example has three, but an hourly version needs three for each of 8,760 hours, which makes 26,280 decision variables. Models of that size need a dedicated solver engine, and Lumina’s comparison of optimization and solver software reviews the options. The Beyond the spreadsheet page covers models that outgrow a spreadsheet.

How do you optimize when inputs are uncertain?

Describe each uncertain input with a probability distribution, then choose the decisions that minimize the expected cost or maximize the expected value across the possible outcomes. That approach is stochastic optimization. Where a bad outcome would cost too much, robust optimization instead chooses the decision that performs acceptably in the worst of a defined set of scenarios. Sensitivity analysis first shows which uncertain inputs deserve the effort.