Optimization and Linear Programming Cheat Sheet
Optimization and Linear Programming (LP) are powerful mathematical tools for allocating limited resources to achieve a specific objective, whether maximizing profit or minimizing cost. This cheat sheet covers the fundamental elements, assumptions, formulation, and interpretation of LP models, along with related concepts like integer programming, decision analysis, and queueing theory.
Core Principles
- Mathematical programming uses optimization to allocate limited resources to best meet an objective.
- Decision variables represent controllable choices.
- The objective function quantifies what is to be maximized or minimized.
- Constraints enforce physical, logical, or economic limits.
- A solution is feasible only if it satisfies all constraints simultaneously.
- Linear Programming (LP) requires the objective and all constraints to be linear functions.
- Key LP assumptions include additivity, divisibility, deterministic coefficients, and proportionality.
- Optimization models can be infeasible (no solution) or unbounded (infinite solution).
- Decision analysis helps make optimal choices under uncertainty using tools like decision trees and expected value.
- Queueing theory analyzes waiting lines to balance service costs with customer waiting costs.
Action Steps
- Comprehend the problem: Understand the narrative, resources, decisions, and goals.
- Define decision variables: Identify and represent the controllable unknowns.
- Construct the objective function: Formulate the goal (max/min) using per-unit coefficients.
- Write constraints: Convert resource limits and requirements into linear inequalities/equalities.
- Enforce non-negativity: Ensure variables are greater than or equal to zero.
- Check feasibility: Verify that a proposed solution satisfies all constraints.
- Evaluate the objective: Calculate the objective function value for feasible solutions.
- Identify corner points: Solve systems of binding constraint equations.
- Compare corner point values: Determine the optimal solution by evaluating the objective at each corner.
- Specify probability distributions for uncertain inputs in simulation.
- Generate random numbers and map them to input distributions.
- Replicate the model many times to observe output behavior.
- Analyze simulation results to understand risk and potential outcomes.
- Define arrival and service processes using Kendall notation (e.g., M/M/1).
- Calculate key queueing measures like utilization, average queue length, and waiting time.
- Determine the optimal number of servers by minimizing total cost (staffing + waiting).
Formulas
- $E = mc^2$
- $a^2 + b^2 = c^2$
- $ \text{Expected Value} (EV) = \sum_{i=1}^{n} ( \text{Payoff}_i \times \text{Probability}_i ) $
- $ \text{EVPI} = \text{EV with Perfect Information} - \text{EV without Perfect Information} $
- $ \text{MAD} = \frac{1}{n} \sum_{i=1}^{n} |e_i| $
- $ \text{MAPE} = \frac{100\%}{n} \sum_{i=1}^{n} \left| \frac{e_i}{y_i} \right| $
- $ \text{MSE} = \frac{1}{n} \sum_{i=1}^{n} e_i^2 $
- $ \text{RMSE} = \sqrt{\text{MSE}} $
- $ \text{Flow Time} = \text{Waiting Time} + \text{Service Time} $
- $ \rho = \frac{\lambda}{\mu} \text{ (for M/M/1)} $
- $ L_q = \frac{\lambda^2}{\mu(\mu - \lambda)} \text{ (for M/M/1)} $
- $ L = L_q + \frac{\lambda}{\mu} \text{ (for M/M/1)} $
- $ W_q = \frac{L_q}{\lambda} \text{ (for M/M/1)} $
- $ W = W_q + \frac{1}{\mu} \text{ (for M/M/1)} $
- $ \text{Stability Condition: } \rho < 1 $
Key Terms
- Decision Variables: Controllable choices in an optimization model that determine outcomes.
- Objective Function: A mathematical expression quantifying the goal to be maximized or minimized.
- Constraints: Limitations or restrictions that must be satisfied by a solution.
- Feasible Solution: A solution that satisfies all constraints simultaneously.
- Optimal Solution: The feasible solution that yields the best objective function value.
- Linearity: Requirement that variables appear only to the first power, with constant coefficients, and without products or nonlinear functions.
- LP Relaxation: Solving an Integer Programming problem as if all variables were continuous.
- EVPI (Expected Value of Perfect Information): The maximum amount one should rationally pay for perfect information about the states of nature.
- Posterior Probability: Updated probability of a state of nature after considering new evidence or sample information.
- Time Series: A sequence of quantitative data points collected over time.
- Utilization (ρ): The fraction of time a server or system is busy, calculated as arrival rate divided by total service rate.
- Stability Condition: The condition (usually ρ < 1) required for a queueing system to have finite average queue lengths and waiting times.
Pro Tips
- Always check for linearity before applying LP techniques.
- Graphical methods are intuitive but limited to two decision variables.
- Infeasibility often indicates a modeling error or impossible requirements.
- Unboundedness usually means a constraint is missing or incorrectly formulated.
- Rounding LP solutions for integer problems can lead to suboptimal or infeasible results.
- Use binary variables to model logical conditions like 'if-then' or 'either-or'.
- Transportation and assignment problems are special cases of LP.
- For multi-period problems, carefully define inventory flow and boundary conditions.
- Decision quality is about the process, not just the outcome.
- EVPI quantifies the maximum rational price for perfect information.
- Posterior probabilities are crucial for decision-making with new information.
- Choose forecasting models based on forecast accuracy metrics relevant to your needs.
- Simulation is powerful for complex problems where analytical solutions are difficult.
- Queueing theory helps optimize service systems by balancing costs.
- Avoid designing systems with utilization close to 100%; stability issues arise quickly.
Pitfalls to Avoid
- Assuming linearity when functions are nonlinear.
- Ignoring non-negativity constraints.
- Confusing feasible solutions with optimal solutions.
- Incorrectly interpreting binding vs. nonbinding constraints.
- Rounding LP solutions without checking feasibility or optimality.
- Overly complex models that are hard to interpret or solve.
- Failing to account for all relevant costs (e.g., carrying costs, waiting costs).
- Misinterpreting decision quality based solely on outcomes.
- Paying more for information than its expected value (EVPI).
- Using prior probabilities when posterior probabilities are available.
- Selecting forecasting models based on visual fit alone, ignoring error metrics.
- Overfitting regression models to historical data.
- Assuming independence of random variables in simulation without justification.
- Designing for high utilization in queueing systems, leading to excessive wait times.
- Ignoring the stability condition ($
ho < 1$) in queueing models.
Myth vs Reality
- A good decision guarantees a good outcome.: A good decision is one made with the best available information and process; outcomes are subject to chance and can still be poor.
- If an LP solution is unbounded, the problem is unsolvable.: Unboundedness means the objective can be improved indefinitely; it often signals a missing constraint or formulation error, not impossibility.
- Rounding an LP solution provides the optimal integer solution.: Rounding can lead to infeasible or suboptimal integer solutions; specialized IP methods are needed.
- The best forecasting model is always the most complex one.: Simpler models that fit the data well and have good accuracy metrics are often preferable to avoid overfitting.
- High utilization in a queueing system is always desirable for efficiency.: High utilization significantly increases waiting times and can lead to system instability; a balance with total cost is needed.
Real World Examples
- A manufacturing company deciding how many units of different products to produce.: LP model to maximize profit given limited machine hours, labor, and raw materials.
- An investment portfolio manager allocating funds among various assets.: Optimization model to maximize expected return while meeting risk tolerance and liquidity constraints.
- A logistics company determining the cheapest way to ship goods from factories to warehouses.: Transportation model to minimize total shipping costs.
- A hospital scheduling nurses to cover shifts throughout the week.: Integer programming or workforce scheduling model to meet staffing requirements at minimum cost.
- A farmer deciding whether to plant a new crop based on uncertain weather and market prices.: Decision analysis using a decision tree to evaluate expected payoffs under different states of nature.
- A fast-food restaurant designing its counter service system.: Queueing theory to determine the optimal number of cashiers to balance service speed and staffing costs.
- A company planning production over the next six months with fluctuating demand and inventory costs.: Multi-period production planning model to minimize total production and inventory costs.
Timeline
- Early 20th Century: Foundations of Operations Research and mathematical programming laid.
- 1947: George Dantzig develops the Simplex method for solving Linear Programming problems.
- 1950s: Development of Integer Programming and Non-linear Programming techniques.
- 1950s-1960s: Growth in applications of optimization in military, business, and industry.
- 1970s-1980s: Interior-point methods emerge as an alternative to the Simplex method.
- 1990s-Present: Widespread adoption of optimization software; advancements in large-scale, stochastic, and robust optimization.
People
- George Dantzig: Developed the Simplex algorithm, a cornerstone of Linear Programming.
- John von Neumann: Pioneered game theory and contributed to early optimization concepts.
- Abraham Charnes: Co-developed Goal Programming and contributed to LP theory.
- William Cooper: Co-developed Goal Programming and LP applications.
- Richard Bellman: Developed Dynamic Programming, a related optimization technique.
More like this