Optimization · Decision science · Algorithms
Every complex decision has a pattern.
Discover the mathematical models, optimization algorithms, and computational techniques behind real-world decisions. Learn the theory, understand the trade-offs, and implement solutions that work.
Pattern: the newsvendor
Order where the expected cost bottoms out
A shortage costs $12, a leftover $4, so and you stock above the mean.
Pattern library
The structures behind the decisions
A pattern is a decision structure that recurs across industries, with a known way to model it and a known way to get it wrong. Each one is written for practitioners: the formulation, the intuition, working Python, and the mistakes worth avoiding.
Critical ratio
The ratio of what a shortage costs to the total cost of both mistakes. It tells you which percentile of demand to stock to, and it is why the right service level differs from SKU to SKU.
Newsvendor model
Choose one order quantity before uncertain demand is known, when every unit short and every unit left over has a cost. The answer is a quantile of demand, set by the ratio of the two costs.
Dynamic programming
Solve a problem by solving each of its overlapping subproblems once and building the answer from them. The same idea, written as the Bellman equation, is the foundation of sequential decision-making.
Linearization techniques
Rewrite products, logic, absolute values, maxima, and piecewise costs as linear constraints with auxiliary variables, so a mixed-integer linear solver can handle them exactly.
Big-M Method
Turn an "if this binary is on, then this constraint applies" rule into a linear constraint MILP solvers can handle directly.
Facility location
Decide which facilities to open, and which customers each open facility should serve, to minimize fixed and transportation cost together.
Interactive playground
Change the inputs. Watch the decision move.
Intuition for optimization comes from seeing how the answer responds. Every tool shows its equations, states its assumptions, and runs entirely in your browser.
Critical Ratio Explorer
Set the cost of too much and too little, pick a demand distribution, and watch the optimal order quantity move.
Inventory Policy Simulator
Simulate (s, Q) and (R, S) policies against stochastic demand and lead times.
MOQ Optimization Explorer
See when a vendor minimum is worth accepting and when to skip the order.
MILP Formulation Explorer
Build a small model, toggle constraints, and see the LP relaxation and integer optimum.
Simulation Optimization Lab
Search a noisy objective and see how sampling error changes the answer.
Scheduling Playground
Drag jobs onto machines and compare against a solver on makespan and lateness.
Learn
Reference material that earns its place on your wall
Diagrams for choosing a method, classifying a problem, and deciding whether linear or integer programming fits, plus a paper on treating MILP as a policy rather than a plan.
How much to order: critical ratios, EOQ, and why weeks of cover is the wrong question
Two SKUs with the same forecast should not get the same order. A visual guide to the economics of stock: probabilistic forecasts, the critical ratio, economic order quantity, and why a planning horizon is not a number of weeks of cover.
Optimization methods decision flowchart
Pick a method from your problem's structure, with the software that implements each one.
Optimization classification hierarchy
Objectives, constraints, function forms, variable types, and uncertainty, in one map.
Rethinking MILP as a policy
A 30-page paper on embedding MILP in sequential decision analytics.
Who writes this
Adam DeJans Jr.
Operations research scientist. More than a decade designing optimization and simulation systems that run in production, for supply chain, logistics, production planning, and allocation. Author of four books on optimization and decision-making.