Lecture C - Linear Programming Unit 3
Lecture C - Linear Programming Unit 3
Lecture C - Linear Programming Unit 3
UNIT 3
Linear Programming - Introduction
Maximize ∑jn=1 cj xj
Subject to: ∑jn=1 aij xj ≤ bi for all 1 ≤ i ≤m (1)
z = 50x1 + 200x 2.
x1 + 4x2 ≤ 21.
The demand constraints have to be satisfied
4
x2 ≤ (x1 + x2)
10
x1 ≤ 15
x1 ≥ 0, x 2 ≥ 0.
The model: To maximize the sell revenue, determine the solutions of
the following linear programme x1 and x 2:
subject to
x1 + 4x2 ≤ 21
−4x1 + 6x2 ≤ 0
x1 ≤ 15
x 1, x2 ≥ 0
Example 2: Scheduling
• m = 3 machines
• n = 8 tasks
• Each task lasts x units of
time
Example:
x1 + x2 = 200 (2)
We get:
x1 = 122
x2 = 78
Objective = 66100.
Optimal Solutions:
Different Cases
• Algebraical methods:
exponential time.
But Integer Programming
(IP) is different!
• Feasible region: a set of
discrete points.
• Corner point solution not
assured.
• No "efficient" way to solve
an IP.
• Solving it as an LP provides
a relaxation and a bound on
the solution.
Linear programming example 1
A company is involved in the production of two items (X and Y). The resources
need to produce X and Y are twofold, namely machine time for automatic
processing and craftsman time for hand finishing. The table below gives the
number of minutes required for each item:
The company has 40 hours of machine time available in the next working week
but only 35 hours of craftsman time. Machine time is costed at rupees10 per
hour worked and craftsman time is costed at rupees 2 per hour worked. Both
machine and craftsman idle times incur no costs. The revenue received for each
item produced (all production is sold) is rupees 20 for X and rupees 30 for Y.
The company has a specific contract to produce 10 items of X per week for a
particular customer.
Solution
Let
maximise
subject to:
i.e. maximise
17.1667x + 25.8667y
subject to:
It is plain from the diagram below that the maximum occurs at the intersection
of x=10 and 20x + 29y <= 2100
Solving simultaneously, rather than by reading values off the graph, we have
that x=10 and y=65.52 with the value of the objective function being rupees
1866.5
Linear programming example 2
A company manufactures two products (A and B) and the profit per unit sold is
rupees 3 and rupees 5 respectively. Each product has to be assembled on a
particular machine, each unit of product A taking 12 minutes of assembly time
and each unit of product B 25 minutes of assembly time. The company
estimates that the machine used for assembly has an effective working week of
only 30 hours (due to maintenance/breakdown).
Technological constraints mean that for every five units of product A produced
at least two units of product B must be produced.
Solution
Let
xB >= 2(xA/5)
Solving simultaneously, rather than by reading values off the graph, we have
that:
Doubling the assembly time available means that the assembly time constraint
(currently 12xA + 25xB <= 1800) becomes 12xA + 25xB <= 2(1800) This new
constraint will be parallel to the existing assembly time constraint so that the
new optimal solution will lie at the intersection of 12x A + 25xB = 3600 and xB -
0.4xA = 0
This is because if we pay more than this amount then we will reduce our
maximum profit below the rupees 408.9 we would have made without the
new machine.
minimise
4a + 5b + 6c
subject to
a + b >= 11
a - b <= 5
c-a-b=0
7a >= 35 - 12b
Solution
To solve this LP we use the equation c-a-b=0 to put c=a+b (>= 0 as a >= 0 and
b >= 0) and so the LP is reduced to
minimise
subject to
a + b >= 11
a - b <= 5
7a + 12b >= 35
a >= 0 b >= 0
From the diagram below the minimum occurs at the intersection of a - b = 5 and
a + b = 11
subject to
x1 + x2 <= 10
x1 - x2 >= 3
x1 >= 0
x2 >= 0
Solution
It is plain from the diagram below that the maximum occurs at the intersection
of
x1 - x2 = 3
Solving simultaneously, rather than by reading values off the graph, we have
that
i.e. 15 + 9x2 = 35
x1 = 3 + x2 = (47/9) = 5.222
Solution
Variables
Let
customer demand
xC >= 3xT
storage space
(xC/4) + xT <= 4
Objective
The graphical representation of the problem is given below and from that we
have that the solution lies at the intersection of