Note1 Model Formulation

17
Lecture 1 and 2 Material Instructor: K. Gita Ayu March 2, 2012 1 Model Formulation The most challenging part from mathematical programming is to translate the problem into mathematical forms. A stream of examples are given in the following subsection to develop the essential modeling skills as well as to introduce some commonly used terminology and illustrate the wide range of model forms available. Three steps to formulate any optimization model: 1. Identify the decision variables 2. Define the constraints (what limits decisions?) 3. Quantify the decision consequences to be maximized or minimized through objective function Step 2 and 3 are somewhat interchangeable depending on the preference of the analyst. However, due to its complexity in most cases, most OR analysts prefer to define the constraints first prior formulating the objective functions. Variable-type constraints specify the domain of the decision variables which commonly referred as sign restriction for the variables, e.g. URS (unrestricted sign), BIN (binary), or INT (integer). While main constraints specify the restrictions and interactions that limit the values of the decision variables excluding variable type. As a rule of thumb, if there are doubts about a constraint, then make sure that all terms in the constraint have the same units in both sides: left and right hand sides. Standard Model of an optimization has the form: min or max (Objective function(s)) s.t. (main constraints) (variable-type constraints) where ”s.t.” stands for ”subject to” A linear programming problem (LP) is an optimization problem for which: maximize (or minimiz) a linear function of the decision variables, called objective function the values of the decision variables must satisfy a set of constraints and each must be a linear equality or inequality. sign restriction associated with each variable must be either nonnegative (x i 0) or unrestricted in sign (urs) 1

Transcript of Note1 Model Formulation

Page 1: Note1 Model Formulation

Lecture 1 and 2 Material

Instructor: K. Gita Ayu

March 2, 2012

1 Model Formulation

The most challenging part from mathematical programming is to translate the problem into mathematicalforms. A stream of examples are given in the following subsection to develop the essential modeling skills aswell as to introduce some commonly used terminology and illustrate the wide range of model forms available.

Three steps to formulate any optimization model:

1. Identify the decision variables

2. Define the constraints (what limits decisions?)

3. Quantify the decision consequences to be maximized or minimized through objective function

Step 2 and 3 are somewhat interchangeable depending on the preference of the analyst. However, due toits complexity in most cases, most OR analysts prefer to define the constraints first prior formulating theobjective functions.

Variable-type constraints specify the domain of the decision variables which commonly referred as signrestriction for the variables, e.g. URS (unrestricted sign), BIN (binary), or INT (integer). While mainconstraints specify the restrictions and interactions that limit the values of the decision variables excludingvariable type. As a rule of thumb, if there are doubts about a constraint, then make sure that all terms inthe constraint have the same units in both sides: left and right hand sides.

Standard Model of an optimization has the form:

min or max (Objective function(s))s.t. (main constraints)

(variable-type constraints)

where ”s.t.” stands for ”subject to”

A linear programming problem (LP) is an optimization problem for which:

� maximize (or minimiz) a linear function of the decision variables, called objective function

� the values of the decision variables must satisfy a set of constraints and each must be a linear equalityor inequality.

� sign restriction associated with each variable must be either nonnegative (xi ≥ 0) or unrestricted insign (urs)

1

Page 2: Note1 Model Formulation

1.1 Oil Refinery

An oil refinery produces gasoline and heating oil from 2 crude materials A and B. Suppose there are 3processors available and the consumption and output per production period is as follows:

Processor P1 P2 P3

Input Crude A 3 1 5Crude B 5 1 3

Output Gasoline 4 1 3Heating Oil 3 1 4

Profit 5 7 4

Suppose the profit for each barrel of gasoline and heating oil is $4 and $3 respectively. Determine the unitsof production using the three processors that will produce the highest profit for the company, assuming thereare 8 million barrels of crude A and 5 million barrels of crude B.

SolutionLet i = {processor 1, processor 2, processor 3}Decision variables: xi = number of processor type i is used for production

Objective function:Max z = 5x1 + 7x2 + 4x3 (profit from using processor i)

+(4)(4x1 + x2 + 3x3) (profit from gasoline produced using processor i)+(3)(3x1 + x2 + 4x3) (profit from heating oil produced using processor i)

Constraints:s.t. 3x1 + x2 + 5x3 ≤ 8 (max # barrels of crude A is available for use)

5x1 + x2 + 3x3 ≤ 5 max # (barrels of crude B is available for use)x1, x2, x3 ≥ 0 (nonnegative constraint)

1.2 Two Crude Petroleum (Rardin, p.24)

Two Crude Petroleum (TCP) runs a small refinery on the Texas coast. The refinery distills crude petroleumfrom two sources, Saudi Arabia and Venezuela, into three main products: gasoline, jet fuel, and lubricants.

The two crudes differ in chemical composition and thus yield different product mixes. Each barrel ofSaudi crude yields 0.3 barrel of gasoline, 0.4 barrel of jet fuel, and 0.2 barrel of lubricants. On the otherhand, each barrel of Venezuelan crude yields 0.4 barrel of gasoline but only 0.2 barrel of jet fuel and 0.3barrel of lubricants. The remaining 10% of each barrel is lost to refining.

The crudes also differ in cost and availability. TCP can purchase up to 9000 barrels per day from SaudiArabia at $20 per barrel. Up to 6000 barrels per day of Venezuelan petroleum are also available at the lowercost of $15 per barrel because of the shorter transportation distance.

TCP’s contracts with independent distributors require it to produce 2000 barrels per day of gasoline,1500 barrels per day of jet fuel, and 500 barrels per day of lubricants. How can these requirements be fulfilledmost efficiently?

2

Page 3: Note1 Model Formulation

SolutionDecision variables:x1 = # barrels of Saudi crude refined per day (in thousand)x2 = # barrels of Venezuelan crude refined per day

Objective function:Min z = 20x1 + 15x2 (total cost)Constraints:s.t. .3x1 + .4x2 ≥ 2.0 (gasoline requirement)

.4x1 + .2x2 ≥ 1.5 (jet fuel requirement)

.2x1 + .3x2 ≥ 0.5 (lubricant requirement)x1 ≤ 9 (Saudi availability)x2 ≤ 6 (Venezuelan availability)

x1, x2 ≥ 0 (nonnegative constraint)

1.3 Cardboard

A paper company produces cardboard boxes. Suppose cardboard comes in a fixed area, c. We would like toproduce a cardboard box of maximum volume. Write the model!

SolutionDecision variables:l = length of the boxw = width of the boxh = height of the box

Objective function:Max z = lwh (box volume)Constraints:s.t. 2(lw + wh + lh) ≤ c (total box area)

l, w, h ≥ 0 (nonnegative constraint)

1.4 Fencing (Rardin, p.26 )

Suppose that we wish to enclose a rectangular equipment yard by at most 80 meters of fencing. Formulatean optimization model to find the design of maximum area.

SolutionDecision variables:l = length of the equipment yard (in meters)w = width of the equipment yard (in meters)

Objective function:Max z = lw (enclosed area)Constraints:s.t. 2(l + w) ≤ 80 (fence length)

l, w ≥ 0 (nonnegative constraint)

3

Page 4: Note1 Model Formulation

1.5 Farmer Jane

Farmer Jane owns 45 acres of land. She is going to plant each acre with wheat or corn. Each acre plantedwith wheat yields $200 profit; and each with corn yields $300 profit. The labor and fertilizer used for eachacre are given below. One hundred workers and 20 tons fertilizers are available.

Wheat CornLabor (hrs) 3 2Fertilizer (tons) 2 4

Determine how Jane can maximize profit from her land!

SolutionDecision variables:W = # acres planted with wheatC = # acres planted with corn

Objective function:Max z = 200W + 300C profitConstraints:s.t. W + C ≤ 45 (max acres of land which can be used)

3W + 2C ≤ 100 (available labor hours)2W + 4C ≤ 20 (available fertilizers)

W,C ≥ 0 (nonnegative constraint)

1.6 Auto Company (Winston, p.60 )

An auto company manufactures cars and trucks. Each vehicle must be processed in the paint shop and bodyassembly shop. If the paint shop were only painting trucks, 40 per day could be painted. If it were onlypainting cars, 60 per day could be painted. The body shop can process 50 cars alone or 50 trucks alone perday. Assume the return from truck and car are 300 and 200, respectively; find the production schedule forthe company!

SolutionDecision variables:T = # trucks manufactured in one dayC = # cars manufactured in one day

Objective function:Max z = 300T + 200C (return from selling trucks and cars)Constraints:s.t. T/40 + C/60 ≤ 1 (max # trucks and # cars can be painted in one day)

T/50 + C/50 ≤ 1 (max # trucks or # cars can be processed in the body shop in one day)T,C ≥ 0 (nonnegative constraint)

Common mistakes are made by writting the constraints as follows:T ≤ 40 and C ≤ 60 (max # trucks and # cars can be painted in one day)T ≤ 50 and C ≤ 50 (max # trucks or # cars can be processed in the body shop in one day)

These constraints allows producing 40 trucks and 50 cars becomes a solution which violates:Body shop constraint − ”can only paint at most 50 cars alone or 50 trucks alone in a day”

4

Page 5: Note1 Model Formulation

Paint shop constraint − ”if the paint shop were only painting trucks, 40 per day could be painted”

Remarks: if an alternative optimum occurs, use a secondary criterion to choose between optimal solutions,such technique is commonly known as goal programming.

1.7 Auto Company (additional constraints:Winston, p.65 )

Suppose that auto dealers require that the auto company produce at least 30 trucks and 20 cars. Write theconstraints!

Solution

T ≥ 30 (min # trucks should be manufactured in one day)C ≥ 20 (min # cars should be manufactured in one day)

1.8 Diet Problem (Winston, p.68 )

My diet requires that all the food I eat come from one of the four basic food groups (chocolate cake, icecream, soda, and cheesecake). At present, the following four foods are available for consumption: brownies,chocolate ice cream, cola, and pineapple cheesecake. Each brownie costs 50¢, each scoop of chocolate icecream costs 20¢, each bottle of cola costs 30¢, and each piece of pineapple cheesecake costs 80¢. Each day, Imust ingest at least 500 calories, 6 oz. of chocolate, 10 oz. of sugar, and 8 oz. of fat. The nutritional contentper unit of each food is shown below.

Calories Chocolate Sugar Fat(oz.) (oz.) (oz.) (oz.)

Brownie 400 3 2 2Chocolate ice cream (1 scoop) 200 2 2 4Cola (1 bottle) 150 0 4 1Pineapple cheesecake (1 piece) 500 0 4 5

Formulate the LP model that can be used to satisfy my daily nutritional requirements at minimum cost.

SolutionDecision variables:B = # brownies consumed dailyC = # scoops of chocolate ice cream consumed dailyK = # bottles of cola consumed dailyP = # pieces of pineapple cheesecake consumed daily

Objective function:Min z = .5B + .2C + .3K + .8P (total cost)Constraints:s.t. 400B + 200C + 150K + 500P ≥ 500 (min daily calories intake)

3B + 2C ≥ 6 (min daily chocolate intake)2B + 2C + 4K + 4P ≥ 10 (min daily sugar intake)2B + 4C + K + 5P ≥ 8 (min daily fat intake)

B,C,K, P ≥ 0 (nonnegative constraint)

Remarks: A diet problem formulation fails to reflect people’s desire for a tasty and varied diet. Linearprogramming has been used to plan institutional menus for a weekly or monthly period. Menu-planningmodels should contain constraints that reflect tastiness and variety requirements.

5

Page 6: Note1 Model Formulation

1.9 Work Scheduling (Winston, p.72 )

# of full-time employees requiredMon 17Tue 13Wed 15Thu 19Fri 14Sat 16Sun 11

A post office requires different numbers of full-time employees on different days of the week. The number offull-time employees required on each day is given on the table above. Union rules state that each full-timeemployee must work five consecutive days and then receive two days off. For example, an employee whoworks Monday to Friday must be off on Saturday and Sunday. The post office wants to meet its dailyrequirements using only full-time employees. Formulate an LP that the post office can use to minimize thenumber of full-time employees that must be hired.

SolutionLet i = {Mon, Tue, Wed, Thu, Fri, Sat, Sun}Decision variables: xi = # full-time employees beginning work on day i

Objective function:

Min z =∑7

i=1 xi (total # full-time employees hired)Constraints:s.t. x1 + x4 + x5 + x6 + x7 ≥ 17 (min # full-time employees needed on Monday)

x1 + x2 + x5 + x6 + x7 ≥ 13 (min # full-time employees needed on Tuesday)x1 + x2 + x3 + x6 + x7 ≥ 15 (min # full-time employees needed on Wednesday)x1 + x2 + x3 + x4 + x7 ≥ 19 (min # full-time employees needed on Thursday)x1 + x2 + x3 + x4 + x5 ≥ 14 (min # full-time employees needed on Friday)

x2 + x3 + x4 + x5 + x6 ≥ 16 (min # full-time employees needed on Saturday)x3 + x4 + x5 + x6 + x7 ≥ 11 (min # full-time employees needed on Sunday)

xi ≥ 0,∀i (nonnegative constraint)xi INT, ∀i

See the illustration below for further understanding on how the model above answer the post office dailyrequirement.

Mon Tue Wed Thu Fri Sat SunStarts on Mon x x x x x

Tue x x x x xWed x x x x xThu x x x x xFri x x x x xSat x x x x xSun x x x x x

The post office is a static scheduling example because we assume the same schedule reoccuring everyweek. While in reality, demands change overtime so the post office does not face the same situation eachweek (aka a dynamic scheduling problem).

6

Page 7: Note1 Model Formulation

In a case where number of variables are very large and computer might have difficulty finding the exactsolution, heuristic methods can be used to find a good yet might not be optimum solution to the problem.

The real world application of the scheduling problem is done by Krajewski, Ritzman, and McKenzie (1980)to determine the minimum-cost combination of part-time employees, full-time employees, and overtime laborneeded to process each day’s checks by the end of the workday (10 p.m.). The major input to their model wasa forecast of the number of checks arriving at the bank each hour which is produced using multiple regression.

1.10 Project Selection (Winston, p.80 )

Star Oil Company is considering five different investment opportunities. The cash outflows and net presentvalues (in millions of dollars) are given in table below. Star Oil has $40 million available for investmentat the present time (time 0); it estimates that one year from now (time 1) $20 million will be available forinvestment. Star Oil may purchase any fraction of each investment. In this case, the cash outflows and NPVare adjusted accordingly. For example, if Star Oil purchases one fifth of investment 3, then a cash outflowis 1/5(5) = $1 million would be required at time 1. The one-fifth share of investment 3 would yield anNPV of 1/5(16) = $3.2 million. Star Oil wants to maximize the NPV that can be obtained by investing ininvestments 1-5. Formulate an LP that will help achieve this goal. Assume that any funds left over at time0 cannot be used at time 1.

Inv. 1 Inv. 2 Inv. 3 Inv. 4 Inv. 5Time 0 cash outflow 11 53 5 5 29Time 1 cash outflow 3 6 5 1 34NPV 13 16 16 14 39

SolutionLet i = investment = {1, 2, 3, 4, 5}Decision variables: xi =fraction of investment i purchased

Objective function:Max z = 13x1 + 16x2 + 16x3 + 14x4 + 39x5 (NPV)Constraints:s.t. 11x1 + 53x2 + 5x3 + 5x4 + 29x5 ≤ 40 (time 0 available cash for use)

3x1 + 6x2 + 5x3 + x4 + 34x5 ≤ 20 (time 1 available cash for use)xi ≤ 1,∀i (max 100% in any investment)xi ≥ 0,∀i (nonnegative constraint)

1.11 Capital Budgeting

Consider two investments with varying cash flows:

Cash flow at time(in 1000)

0 1 2 3Investment 1 -6 -5 7 9Investment 2 -8 -3 9 7

Assume at time 0, $10,000 cash is available and at time 1, $7000 is available. Suppose the interest rateis 0.1. Formulate an LP so as to obtain a solution which maximizes the NPV from these investments?

7

Page 8: Note1 Model Formulation

SolutionThe goal of this problem is to maximize the NPV (Net Present Value). Thus, NPV shall be calculated first,prior writing the LP.

NPV (inv 1) = -6 - 5(P/F, 10%, 1) + 7(P/F, 10%, 2) + 9(P/F. 10%, 3)= -6 - 5(.909091) + 7(.826446) + 9(.751315)= 2.001503

NPV (inv 2) = -8 - 3(P/F, 10%, 1) + 9(P/F, 10%, 2) + 7(P/F. 10%, 3)= -8 - 3(.909091) + 9(.826446) + 7(.751315)= 1.969947

Decision variables:X = fraction of investment 1 purchasedY = fraction of investment 2 purchased

Objective function:Max z = 2.001503X + 1.969947Y NPVConstraints:s.t. 6X + 8Y ≤ 10 (max available cash for use at time 0)

5X + 3Y ≤ 7 (max available cash for use at time 1)X ≤ 1 (max 100% in investment 1)Y ≤ 1 (max 100% in investment 2)

X,Y ≥ 0 (nonnegative constraint)

Indexing or subscripts permit representing collection of similar quantities with a single symbol. For example,{xi : i = 1, . . . , 10} represent 10 similar values with the same x name, distinguishing them with the index i.Indexing often simplify large-scale optimization models because it often provides the initial model organi-zation and this becomes the first step in formulating a large optimization model. It is usually necessary toassign indexed symbolic names to most input parameters, even though they are being treated as constant.

1.12 Blending Problem (Winston, p.86 )

Sunco Oil (SO) manufactures three types of gasoline (gas 1, gas 2, and gas 3). Each type is produced byblending three types of crude oil (crude 1, crude 2, and crude 3). Sunco can purchase up to 5000 barrelsof each type of crude oil daily. The three types of gasoline differ in their octane rating and sulfur content.The crude oil blended to form gas 1 must have an average octane rating of at least 10 and contain at most1% sulfur. The crude oil blended to form gas 2 and gas 3 must have an average octane rating of at least 8and contain at most 2% sulfur and an average octane rating of at least 6 and contain at most 1% sulfur,respectively. It costs $4 to transform one barrel of oil into one barrel of gasoline and SO refinery can produceup to 14,000 barrels of gasoline daily. SO customers require the following amounts of each gasoline: gas 13000 barrels/day; gas 2 2000 barrels/day; gas 3 1000 barrels/day. Demand must be met. SO also has theoption of advertising to stimulate demand for its products. Each dollar spent daily in advertising a particulartype of gas increases the daily demand for that type of gas by 10 barrels.

Sales Price/Barrel Purchase Price/Barrel Octane Rating Sulfur ContentGas 1 $ 70 Crude 1 $ 45 12 0.5%Gas 2 $ 60 Crude 2 $ 35 6 2.0%Gas 3 $ 50 Crude 3 $ 25 8 3.0%

Formulate an LP that will enable Sunco to maximize daily profits.

8

Page 9: Note1 Model Formulation

Solution

Let: i = {gas 1, gas 2, gas 3}j = {crude oil 1, crude oil 2, crude oil 3}Si = sales price per barrel of gasoline type i ={70, 60, 50}Pj = purchase price per barrel of crude oil type j = {45, 35, 25}Oj = octane rating of crude oil type j = {12, 6, 8}Mi = minimum average octane rating for gasoline type i= {10, 8, 6}Fj = sulfur content of crude oil type j = {0.5, 2, 3}Ni = maximum sulfur content in gasoline type i = {1, 2, 1}Di = demand for gasoline type i = {3000, 2000, 1000}

Decision variables:Xij = # barrels of gasoline type i produced using crude oil type jAi = $ spent in advertising gasoline type i

Objective Function:

Max z =

3∑i=1

Si

3∑j=1

xij −3∑

i=1

Pj

3∑i=1

xij − 4

3∑i=1

xij

3∑j=1

xij −3∑

i=1

ai (daily profits)

Constraints:

3∑i=1

xij ≤ 5000,∀j (5000 barrels of each type of crude oil is available for use)

3∑i=1

3∑j=1

xij ≤ 14000 (max 14000 barrels of gasoline can be produced)

3∑j=1

xij − 10Ai = Di,∀i (fulfill the demand of each gasoline type)

∑3j=1 Ojxij∑3j=1 xij

≥Mi,∀i (min average octane rating)

∑3j=1 Fjxij∑3j=1 xij

≥ Ni,∀i (max average sulfur content)

xij ≥ 0,∀i,j (max average sulfur content)

Remarks: Blending problem is a situation in which various inputs must be blended in some desired pro-portion to produce goods. In reality, blending model is run periodically in a company to set production onthe basis of the current inventory and demand forecast. Then the inventory and forecast levels would beupdated and used to run the model again to determine the next day’s production.

1.13 Production Process (Winston, p.86 )

Rylon Corp manufactures Brute and Chanelle perfumes. The raw material needed to manufacture each typeof perfume can be purchased for $3/pound. Processing 1 lb of raw material requires 1 hour of laboratorytime. Each pound of processed raw material yields 3 oz of Regular Brute Perfume and 4 oz of RegularChanelle Perfume. Regular Brute can be sold for $7/oz and Regular Chanelle for $6/oz. Rylon also has the

9

Page 10: Note1 Model Formulation

option of further processing Regular Brute and Regular Chanelle to produce Luxury Brute, sold at $18/oz,and Luxury Chanelle, sold at $14/oz. Each ounce of Regular Brute processed further requires an additional3 hours of laboratory time and $4 processing cost and yields 1 oz of Luxury Brute. Each ounce of RegularChanelle processed further requires an additional 2 hours of laboratory time and $4 processing cost and yields1 oz of Luxury Chanelle. Each year, Rylon has 6000 hours of laboratory time available and can purchase upto 4000 lb of raw material.Formulate an LP that can be used to determine how Rylon can maximize profits. Assume that the cost ofthe laboratory hours is a fixed cost.

SolutionDecision variables:x1 = # oz of Regular Brute sold annuallyx2 = # oz of Luxury Brute sold annuallyx3 = # oz of Regular Chanelle sold annuallyx4 = # oz of Luxury Chanelle sold annuallyx5 = # lb of raw material purchased annually

Objective function:Max z = 7x1 + 6x3 + 18x2 + 14x4 (revenue from sales)

−4(x2 + x4)− 3x5 (processing cost and raw material cost)Constraints:s.t. x1 + x2 − 3x5 = 0 (1 lb of raw material produces 3 oz brute)

x3 + x4 − 4x5 = 0 (1 lb of raw material produces 4 oz Chanelle)3x2 + 2x4 + x5 ≤ 6000 (max available labor hour)x5 ≤ 4000 (max available raw material)x1, x2, x3, x4, x5 ≥ 0 (nonnegative constraint)

The key step in production process models is to determine how the outputs from a later stage of theprocess are related to the outputs from an earlier stage.

The next three examples are using linear programming to solve multiperiod decision problems.

10

Page 11: Note1 Model Formulation

1.14 Inventory Problem (Winston, p.101 )

Sailco Corp must determine how many sailboats should produce during each of the next four quarters. Thedemand during each of the next four quarters is as follows: first quarter, 40 sailboats; second quarter, 60sailboats; third quarter, 75 sailboats; fourth quarter, 25 sailboats. Sailco must meet demands on time. Thebeginning of the first quarter, Sailco has an inventory of 10 sailboats. At the beginning of each quarter,Sailco must decide how many sailboats should be produced during that quarter. For simplicity, we assumethat sailboats manufactured during a quarter can be used to meet demand for that quarter. During eachquarter, Sailco can produce up to 40 sailboats with regular-time labor at a total cost of $400 per sailboat.By having employees work overtime during a quarter, Sailco can produce additional sailboats with overtimelabor at a total cost of $450 per sailboat. At the end of each quarter (after production has occurred and thecurrent quarters demand has been satisfied), a carrying or holding cost of $20 per sailboat is incurred. Uselinear programming to determine a production schedule to minimize the sum of production and inventorycosts during the next four quarters.

Solution

Let: i = quarter = {1, 2, 3, 4}Di = demand in quarter i (sailboats) = {40, 60, 75, 25}I0 = # sailboats on hand at the end of quarter 0 = {10}

Decision variables:Xi = # sailboats produced in quarter i using regular-time laborYi = # sailboats produced in quarter i using overtime laborIi = # sailboats on hand at the end of quarter i

Objective function:

Min z = 400∑4

i=1 Xi + 450∑4

i=1 Yi + 20∑4

i=1 Ii total cost

Constraints:s.t. Xi ≤ 40,∀i (max sailboats/qrt. can be produced using regular-time labor)

Ii−1 + Xi + Yi −Di = Ii (inventory constraint)Xi, Yi, Ii ≥ 0,∀i (nonnegative constraint)

Remarks: several limitation in the Sailco problem model formulation.First, production cost is not always a linear function of the quantity produced in which violates the

Proportionality assumption. The fact that period-to-period variations in the quantity produced may resultin extra cost (production-smoothing cost) such as maximum production capacity, setup cost, training newemployees, laying off workers, and so forth.

Secondly, future demand is not certain, thus it violates Certainty assumption. When demand is not meton time, cost of goodwill shall be calculated due to customer displeasure which may result in a loss of futurerevenue. Backlogged may occur if demand can be met during later periods; however, it may incur somepenalty cost which shall be counted.

Lastly, It is unrealistic to assign inventory level of the last period equals to zero. It should assign asalvage value that is indicative of the workth of the final period’s inventory.

1.15 Multi-period Work Scheduling (Winston, p.109 )

CSL is a chain of computer service stores. The number of hours of skilled repair time that CSL requiresduring the next five months is as follows:

11

Page 12: Note1 Model Formulation

Jan: 6000 hoursFeb: 7000 hoursMar: 8000 hoursApr: 9500 hoursMay: 11,000 hours

At the beginning of January, 50 skilled technician work for CSL. Each skilled technician can work up to 160hours per month. In order to meet future demands, new technicians must be trained. It takes one monthto train a new technician. During the month of training, a trainee must be supervised for 50 hours by anexperienced technician. Each experienced technician is paid $2000 a month (even if he or she does not workthe full 160 hours). During the month of training, a trainee is paid $1000 a month. At the end of eachmonth, 5% of CSLs experienced technicians quit to join Plum Computers. Formulate an LP whose solutionwill enable CSL to minimize the labor cost incurred in meeting the service requirements for the next fivemonths.

Solution

Let: i = {Jan, Feb, Mar, Apr, May}Di = # hours required during month i = {6000, 7000, 8000, 9000, 11000}

Decision variables:Si = # skilled technicians available in the beginning of month iNi = # new technicians available in month i

Objective function:

Min z =∑5

i=1(2000Si + 1000Ni) (labor cost)Constraints:s.t. 160Si − 50Ni ≥ Di,∀i (demand has to be met)

0.95Si + Ni = Si+1,∀i (labor balance)S1 = 50 (beginning # labor)

Si, Ni ≥ 0,∀i (nonnegative constraint)

1.16 Multi-period Financial Model (Winston, p.105 )

Finco Investment Corporation must determine investment strategy for the firm during the next three years.At present (time 0), $100,000 is available for investment. Investment A, B, C, D, and E are available.The cash flow associated with investing $1 in each investment is given below. To ensure that the companysportfolio is diversified, Finco requires that at most $75,000 be placed in any single investment. In addition toinvestments A-E, Finco can earn interest at 8% per year by keeping uninvested cash in money market funds.Returns from investments may be immediately reinvested. For example, the positive cash flow received frominvestment C at time 1 may immediately be reinvested in investment B. Finco cannot borrow funds, so thecash available for investment at any time is limited to cash on hand.

Cash Flow at Time ($)0 1 2 3

A -1.00 0.50 1.00 0.00B 0.00 -1.00 0.50 1.00C -1.00 1.20 0.00 0.00D -1.00 0.00 0.00 1.90E 0.00 0.00 -1.00 1.50

12

Page 13: Note1 Model Formulation

Formulate an LP that will maximize cash on hand at time 3.

SolutionDecision variables:A = $ invested in investment AB = $ invested in investment BC = $ invested in investment CD = $ invested in investment DE = $ invested in investment ESt = $ invested in money market fund at time t where t = 0, 1, 2

Objective function:Max z = B + 1.9D + 1.5E + 1.08S2 (cash on hand at time 3)Constraints:s.t. A + C + D + S0 = 100, 000 (available cash at present)

.5A + 1.2C + 1.08S0 = B + S1 (available cast at time 1)A + .5B + 1.08S1 = E + S2 (available cast at time 2)

A ≤ 75000 (max $ can be invested in investment A)B ≤ 75000 (max $ can be invested in investment B)C ≤ 75000 (max $ can be invested in investment C)D ≤ 75000 (max $ can be invested in investment D)E ≤ 75000 (max $ can be invested in investment E)

A,B,C,D,E, S0, S1, S2 ≥ 0 (nonnegative constraint)

1.17 Production Process

An Oil company has three different processes that can be used to manufacture various types of gasoline.Each process involves blending oils in the companys catalytic cracker. Running process 1 for an hour costs$5 and requires 2 barrels of crude oil 1 and 3 barrels of crude oil 2. The output from running process 1 foran hour is 2 barrels of gas 1 and 1 barrel of gas 2. Running process 2 for an hour costs $4 and requires 1barrel of crude 1 and 3 barrels of crude 2. The output from running process 2 for an hour is 3 barrels ofgas 2. Running process 3 for an hour costs $1 and requires 2 barrels of crude 2 and 3 barrels of gas 2. Theoutput from running process 3 for an hour is 2 barrels of gas 3. Each week, 200 barrels of crude 1, at $2 perbarrel, and 300 barrels of crude 2, at $3 per barrel may be purchased. All gas produced can be sold at thefollowing per-barrel prices: gas 1,$9; gas 2, $10; gas 3, $24. Formulate an LP whose solution will maximizerevenue less costs. Assume only 100 hours of time on the catalytic cracker are available each week.

SolutionDecision variables:Pi = # labor hour used in process i, where i = {1, 2, 3}

Objective function:Max z = −2(2P1 + P2)− 3(3P1 + 3P2 + 2P3) (purchasing cost)

−5P1 − 4P2 − P3 (processing cost)+9(2P1) + 10(P1 + 3P2 − 3P3)) + 24(2P3) (revenue)

Constraints:s.t. 2P1 + P2 ≤ 200 (available barrels of crude oil 1)

3P1 + 3P2 + 2P3 ≤ 300 (available barrels of crude oil 2)P1 + P2 + P3 ≤ 100 (available labor hours)P1, P2, P3 ≥ 0 (nonnegative constraint)

13

Page 14: Note1 Model Formulation

1.18 Orange Juice Company

O. J. Juice Company sells bags of oranges and cartons of orange juice. O. J. grades oranges on a scale of1 (poor) to 10 (excellent). At present, O. J. has on hand 100,000 pounds of grade 9 oranges and 120,000pounds of grade 6 oranges. The average quality sold in a bag must be at least 7, and the average quality ofthe oranges used to make orange juice must be at least 8. Each pound of oranges that is used to producejuice yields a revenue of $1.50 and incurs a variable cost (consisting of labor costs, inventory costs, variableoverhead costs, etc.) of $1.05. Each pound of oranges sold in bags yields revenue of $0.50 and incurs avariable cost of $0.20. Formulate an LP to help O. J. maximize profit.

SolutionDecision variables:x9 = # lbs of oranges sold in a bag from grade 9 orangesx6 = # lbs of oranges sold in a bag from grade 6 orangesy9 = # lbs of orange juice sold in a carton from grade 9 orangesy6 = # lbs of orange juice sold in a carton from grade 6 oranges

Objective function:Max z = (purchasing cost)Constraints:s.t. x9 + y9 ≤ 100000 (maximum grade 9 oranges can be used)

x6 + y6 ≤ 120000 (maximum grade 6oranges can be used)

9x9+6S6

x9+x6≥ 7 (average quality in a bag at least 7)

9y9+6y6

y9+y6≥ 8 (average quality in a juice at least 8)

x9, x6, y9, y6 ≥ 0 (nonnegative constraint)

1.19 Notip Table Company (Rardin, p. 64 )

The Notip Table Company sells two models of its patented five-leg tables. The basic version uses a woodtop, requires .6 hour to assemble and sells for a profit of $200. The deluxe model takes 1.5 hours to assemblebecause of its glass top and sells for a profit of $350. Over the next week the company has 300 legs, 50wood tops, 35 glass tops, and 63 hours of assembly available. Notip wishes to determine a maximum profitproduction plan assuming that everything produced can be sold. Formulate the mathematical programming.will be revisited in the graphical method lecture note.

SolutionDecision variables:x1 = # of basic models producedx2 = # of deluxe models produced

14

Page 15: Note1 Model Formulation

max 200x1 + 350x2

s.t. 5x1 + 5x2 ≤ 300 (available legs)

.6x1 + 1.5x2 ≤ 63 (available labor hours)

x1 ≤ 50 (available wood tops)

x2 ≤ 35 (available glass tops)

x1, x2 ≥ 0 (nonnegative constraints)

15

Page 16: Note1 Model Formulation

2 Overview of Linear Programming

When there is an option, linear constraint and objective functions are preferred to nonlinear ones becauseevery nonlinearity of an optimization model usually reduces its tractability. Unfortunately, linear functionsimplicitly assume that each unit increase/decrease in a decision variable has the same effect as the precedingincrease/decrease: equal returns to scale.

When there is an option, single-objective optimization models are preferred to multiobjective onesbecause conflicts among objectives usually make multiobjective model less tractable.

When there is an option, optimal variable magnitudes are large enough that fractions have no practicalimportance, modeling with continuous variables is preferred to discrete because it is generally moretractable.

Mathematical modeling can be distinguished into several classes:

� Linear Programming (LP): if the objective function and all constraint functions are linear in thedecision variables.

� Nonlinear Programming (NLP): if the objective function or any of the constraint functions is nonlinearin the decision variables.

� Integer Programming (IP): if any one of its decision variable is discrete

– Pure Integer Programming: if all variables are discrete

– Mixed Integer Programming: otherwise

� Integer Linear Programming (ILP): if its objective function and all main constraints are linear and thevariables are integers (may be pure or mixed)

� Integer Nonlinear Programming (INLP): if its objective function or any of its main constraints isnonlinear and the variables are not integers

16

Page 17: Note1 Model Formulation

17