Uploaded by matz.iversen1

LP part 4 - applications abr

advertisement
Vahideh Abedi
Key to model development
• Think thoroughly about choice of decision variables.
– For some models, their definition is already half of the work!
• Identify the objective function,
– Identify and separate all the data required for objective function
definition
• Identify the constraints
Typical constraints are usually among the following four types:
–
–
–
–
Resource constraints
Benefit constraints
Fixed requirement constraints
Implicit constraints
2
Identify constraints:
Resource Constraints
Total amount of
resources Used
≤
Amount of
Resources
available
Examples:
• In the Olympic Bike Example we had a limited supply of
Aluminum and Steel
 2x1 + 4x2 < 100
(Aluminum Available)
• In the Investment example, we had a limited availability of
capital, and limited allowance to use Microsoft stock
 M ≤ 50,000
 I + M + B ≤ 100,000
(Maximum Investment in Microsoft)
(Capital available)
3
Identify constraints:
Benefit Constraints
Total benefit
achieved
≥
Amount of
benefit needed
(or required)
Examples:
• In the Investment example, we were required to invest a
minimum amount in tech stocks.
 I + M ≥ 30,000
(Minimum Investment in “Tech” stocks)
• In the Diet problem, we were required to include a
minimum amount of each nutrient:
– Total amount of vitamin A ≥ 85%
4
Identify constraints:
Fixed Requirement Constraints
Amount provided
=
Required
Amount
• These constraints usually appear to represent the
conservation of material, money or information over time
or over space, or represent definition of a dummy variable
• For example:
– When deciding how much inventory to keep, we “carry” the inventory
in hand at one period of time to a subsequent period of time
– When transporting material, we “move” items produced in one location
to where it is needed in another location.
5
Identify constraints:
Implicit Constraints
In linear programming, decision variables are allowed to take any
possible real value. Based on the way we define decision variables,
if they cannot take a specific range of values, we need to add them
as constraints. These types of constraints, come from the way
we define our decision variables and may not be explicitly
stated in a problem, that’s why they are called implicit
constraints.
We need to recognize implicit constraints by looking at the
definition of decision variables and ask ourselves what type
of values this decision variable can take. If there is any
restriction, add them as constraints to the problem.
6
Identify constraints:
Implicit Constraints
Examples of implicit constraints:
– non-negativity or non-positivity of decision variables
– Logical bounds on decision variables
• E.g. if decision variables represent % of something, it means that they
cannot be more than 1
– Integer or binary decision variables
• E.g. number of people hired should be an integer
• E.g. when deciding whether to build a factory in LA, the outcome of
decision only has two values: “yes” or “no”; OR “0” or “1”  this is
called a binary decision variable
7
Identify constraints:
Some problems may NOT be in “standard form” of
constraints for linear programs, i.e.
≤
𝑨 𝒍𝒊𝒏𝒆𝒂𝒓 𝒆𝒙𝒑𝒓𝒆𝒔𝒔𝒊𝒐𝒏 𝑰𝒏
𝒂 𝒄𝒐𝒏𝒔𝒕𝒂𝒏𝒕
𝒕𝒆𝒓𝒎𝒔 𝒐𝒇 𝒅𝒆𝒄𝒊𝒔𝒊𝒐𝒏 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆𝒔 ≥
=
but can be put in this form
– e.g. Media Selection problem
When asked to write down the algebraic formulation of
the problem, you are supposed to put all constraints in
this standard form
8
Homework question
Nutri-Jenny is a weight-management center. One new entree to be served will be
a beef sirloin tips dinner. It will consist of beef tips and gravy, plus some
combination of pens, carrots, and a dinner roll. Nutri-Jenny would like to
determine what quantity of each item to include in the entree to meet the
nutritional requirements, while costing as little as possible. The nutritional
information for each item and its cost, as well as nutritional requirement follows:
(I) it must have between 280 and 320 calories,
(II) Calories from fat should be no more than 30% of the total number of calories,
(III) it must have at least 600 IUs of vitamin A, 10 mg of vitamin C, and 30 g of protein.
(IV) Furthermore, for practical reasons, it must include at least 2 oz of beef,
(V) and it must have at least ½ ounce of gravy per ounce of beef.
9
Let
B = ounces of beef tips in diet,
G = ounces of gravy in diet,
P = ounces of peas in diet,
C = ounces of carrots in diet,
R = ounces of roll in diet.
The two red constraints are:
19B + 15G + 10R ≤ 0.3(54B + 20G + 15P + 8C + 40R)
Which is the same as
2.8𝐵 + 9𝐺 − 2𝑅 − 4.5𝑃 − 2.4𝐶 ≤ 0
G ≥ 0.5B
Which is the same as
𝐺 − 0.5𝐵 ≥ 0
10
Applications of Integer/Binary
Variables
• Integer variables: To avoid fractional optimal solutions when
we are dealing with people or countable objects
– Examples:
• Deciding on the number of people to assign to a shift
• Deciding on the number of planes to service at an airport
• Binary variables: Binary variables are more restricted
integer variables: can only take two values 0 or 1
• they are ideally used when dealing with yes-or-no
decisions.
1 If a new health care plan is adopted
X
0 If it is not
• Think of this as # of health care plans adopted
1 If a new police station is built downtown
X
• Think of this as # of police stations built
0 If it is not
Revisiting the Olympic Bike Example
• In the Olympic Bike example we found that it is optimal to
build
– 15 Deluxe bikes
– 17.5 Professional bikes
– The optimal profit was $412.5
• The fractional value can be justified if
– the factory has multiple plants and the schedule obtained
corresponds to weekly production plan for one plant. So half of the
plants can produce 17 professional bikes the remaining produce 18.
– The factory is willing to alternate between weeks, one week to
produce 17 professional bikes, another week 18.
• But generally, especially if this is a one-time production
setting, the number of bikes produced should be integer
13
Formulating integer linear models
in Excel
• Adding integer/binary constraints is done in the solver’s
constraint window
• You can only make “Decision variables” as integer or binary.
Other quantities cannot be set to integer.
14
Solving Integer Linear Models
• Adding integer constrains (like any other constraints)
makes the objective to either stay the same or worse off.
• The algorithm behind making decision variables integer in
the solver needs to solve many linear programs until the
value of all decision variables are integer. This is an iterative
process and often very time consuming as the number of
variables increases.
• Because of the way solver solves the problem, there is no
sensitivity report!
• Best practice: Try to solve the problem with no or the
least number of integer variables.
15
OTHER APPLICATIONS
WORKFORCE MANAGEMENT
PROBLEM
16
Workforce Management Problem
• Usually decides on scheduling personnel in order to
minimize the cost of providing a service by personnel
constrained to:
A number of minimum service levels for the company
being met (e.g. meeting demand or customer orders)
17
Workforce Management Example
Good Value Grocery Store
The store manager for the Good Value Grocery Store is planning the
schedule for the coming holiday week. Anticipated needs for checkout
clerks are as follows:
Shift
Time
Minimum Number of Clerks
1.
Midnight – 4 a.m.
3
2.
4 a.m. – 8 a.m.
6
3.
8 a.m. – 12 noon
8
4.
12 noon – 4 p.m.
6
5.
4 p.m. – 8 p.m.
12
6.
8 p.m. – 12 midnight
9
Each clerk works eight hours in a row.
Formulate a linear programming problem that will minimize the
number of clerks needed to satisfy all requirements.
Workforce Management
Good Value Grocery Store
• Decision Variables
Let xi = Number of clerks beginning their 8 hours at the beginning of
shift i.
• The Model
Min x1 + x2 + x3 + x4 + x5 + x6
s.t.
x1
+ x6
x1 + x2
x2 + x3
x3 + x4
x4 + x5
x5 + x6
3
6
8
6
 12
9
x1, x2 , x3 , x4 , x5 , x6  0 and integer
(covering shift 1)
(covering shift 2)
(covering shift 3)
(covering shift 4)
(covering shift 5)
(covering shift 6)
• How would the solution change if the store was closed from
midnight to 4 am?
20
OTHER APPLICATIONS
SITE SELECTION PROBLEM
21
Site Selection Problem
• We usually decide on how many sites should be selected for
the location of a new facility and where they should be
located.
• There can be different types of objectives
– Minimize cost, minimize response time, minimize risk
22
Selection of Sites for Emergency Services:
The Caliente City Problem
• Caliente City is growing rapidly and spreading well beyond
its original borders
• They currently have only one fire station, located in the
congested center of town. But the result has been long
delays in fire trucks reaching the outer part of the city. The
city is open to relocating this station too.
Goal: Develop a plan for locating multiple fire stations
throughout the city with the least cost while
Response Time ≤ 10 minutes
Response Time and Cost Data for
Caliente City
Fire Station in Tract
1
2
3
4
5
6
7
8
1
2
8
18
9
23
22
16
28
2
9
3
10
12
16
14
21
25
3
17
8
4
20
21
8
22
17
4
10
13
19
2
18
21
6
12
5
21
12
16
13
5
11
9
12
6
25
15
7
21
15
3
14
8
7
14
22
18
7
13
15
2
9
8
30
24
15
14
17
9
8
3
Cost of Station
($thousands)
350
250
450
300
50
400
300
200
Response
times
(minutes) to
serve fire in
a tract
The city is divided into 8 tracts each of which is small enough that can contain at most one
fire station.
The response times from each tract to a potential fire station are recorded. E.g. if there is a
fire station in tract 3 which needs to serve a fire in tract 1 it would take 18 minutes.
Response Time and Cost Data for
Caliente City
Fire Station in Tract
1
2
3
4
5
6
7
8
1
2
8
18
9
23
22
16
28
2
9
3
10
12
16
14
21
25
3
17
8
4
20
21
8
22
17
4
10
13
19
2
18
21
6
12
5
21
12
16
13
5
11
9
12
6
25
15
7
21
15
3
14
8
7
14
22
18
7
13
15
2
9
8
30
24
15
14
17
9
8
3
Cost of Station
($thousands)
350
250
450
300
50
400
300
200
Response
times
(minutes) to
serve fire in
a tract
We want to have a response time of at most 10 minutes. So look at all response times equal
or below 10.
This means that tract 1 can only be “covered” appropriately if a station is located at tract 1
or tract 2 or tract 4
Algebraic Formulation of Caliente City
Problem
xj = 1 if tract j is selected to receive a fire station; 0 otherwise (j = 1,… , 8)
(can think of it as # of fire stations in tract j)
Minimize C = 350x1 + 250x2 + 450x3 + 300x4 + 50x5 + 400x6 + 300x7 +
200x8
subject to
Covering Tract 1:
x1 + x2 + x4 ≥ 1
Covering Tract 2:
x1 + x2 + x3 ≥ 1
Covering Tract 3:
x2 + x3 + x6 ≥ 1
Covering Tract 4:
x1 + x4 + x7 ≥ 1
Covering Tract 5:
x5 + x7 ≥ 1
Covering Tract 6:
x3 + x6 + x8 ≥ 1
Covering Tract 7:
x4 + x7 + x8 ≥ 1
Covering Tract 8:
x6 + x7 + x8 ≥ 1
and xj are binary (for j = 1, 2, … , 8).
Main takeaways
In formulating problems in terms of linear program
• A key part of the problem is the choice of decision variables
• Not all constraints are always stated in the problem, some
are created based on the way we define decision variables
and logical relationship between them
27
Related documents
Download