200 likes | 314 Views
Applications of Linear and Integer Programming Models. Applications of Integer Linear Programming Models. Many real life problems call for at least one integer decision variable. There are three types of Integer models: Pure integer (AILP) Mixed integer (MILP) Binary (BILP).
E N D
Applications of Integer Linear Programming Models • Many real life problems call for at least one integer decision variable. • There are three types of Integer models: • Pure integer (AILP) • Mixed integer (MILP) • Binary (BILP)
The use of binary variables in constraints • AAny decision situation that can be modeled by “yes”/“no”, “good”/“bad” etc., falls into the binary category. • To illustrate
The use of binary variables in constraints • Example • A decision is to be made whether each of three plants should be built (Yi = 1) or not built (Yi = 0) RequirementBinary Representation At least 2 plants must be built Y1 + Y2 + Y3 ³ 2 If plant 1 is built, plant 2 must not be built Y1 + Y2£ 1 If plant 1 is built, plant 2 must be built Y1 – Y2£ 0 One, but not both plants must be built Y1+ Y2 = 1 Both or neither plants must be built Y1 – Y2 =0Plant construction cannot exceed $17 million given the costs to build plants are $5, $8, $10 million 5Y1+8Y2+10Y3£ 17
If the plant is not built Y1 = 0.The constraint becomes 6x1 + 9X2 £ 0, and thus, X1 = 0 and X2 = 0 If the plant is built Y1 = 1. The constraint becomes 6x1 + 9X2 £ 2000 The use of binary variables in constraints • Example - continued • Two products can be produced at a plant. • Product 1 requires 6 pounds of steel and product 2 requires 9 pounds. • If a plant is built, it should have 2000 pounds of steel available. • The production of each product should satisfy the steel availability if the plant is opened, or equal to zero if the plant is not opened.6X1 + 9X2£ 2000Y1
Personnel Scheduling Models • Assignments of personnel to jobs under minimum required coverage is a typical integer problems. • When resources are available over more than one period, linking constraint link the resources available in period t to the resources available in a period t+1.
You look so funny You look so funny You look so funny You look so funny You look so funny You look so funny You look so funny You look so funny You look so funny
Sunset Beach Lifeguard Assignments • The City of Sunset Beach staffs lifeguards 7 days a week. • Regulations require that city employees work five days. • Insurance requirements mandate 1 lifeguard per 8000 average daily attendance on any given day. • The city wants to employ as few lifeguards as possible.
Sunset Beach Lifeguard Assignments • Problem Summary • Schedule lifeguard over 5 consecutive days. • Minimize the total number of lifeguards. • Meet the minimum daily lifeguard requirements Sun. Mon. Tue. Wed. Thr. Fri. Sat. 8 6 5 4 6 7 9
Sunset Beach Lifeguard Assignments • Decision Variables Xi = the number of lifeguards scheduled to begin on day “ i ” for i=1, 2, …,7 (i=1 is Sunday) • Objective Function Minimize the total number of lifeguard scheduled • Constraints Ensure that enough lifeguards are scheduled each day.
Sunset Beach Lifeguard Assignments To ensure that enough lifeguards are scheduled for each day, identify which workers are on duty. For example: …
Sunset Beach Lifeguard Assignments Who works on Friday ? Who works on Saturday ? X2 X3 X3 X4 X5 X6 X4 X5 X6 X1 Mon Tue. Wed. Thu. Fri. Sat Sun. Repeat this procedure for each day of the week, and build the constraints accordingly.
Sunset Beach Lifeguard Assignments Min X1 + X2 +X3 + X4 + X5 + X6 + X7 S.T.X1 + X4 + X5 + X6 + X7 ³ 8 X1 + X2 + X5 + X6 + X7 ³ 6X1 + X2 + X3 + X6 + X7 ³ 5X1 + X2 + X3 + X4 + X7 ³ 4 X1 + X2 + X3 + X4 + X5 ³ 6 X2 + X3 + X4 + X5 + X6 ³ 7 X3 + X4 + X5 + X6 + X7 ³ 9 All the variables are non negative integers
OPTIMAL ASSIGNMENTS LIFEGUARDS DAY PRESENT REQUIRED BEGIN SHIFT 9 8 1 SUNDAY 8 6 0 MONDAY 6 5 1 TUESDAY 5 4 1 WEDNESDAY 6 6 3 THURSDAY 7 7 2 FRIDAY 9 9 2 SATURDAY 10 Sunset Beach Lifeguard Assignments Note: An alternate optimal solution exists. TOTAL LIFEGUARDS
Project selection Models • These models involve a “go/no-go” situations, that can be modeled using binary variables. • Typical elements in such models are: • Budget • Space • Priority conditions
Salem City Council – Project Selection • The Salem City Council needs to decide how to allocate funds to nine projects such that public support is maximized. • Data reflect costs, resource availabilities, concerns and priorities the city council has.
Survey results X1 X2 X3 X4 X5 X6 X7 X8 X9 Salem City Council – Project Selection
Salem City Council – Project Selection • Decision Variables: Xj- a set of binary variables indicating if a project j is selected (Xj=1) or not (Xj=0) for j=1,2,..,9. • Objective function: Maximize the overall point score of the fundedprojects • Constraints: See the mathematical model.
Salem City Council – Project Selection (Xi = 0,1 for i=1, 2…, 9) • The Mathematical Model Max 4176X1+1774X2+ 2513X3+1928X4+3607X5+962X6+2829X7+1708X8+3003X9 S.T. 400X1+ 350X2+ 50X3+ 100X4+ 500X5+ 90X6+ 220X7+ 150X8+ 140X9 £ 900 7X1+ X3+ 2X5+ X6+ 8X7+ 3X8+ 2x9 ³ 10 X1+ X2+ X3+ X4 £ 3 X3+ X5 = 1 X7 - X8 = 0 X7 - X9³ 0 x8 - x9³ 0 The maximum amounts of funds to be allocated is $900,000 The number of new jobs created must be at least 10 The number of police-related activities selected is at most 3 (out of 4) Either police car or fire truck be purchased Sports funds and music funds must be restored / not restored together Sports funds and music funds must be restored before computer equipment is purchased