Real-world examples of diverse examples of linear programming

When people first meet linear programming, they usually see toy problems about maximizing profit or minimizing cost. That’s fine for learning the mechanics, but it barely scratches the surface. In practice, the best examples of diverse examples of linear programming show up everywhere: from airline schedules to vaccine distribution to TikTok’s ad auctions. This guide walks through real examples that feel like the world you actually live in, not a 1970s textbook. We’ll look at examples of linear programming in supply chains, energy grids, workforce planning, public health, and even sports analytics. Along the way, you’ll see how to recognize an example of a linear programming problem in the wild: a decision to make, a single number to optimize, and a set of linear constraints that can’t be ignored. If you’re trying to move beyond formulas and into real examples, this is the right place to start.
Written by
Jamie
Published
Updated

Starting with real examples of linear programming

Instead of definitions, let’s start with what people actually do with linear programming today. Modern optimization software can handle millions of variables, so real examples include problems that are far bigger and messier than a classroom worksheet.

Across industries, the best examples of diverse examples of linear programming share three ingredients:

  • A clear objective: maximize profit, minimize cost, reduce delay, cut emissions, or some weighted mix of these.
  • Decisions that can be expressed as numbers: how many units to produce, how many workers to schedule, how much power to generate.
  • Constraints that are linear: capacity limits, budget caps, time windows, policy rules, and physical limits.

With that in mind, let’s walk through several concrete, data-driven examples of diverse examples of linear programming from 2024–2025.


Supply chain planning: classic, but now with AI-scale data

The most familiar example of linear programming is still supply chain planning, but the 2025 version looks very different from the chalkboard era.

Imagine a global retailer deciding how many units of each product to ship from multiple warehouses to hundreds of stores. The company wants to minimize total logistics cost while meeting demand and respecting capacity limits.

Decision variables might represent how many pallets of each product go from each warehouse to each store. The objective is to minimize total shipping cost, including fuel, labor, and handling fees. Constraints include:

  • Warehouse capacity in square feet or pallet positions
  • Truck weight and volume limits
  • Store demand forecasts by day or week
  • Service-level requirements (for example, at least 95% of demand must be fulfilled on time)

This is a textbook example of a transportation problem, a special case of linear programming. In practice, companies now layer in data from real-time tracking, demand forecasting models, and even weather feeds. The linear program still sits at the core, but it’s fed by far richer data than before.

If you want to see the theory side, MIT’s OpenCourseWare provides accessible material on transportation and assignment problems in linear programming: MIT OCW – Linear Programming.


Energy grid optimization: dispatching power in real time

A more modern example of diverse examples of linear programming comes from power systems. Grid operators in the United States and Europe use linear (and mixed-integer) programming every day to decide which power plants should run and at what levels.

This is often called economic dispatch or unit commitment. The objective is to minimize the cost of meeting electricity demand across a region while staying within:

  • Generation capacity limits for each plant
  • Transmission line limits (megawatts on each line)
  • Reserve requirements for reliability
  • Environmental or policy constraints, such as emissions caps

Each plant’s power output is a decision variable. The constraints and objective are linearized so they can be solved quickly—often every 5–15 minutes.

With the growth of wind and solar, this has become one of the best examples of linear programming interacting with climate policy and renewables. The U.S. Department of Energy has several reports describing how optimization models support grid operations and planning: energy.gov.


Airline crew scheduling: people, unions, and time zones

If you’ve ever wondered how airlines decide which crew flies which route, you’ve stumbled onto another rich example of a linear programming problem.

Here, decision variables represent whether a particular pilot or flight attendant is assigned to a specific flight or sequence of flights. The objective might be to minimize total crew cost or the number of crews that need to be positioned or housed overnight.

Constraints include:

  • Legal limits on duty time and rest periods
  • Union contract rules (maximum daily hours, minimum days off)
  • Qualification constraints (only certain pilots can fly certain aircraft types)
  • Coverage constraints (every flight must have a full crew)

This is a classic set covering and set partitioning formulation, often modeled as a large-scale mixed-integer linear program. It’s one of the best examples of diverse examples of linear programming where human factors and regulations dominate the model.


Public health logistics: vaccine and test-kit distribution

Since COVID-19, public health agencies have leaned heavily on optimization models. Vaccine and test-kit distribution offers a particularly timely example of diverse examples of linear programming.

Suppose a state health department needs to ship vaccine doses from a central depot to regional clinics. The objective might be to minimize total shipping time or cost while ensuring that:

  • Every region receives at least a minimum number of doses
  • No clinic exceeds its storage capacity (for example, refrigerator volume in cubic feet)
  • Cold-chain requirements are respected (limited time out of refrigeration)
  • Equity constraints are met, such as a minimum share of doses allocated to high-risk or underserved counties

Decision variables represent the number of doses sent from each depot to each clinic in each time period. Constraints and objectives are linear, which makes this an excellent example of a linear programming model supporting real policy choices.

For context on how optimization supports public health logistics, the CDC’s guidance on vaccine planning and distribution is a good starting point: cdc.gov.


Workforce scheduling: hospitals, call centers, and warehouses

Hospitals, call centers, and e‑commerce warehouses all face the same basic challenge: how many people should work each shift to meet demand without overspending?

Consider a hospital emergency department. Managers want enough nurses per shift to keep wait times low and patient safety high, but overtime and agency nurses are expensive.

A linear programming model might:

  • Use decision variables for the number of nurses assigned to each shift and unit
  • Minimize total staffing cost, including overtime and differential pay for nights and weekends
  • Enforce constraints for minimum staffing levels by skill (RN, LPN, nurse practitioner)
  • Respect labor rules, such as maximum weekly hours and minimum rest between shifts

This is one of the best examples of diverse examples of linear programming where the objective is not purely financial. Sometimes the model uses a weighted objective that combines cost with service quality metrics, such as average wait time or patient-to-nurse ratios.

For healthcare operations research and examples of linear programming in hospitals, see resources from the Agency for Healthcare Research and Quality (AHRQ): ahrq.gov.


Sports analytics: roster construction under a salary cap

Sports teams and fantasy leagues offer a more playful example of diverse examples of linear programming, but the math is very real.

Think about building an NBA roster under a salary cap. Decision variables represent how many minutes each player will be used or whether a player is on the roster at all. The objective can be to maximize an expected performance metric, such as wins above replacement (WAR in baseball, similar advanced stats in basketball or football), subject to:

  • Total salary cap constraints
  • Position requirements (a minimum number of guards, forwards, etc.)
  • Playing time limits (no player can exceed a realistic minute load)
  • Roster size limits

Daily fantasy sports platforms and analytics departments both rely on mixed-integer linear programming to explore lineups and trade scenarios quickly. This kind of problem is an accessible example of linear programming that students can experiment with using public stats.


Online advertising and bidding: optimization at internet scale

If you’ve ever seen a targeted ad online, there’s a decent chance an optimization model helped decide which ad to show and how much to bid.

Ad platforms often use linear programming or related optimization models to:

  • Allocate ad impressions across multiple campaigns
  • Respect daily or hourly budget limits
  • Meet targeting constraints (demographics, geography, interests)
  • Maximize expected clicks, conversions, or revenue

Decision variables represent how many impressions or what share of traffic each campaign receives. Constraints keep each advertiser within its budget while ensuring that inventory (page views or video views) is not oversold.

This is one of the best examples of diverse examples of linear programming at scale: millions of variables, tight time limits, and constant re-optimization as bids and user behavior change.


When is a problem a good example of linear programming?

After seeing several examples of diverse examples of linear programming, a natural question is: how do you know when a problem fits this framework?

Good candidates share a few traits:

  • The objective can be written as a sum of terms, each term being a coefficient times a decision variable.
  • Constraints look like straight-line inequalities or equalities: no products of variables, no exponents, no probabilities multiplying decisions.
  • Decisions are about quantities: how much, how many, how long.

Real examples include planning problems (how to allocate resources over time), assignment problems (who or what goes where), and blending problems (how to mix ingredients or components).

When a model needs yes/no decisions (open a facility or not, assign a worker or not), it becomes a mixed-integer linear program. The structure is the same, but some variables must be integers. Many of the best examples of diverse examples of linear programming in industry are actually mixed-integer versions of these problems.


Why linear programming still matters in 2025

In an era obsessed with machine learning, it’s easy to assume that linear programming is old news. The reality is almost the opposite. Many 2024–2025 AI systems make predictions, but they still need optimization models to turn predictions into decisions.

A demand forecasting model might predict how many units you’ll sell next week. A linear program then decides how much to produce and where to ship it. A reinforcement learning model might suggest a policy, but a linear program checks whether that policy respects capacity, budget, and regulatory constraints.

That’s why learning from real examples of diverse examples of linear programming is still worth your time. The math gives you a disciplined way to answer the question: Given what I know, what should I do?


FAQ: examples and practice

Q: What are some simple classroom examples of linear programming I can start with?
Classic examples include diet problems (choosing foods to meet nutrition targets at minimum cost), product-mix problems (deciding how many units of each product to make), and transportation problems (shipping goods from factories to warehouses). These smaller models mirror the larger, real examples discussed above.

Q: Can you give an example of linear programming in healthcare specifically?
Yes. Hospital bed allocation is a strong example of linear programming in healthcare. Decision variables represent how many beds are assigned to each department (ICU, surgery, general medicine). The hospital minimizes overflow or patient transfers subject to capacity limits, staffing levels, and predicted demand, often informed by data from sources like the NIH and CDC.

Q: Are all optimization problems examples of linear programming?
Not at all. Many problems are nonlinear (for example, involving squared terms, probabilities, or complex physics) or stochastic (where uncertainty is modeled explicitly). Linear programming is a subset of optimization, but it remains popular because it is relatively fast to solve and often accurate enough when the system can be approximated with linear relationships.

Q: Where can I learn to build my own examples of diverse examples of linear programming?
University courses in operations research or optimization are a good starting point; many are freely available online through platforms like MIT OpenCourseWare. For applied work, look for tutorials that use open-source solvers such as CBC, GLPK, or commercial tools like Gurobi and CPLEX. Building your own models around the examples include supply chains, workforce scheduling, and health logistics will make the concepts stick.

Q: How big can real examples of linear programming get?
Very big. Industrial models routinely include hundreds of thousands or millions of variables and constraints. Modern solvers can handle these scales, especially when the model has a clear structure, like the grid, airline, or supply chain examples described earlier.


If you’re learning linear programming, don’t stop at toy problems. Study these examples of diverse examples of linear programming, then try to model a decision from your own world—your work schedule, a side business, or even your fantasy sports roster. That’s where the math stops being abstract and starts paying rent in your daily life.

Explore More Mathematical Modeling Techniques

Discover more examples and insights in this category.

View All Mathematical Modeling Techniques