Naming Your Variables: Tuck-Shop Example
A school tuck-shop sells chapatis and mandazis.
- Let
= chapatis prepared per day - Let
= mandazis prepared per day
Prices and profit rates are data — not variables.
Constraints: Rules That Limit Variables
Constraints are real-world limits written as inequalities.
- At most 50 items per day:
- At least 10 chapatis:
- Non-negativity:
,
Every constraint involves the decision variables.
Worked Example: Finding All Constraints
Tuck-shop scenario:
- Total items ≤ 50 per day
- Chapatis ≥ 10, mandazis ≥ 5
- Ingredient budget ≤ 15,000 shillings
Constraints:
Quick Check: Variables in a New Problem
A transport company runs two routes — Route A and Route B.
What are the decision variables?
What does the company control? Not fares, not fuel costs.
The Objective Function: Expressing Your Goal
The objective function expresses the quantity you want to optimize.
- It is written as an equation involving the decision variables
- It always has a direction: maximize or minimize
where
Should You Maximize or Minimize?
- Maximize: profit, revenue, output, satisfaction
- Minimize: cost, time, distance, waste, risk
Worked Example: Writing the Objective
Tuck-shop objective: Each chapati earns 500 shillings profit; each mandazi earns 400 shillings.
The owner wants to maximize total daily profit
The coefficient of each variable comes from the data in the problem.
Your Turn: Model the Transport Company
Route A: 8,000 shs/trip. Route B: 5,000 shs/trip.
Limits: total trips ≤ 12; Route A ≤ 8; Route B ≥ 2.
Write a complete model:
- Decision variables
- Two constraints as inequalities
- Objective function with direction
Try first, then advance for the answer.
Check Your Answers: Transport Company Model
Let
Constraints:
Objective:
The Standard Model Statement Format
Every linear programming model uses this structure:
Let
Constraints:
List each inequality, one per line
Objective:
Maximize/Minimize
This format is what you will always present in exams and assignments.
Practice: Build Three Quick Models
Name variables, write 2 constraints, state objective direction.
-
Bakery: bread and cakes. Max revenue. Oven ≤ 8 hrs; flour ≤ 20 kg.
-
School: chairs and desks. Min cost. Budget ≤ 500,000 UGX; chairs ≥ 20.
-
Clinic: nurses and doctors. Min wages. Staff ≥ 4; doctors ≥ 1.
Check Your Practice Model Answers
-
= bread, = cakes; oven and flour limits; Maximize revenue -
= chairs, = desks; budget, chairs ≥ 20; Minimize cost -
= nurses, = doctors; staff ≥ 4, doctors ≥ 1; Minimize wages
Always include
Key Takeaways From Today's Lesson
✓ LP finds the best decision within given limits
✓ Decision variables = what you choose, not given data
✓ Constraints = limits as inequalities (
✓ Objective = equation + direction (Maximize or Minimize)
Variables are choices — not prices; maximize profit, minimize cost
Next Lesson: The Feasible Region
In Lesson 2, we will:
- Graph the constraints on a coordinate plane
- Shade the region that satisfies all constraints at once
- Identify this as the feasible region — where all valid solutions live
Today's model statements become tomorrow's graphs.