Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 26

Linear programming (LP)- Transportation and Assignment problems

1 Transportation Example Solver


2 Construction Projects Solver
3 New Hire Assignments Assignment Problems
4 MLB Umpire Assignment Assignment Problems
5 College Professors
6 Transportation and Assignment Problems Assignment Problems
sumif Alternative Excel Template Transportation
sumif Transportation
Solver
Solver

Transportation
Symbol Operation
+ (plus sign) Addition
- (minus sign) Subtraction
* (asterisk) Multiplication
/ (forward slash) Division
% (percent sign) Percent (divide by 100)
^ (caret) Exponentiation

Parts of a LP Problem
There are three main parts of a linear programming problem:

The objective function: The quantity to be maximized or minimized (for example, profit or cost).

The constraints: The restrictions on the resources needed for the objective (for example, budgets or time limits).

The decision variables: The unknowns that the manager has control over to bring about the objective (for example, number o

The objective function and the constraints can be expressed mathematically in terms of the decision variables. For a linear prog

Example
For example, consider the following scenario.

A tailor has 14 square meters of wool and 12 square meters of silk in his shop. He wants to use this fabric to make formal trous

Identifying the Parts of the Problem


In this problem,

The objective function is the total revenue, which the tailor wants to maximize.

The constraints come from the amount of material available: he can use no more than 14 square meters of wool and 12 square

The decision variables are the number of pairs of trousers and the number of jackets that he will make.

Formulating the Problem Mathematically


Let 𝑡t represent the number of pairs of trousers and let 𝑗j represent the number of pairs of jackets.

First, let’s translate the objective into a mathematical expression.


Each pair of trousers generates $175 revenue and each jacket generates $295. Thus the objective function (total revenue) can be

Next, let’s write the constraints as inequalities.

The first constraint is that the amount of wool used can be no more than 14 square meters.

Each pair of trousers requires 2.25 square meters of wool and each jacket requires 3.75 square meters of wool. The total amoun

The other constraint is that the amount of silk used can be no more than 12 square meters.

Each pair of trousers requires 2 square meters of silk and each jacket requires 3.25 square meters of silk. Thus, this constraint c

The complete problem can now be expressed mathematically as:

Maximize revenue = 175𝑡+295𝑗175t+295j

subject to the constraints

2.25𝑡+3.75𝑗≤142𝑡+3.25𝑗≤122.25t+3.75j2t+3.25j≤14≤12 ​ ​

Note that there are two additional implied constraints: 𝑡≥0t≥0 and 𝑗≥0j≥0. It does not make sense to make a negative number

Now that you know how to identify the parts of a linear programming problem, it’s time to start solving them in Excel. Go on t

Adding Solver to Excel


To solve linear programming problems with Excel in the rest of this course, we will use an add-in program called Solver. Solver is available when you install Excel or Micr
Excel.

Please visit this page to find up-to-date instructions for how to load the Solver add-in in Excel: Load the Solver Add-in i

After you add Solver successfully, you should see the Solver button on the Data tab in Excel.

Now, you will be ready to move onto our first linear programming example: go to the next reading in the course to begin.
ts or time limits).

ective (for example, number of units to produce or number of hours to schedule).

on variables. For a linear programming problem, they must be expressed as linear equations or inequalities. This means that no variable ca

is fabric to make formal trousers and jackets to get the highest possible revenue. A pair of trousers sells for $175 and requires 2.25 square m

meters of wool and 12 square meters of silk.


function (total revenue) can be written as the linear expression 175𝑡+295𝑗175t+295j.

ters of wool. The total amount of wool used is then 2.25𝑡+3.75𝑗2.25t+3.75j. Since the tailor can use at most 14 square meters of wool,

of silk. Thus, this constraint can be expressed as the linear inequality 2𝑡+3.25𝑗≤122t+3.25j≤12.

nse to make a negative number of trousers or jackets.

olving them in Excel. Go on to the next reading to make sure that you have the necessary set-up in Excel.

Excel
available when you install Excel or Microsoft Office, but to use it you need to load it in

Excel: Load the Solver Add-in in Excel (Microsoft Support)

on the Data tab in Excel.

the next reading in the course to begin.


This means that no variable can be squared, cubed, or raised to any higher power.

175 and requires 2.25 square meters of wool and 2 square meters of silk to make. A jacket sells for $295 and requires 3.75 square meters of
most 14 square meters of wool, this constraint is expressed as the linear inequality 2.25𝑡+3.75𝑗≤142.25t+3.75j≤14.
requires 3.75 square meters of wool and 3.25 square meters of silk.
3.75j≤14.
Transportation Example it tries to find the best which could be money, time or distance way to distribute goods from sources
Factories in Des Moines, Evanston and Fort Lauderdale. These are all cities in the US. Stores are in Al
you are in charge of shipping, okay so minimise the cost of T/P

Data table Shiping cost


F/S A B C Output
D 5 4 3 100
E 8 4 3 300
F 9 7 5 300
Demand 300 200 200

Shipment table Shiping cost


F/S A B C Output
D 100 0 0 100
E 0 200 100 300
F 200 0 100 300
Demand 300 200 200
=SUM(C17:C19)=SUM(D17:D19) =SUM(E17:E19)

Objective -min cost Shiping cost *Shipments


3900 =SUMPRODUCT(C8:E10,C17:E19)
istribute goods from sources called factories to multiple destinations.
ties in the US. Stores are in Albany, Boston and Cleveland purposely picking these.

=SUM(C17:E17)
=SUM(C18:E18)
=SUM(C19:E19)
Factories Stores unitcost Shipments
D A 5 100
D B 4 0
D C 3 0
E A 8 0
E B 4 200
E C 3 100
F A 9 200
F B 7 0
F C 5 100

Supply const
Supply Outflow Sign Capacity
D 100 <= 100
E 300 <= 300
F 300 <= 300

Demand Const
Store Inflow Sign Demand
A 300 >= 300
B 200 >= 200
C 200 >= 200

Objective
Shipping cost 3900
The Osbourne Concrete Company has plants in three locations and is currently working on three major construction projects,
each located at a different site. The shipping cost per truckload of concrete, daily plant capacities, and daily project
requirements are provided in the table below.
Determine the least-cost way for Osbourne Concrete to meet their requirements.
Enter numbers only for the questions below. Entering units may cause an error.

Project A Project B Project C Capacity


Plant 1 10 4 9 80
Plant 2 12 6 8 40
Plant 3 8 9 5 30
Requirements 50 40 60

Project A Project B Project C Capacity


Plant 1 40 40 0 80
Plant 2 0 0 40 40
Plant 3 10 0 20 30
Requirements 50 40 60

Objective -min cost 1060


ee major construction projects,
ties, and daily project
A company has three new hires: Jones, Smith, and Wilson. They can be sent to any one of four offices: in Omaha, Dallas, New
Miami. Only one candidate can be sent to each office. The cost to relocate each candidate to each of the offices is shown in th
below.

Cost
Omaha Miami Dallas New York Suply
Jones 800 1,100 1,200 1,000
Smith 500 1,600 1,300 800
Wilson 500 1,000 2,300 1,500
Demand

Assigement table
Omaha Miami Dallas New York total sign candidate
Jones 0 1 0 0 1= 1
Smith 0 0 0 1 1= 1
Wilson 1 0 0 0 1= 1
Demand 1 1 0 1
<= <= <= <=
1 1 1 1

Total cost 2400


r offices: in Omaha, Dallas, New York, or
each of the offices is shown in the table
Crews of Major League Baseball (MLB) umpires are currently in the cities of Seattle, Arlington, Oakland, and Baltimore. The cre
get sent to games that are soon beginning in Kansas City, Chicago, Detroit, and Toronto. Estimated travel distances (in miles) b
cities are shown in the table below.

Due to a union requirement, the MLB is not allowed to send any crew from Oakland to Toronto.

Assign one umpire crew to each city (only one per city) to minimize the total distance traveled.

Kansas CityChicago Detroit Toronto


Seattle 1500 1730 1940 2070
Arlington 460 810 1020 1270
Oakland 1500 1850 2080 X
Baltimore 960 610 400 330

Kansas CityChicago Detroit Toronto total sign candidate


Seattle 0 0 1 0 1= 1
Arlington 0 1 0 0 1= 1
Oakland 1 0 0 0 1= 1
Baltimore 0 0 0 1 1= 1
1 1 1 1
<= <= <= <=
1 1 1 1

4580
Oakland, and Baltimore. The crews need to
ated travel distances (in miles) between the

o.
Richard Whiteless, chairman of a college’s business department, has decided to apply a new method in assigning professors to courses
judging who should teach each course, Professor Whiteless reviews the past two years’ teaching evaluations (which were filled out by st
professors taught each of the four courses at one time or another during the two-year period, Whiteless is able to record a course rating
shown in the following table. Find the best assignment of professors to courses to maximize the overall teaching rating.

Statistics ManagemeFinance Economics


Bain 80 85 95 40
Carey 85 30 75 65
Dio 90 55 80 70
Powell 55 80 65 50

Statistics ManagemeFinance Economics total sign Professors


Bain 0 0 1 0 1= 1
Carey 0 0 0 1 1= 1
Dio 1 0 0 0 1= 1
Powell 0 1 0 0 1= 1
1 1 1 1
<= <= <= <=
1 1 1 1

330
ssigning professors to courses next semester. As a criterion for
ons (which were filled out by students). Since each of the four
s able to record a course rating for each instructor. These ratings are
eaching rating.
Umbrella Corporation, LLC

Maxie and Bianca own Umbrella Corporation, LLC, and they are the top producers of high quality Johns Hopkins Basketball jer
jerseys are in hot demand.

Maxie and Bianca operate two factories, Factory 1 and Factory 2. They have large orders from retail stores in three locations: S
transportation costs from Factory 1 to the three stores are $22, 14, and $30 per jersey, respectively. The transportation costs
$20, and $24 per jerrespectively. Factory 1 can produce at most 100 jerseys in a week. Factory 2 can produce at most 120 jers
60, and 70 jerseys each week.

The manufacturing costs are $6.00 per jersey at Factory 1 and $6.25 per jersey at Factory 2.

Maxie and Bianca are savvy businesswomen and want to minimize their costs. Find the number of jerseys that should be shipp
the total costs from transportation and manufacturing are minimized.

Enter a number only for each of the questions below (entering units may cause an error).

T/P SA SB SC Prod
F1 22 14 30 100
F2 16 20 24 120
Demand 80 60 70

MF cost F1 6
MF cost F2 6.25

T/P SA SB SC
F1 30 60 0 90
F2 50 0 70 120
80 60 70

Total T/P cost 3980


Prod cost 1290
total cost 5270

Maxie is leaving the Johns Hopkins Basketball jersey making business and is closing three of her factories. She would like to reassign all
factories.
Closing Plant No. of Workers to Transfer Open Plant No. of Open Positions
1 60 A 45
2 105 B 90
3 70 C 35
Total 235 Total 170

A B C Sum
F1 0 60 0 60
F2 45 30 30 105
F3 0 0 5 5
45 90 35
= = =
45 90 35

From: A B C
1 5 8 6
2 10 9 12
3 7 6 10

Total prodction increase 1610


ty Johns Hopkins Basketball jerseys. Despite prior team records, these

etail stores in three locations: Store A, Store B, and Store C. The


vely. The transportation costs from Factory 2 to the three stores are $16,
2 can produce at most 120 jerseys in a week. Stores A, B and C demand 80,

of jerseys that should be shipped from each factory to each store such that

ies. She would like to reassign all 235 of her best workers to Bianca's remaining
Sign
<= 60
<= 105
<= 70

You might also like