0% found this document useful (0 votes)
3 views

02 Chapter

The document discusses operations research and linear programming, focusing on modeling with two-variable linear programming through examples such as Reddy Mikks' paint production and Ozark Farms' feed mix. It outlines the steps for defining decision variables, objectives, and constraints, and introduces graphical solutions and computer solutions using Java and CPLEX. Additionally, it presents various applications of linear programming in real-world scenarios, including bank loan models, production planning, and urban development.

Uploaded by

mahmutcelik1618
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

02 Chapter

The document discusses operations research and linear programming, focusing on modeling with two-variable linear programming through examples such as Reddy Mikks' paint production and Ozark Farms' feed mix. It outlines the steps for defining decision variables, objectives, and constraints, and introduces graphical solutions and computer solutions using Java and CPLEX. Additionally, it presents various applications of linear programming in real-world scenarios, including bank loan models, production planning, and urban development.

Uploaded by

mahmutcelik1618
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

Operations Research An Introduction

Tenth Edition

Chapter 2
Modeling with Linear
Programming
2.1. Two-variable LP model
• An Example Maximization Problem: Reddy Mikks produces both
interior and exterior paints from two raw materials, M1 and M2.

• The following table provides the basic data of the problem:

• The daily demand for interior paint cannot exceed that for exterior
paint by more than 1 ton.

• Also, the maximum daily demand for interior paint is 2 tons.


2.1. Two-variable LP model
• Reddy Mikks wants to determine the optimum (best) product mix
of interior and exterior paints that maximizes the total daily profit.

• All OR models, LP included, consist of three basic components:


1. Decision variables that we seek to determine.
2. Objective (goal) that we need to optimize (maximize or minimize).
3. Constraints that the solution must satisfy.

• Step 1: Defining Decision variables.


• For the Reddy Mikks problem, we need to determine the daily
amounts of exterior and interior paints to be produced. Thus the
variables of the model are defined as:
2.1. Two-variable LP model
• Step 2: Defining Objective (Goal).

• The goal of Reddy Mikks is to maximize (i.e., increase as much as


possible) the total daily profit of both paints. The two components
of the total daily profit are expressed in terms of the variables x1
and x2 as:

Letting z represent the total daily profit , The objective (or goal)
of Reddy Mikks is expressed as:
2.1. Two-variable LP model
• Step 3: Defining Constraints.

• The raw material restrictions are expressed verbally as

The maximum daily availabilities of raw materials M1 and M2 are


24 and 6 tons, respectively. Thus, the raw material constraints:
2.1. Two-variable LP model
• Step 3: Defining Constraints.

• The daily demand for interior paint cannot exceed that for exterior
paint by more than 1 ton. So that:

• The maximum daily demand for interior paint is 2 tons.

• Nonnegativity constraint: An implicit restriction requires (all)


the variables, x1 and x2, to assume zero or positive values
only. So:

x1 ≥ 0 and x2 ≥ 0
2.1. Two-variable LP model
• The complete Reddy Mikks model is:
2.1. Two-variable LP model
• Any values of x1 and x2 that satisfy all five constraints constitute a
feasible solution.

• For example, the solution x1 = 3 tons per day and x2 = 1 ton per
day is feasible because it does not violate any of the five.

• On the other hand, the solution x1 = 4 and x2 = 1 is infeasible


because it does not satisfy at least one constraint.

• The goal of the problem is to find the optimum, the best feasible
solution that maximizes the total profit z.

• First, we need to show that the Reddy Mikks problem has an


infinite number of feasible solutions, a property that is shared by
all nontrivial LPs.

• Hence the problem cannot be solved by enumeration.


2.2. Graphical Solution
• The graphical solution includes two steps:

1. Determination of the feasible solution space.

2. Determination of the optimum solution from among all the points in


the solution space.
Feasible Space of the Reddy Mikks Model

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Optimum Solution of the Reddy Mikks Model

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
2.2. Graphical Solution
• Remarks:

• In practice, a typical LP may include hundreds or even


thousands of variables and constraints. Of what good then is
the study of a two-variable LP?

• The answer is that the graphical solution provides a key


result: The optimum solution of an LP, when it exists, is
always associated with a corner point of the solution space,
thus limiting the search for the optimum from an infinite
number of feasible points to a finite number of corner points.

• This powerful result is the basis for the development of the


general algebraic simplex method presented in Chapter 3.
Diet Problem
• An Example Minimization Problem: Ozark Farms uses at least 800
lb of special feed daily.

• The special feed is a mixture of corn and soybean meal with the
following compositions:

• The dietary requirements of the special feed are at least 30%


protein and at most 5% fiber. The goal is to determine the daily
minimum-cost feed mix.
Diet Problem
• The decision variables of the model are:

• The objective is to minimize the total daily cost (in dollars) of the
feed mix:

• The constraints represent the daily amount of the mix and the
dietary requirements.

• Ozark Farms needs at least 800 lb of feed a day:


Diet Problem
• The amount of protein included in x1 lb of corn and x2 lb of
soybean meal is (.09 x1 + .6 x2) lb. This quantity should equal at
least 30% of the total feed mix (x1 + x2) lb:

• In a similar manner, the fiber requirement of at most 5% is


represented as:

• The constraints are simplified by moving the terms in x1 and x2 to


the left-hand side of each inequality, leaving only a constant on the
right-hand side.
Diet Problem
Graphical Solution of the Diet Model

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
2.3. Computer Solution with Java and CPLEX
• We use Java programming language and Eclipse IDE for the
programming environment.

• We will CPLEX as the solver engine of our problems.


• IBM ILOG CPLEX offers C, C++, Java, .NET, and Python
libraries that solve LP and related problems.

• The CPLEX Interactive Optimizer is an executable


program that can read a problem interactively or from files
,solve the problem, and deliver the solution interactively.

• Concert Technology is a set of libraries offering an API that


includes modeling facilities to allow a programmer to
embed CPLEX optimizers in C++, Java, or .NET
applications. The library is provided in these files:
ilocplexXXX.lib, concert.lib, and cplexXXX.jar, where XXX
represents a version number.
2.3. Computer Solution with Java and CPLEX
• The CPLEX Callable Library is a C library that allows the
programmer to embed CPLEX optimizers in applications
written in C, Visual Basic, Fortran or any other language
that can call C functions.

• CPLEX can be used by students and academicians.

• Programming Setup:
• Please download and install latest Java SE Development Kit.

• Please download and install latest Eclipse IDE.

• Please download and install latest The Visual C++


Redistributable.

• Please register to IBM and download ILOG CPLEX by using


your student account.
2.3. Computer Solution with Java and CPLEX
• ReddyMiks Example
• Please create a new Java Project

• Please add the necessary cplex jar to your Project.


2.3. Computer Solution with Java and CPLEX
2.3. Computer Solution with Java and CPLEX

• Please locate the native library.


2.3. Computer Solution with Java and CPLEX
2.3. Computer Solution with Java and CPLEX
2.3. Computer Solution with Java and CPLEX
• After the program is executed, the output is:
2.4. Linear Programming Applications

• This section presents realistic LP models in which the


definition of the variables and the construction of the
objective function and the constraints are not as
straightforward as in the case of the two-variable model.

• The areas covered by these applications include the


following:

1. Investment.
2. Production planning and inventory control.
3. Workforce planning.
4. Urban development planning.
5. Oil refining and blending.
Example 2.4.1 Bank Loan Model
• Bank One is in the process of devising a loan policy that
involves a maximum of $12 million. The following table
provides the pertinent data about available loans.

• Bad debts (Tr. şüpheli alacak, kötü borç) are unrecoverable


and produce no interest revenue.

• Competition with other financial institutions dictates the


allocation of at least 40% of the funds to farm and commercial
loans.
Example 2.4.1 Bank Loan Model
• To assist the housing industry in the region, home loans must
equal at least 50% of the personal, car, and home loans.

• The bank limits the overall ratio of bad debts on all loans to at most
4%.

• Mathematical Model:
Example 2.4.1 Bank Loan Model

• The objective of the Bank One is to maximize net return, the


difference between interest revenue and lost bad debts.

• For example, when 10% of personal loans are lost to bad debt, the
bank will receive interest on 90% of the loan—that is, it will receive
14% interest on .9x1 of the original loan x1.
Example 2.4.1 Bank Loan Model

• The problem has five constraints:


Example 2.4.1 Bank Loan Model
Example 2.4.1 Bank Loan Model
Example 2.4.1 Bank Loan Model
• The solution from console out of the Java program:
Example 2.4.1 Single Period Production Model
• In preparation for the winter season, a clothing company is
manufacturing parka and goose overcoats, insulated pants, and
gloves.

• All products are manufactured in four different departments:


cutting, insulating, sewing, and packaging. The company has
received firm orders for its products.

• The contract stipulates a penalty for undelivered items.

• Devise an optimal production plan for the company based on the


following data:
Example 2.4.1 Single Period Production Model
Example 2.4.1 Single Period Production Model
• Mathematical Model:

• The objective is to maximize the net profit:

• Let sj represents the shortage in demand for product j


Example 2.4.1 Single Period Production Model
• Total penalty:
• The complete model:
Example 2.4.2 Single Period Production Model
• The solution from console out of the Java program:
Example 2.4.3 Multiple Period Production Inventory
• Acme Manufacturing Company has a contract to deliver 100, 250,
190, 140, 220, and 110 home windows over the next 6 months.

• Production cost (labor, material, and utilities) per window varies by


period and is estimated to be $50, $45, $55, $48, $52, and $50
over the next 6 months.

• To take advantage of the fluctuations in manufacturing cost, Acme


can produce more Windows than needed in a given month and
hold the extra units for delivery in later months.

• This will incur a storage cost at the rate of $8 per window per
month, assessed on end-of-month inventory.

• Develop a linear program to determine the optimum production


schedule.
Example 2.4.3 Multiple Period Production Inventory
• Mathematical model:

• The relationship between these variables and the monthly demand


over the 6-month horizon is represented schematically in Figure
2.9.
Example 2.4.3 Multiple Period Production Inventory
• The objective is to minimize the total cost of production and end-of-
month inventory.

• The objective function for minimization:

• The constraints of the problem can be determined directly from the


representation in Figure 2.9.

• For each period we have the following balance equation:


Example 2.4.3 Multiple Period Production Inventory
Example 2.4.3 Multiple Period Production Inventory
• The solution from console out of the Java program:
Figure 2-10 Optimum Solution of the
Production-Inventory Problem

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Example 2.4.3 Multiple Period Production Smoothing
• A company is planning the manufacture of a product for March,
April, May, and June of next year.

• The demand quantities are 520, 720, 520, and 620 units,
respectively. The company has a steady workforce of 10
employees but can meet fluctuating production needs by hiring and
firing temporary workers.

• The extra costs of hiring and firing a temp in any month are $200
and $400, respectively.

• A permanent worker produces 12 units per month, and a temporary


worker, lacking equal experience, produces 10 units per month.

• The company can produce more than needed in any month and
carry the surplus over to a succeeding month at a holding cost of
$50 per unit per month. Develop an optimal hiring/firing policy over
the 4-month planning horizon.
Example 2.4.3 Multiple Period Production Smoothing
• The permanent workers (10 in all) can be accounted for by
subtracting the units they produce from the respective monthly
demand. The remaining demand is then satisfied through the hiring
and firing of temps. Thus,

• The variables of the model for month i can be defined as:


Example 2.4.3 Multiple Period Production Smoothing
• By definition, xi and Ii are nonnegative, whereas Si is unrestricted in
sign because it equals the number of hired or fired workers in
month i.

• We have the following constraints:


Example 2.4.3 Multiple Period Production Smoothing
• For hiring and firing, the temp workforce starts with x1 workers at
the beginning of March.

• At the start of April, x1 will be adjusted (up or down) by S2 temps to


generate x2. So that, we can write:
Example 2.4.3 Multiple Period Production Smoothing

• Next we develop the objective function. The goal is to minimize the


inventory cost plus the cost of hiring and firing. We write:

• Given the costs of hiring and firing a temp are $200 and $400,
respectively, we have:

• If the variable Si is positive, hiring takes place in month i. If it is


negative, then firing occurs. This “qualitative” assessment can be
translated mathematically by using the substitution:

• We can think of Si- as the number of temps hired and Si+ as the
number fired.
Example 2.4.3 Multiple Period Production Smoothing

• The total cost of hiring and firing as:

• We can now write the complete model!


Example 2.4.3 Multiple Period Production Smoothing
Example 2.4.4 Multiple Period Production Smoothing
• The solution from console out of the Java program:
Bus Scheduling
• Progress City is studying the feasibility of introducing a mass-transit
bus system to reduce in-city driving.

• The study seeks the minimum number of buses that can handle the
transportation needs.

• After gathering necessary information, the city engineer noticed


that the minimum number of buses needed fluctuated with time of
the day, and that the required number of buses could be
approximated by constant values over successive 4-hr intervals.

• Figure 2.11 summarizes the engineer’s findings. To carry out the


required daily maintenance, each bus can operate only 8
successive hours a day.
Figure 2-11 Number of Buses as a Function
of the Time of the Day

Copyright © 2017, 2011, 2007 Pearson Education, Inc. All Rights Reserved
Bus Scheduling
• A reasonable way to accomplish this goal is to allow a shift to start
every 4 hr. Thus, the variables:
Bus Scheduling
• The number of buses for the successive 4-hr periods can be
computed as follows:
Bus Scheduling
• The complete model:
Example 2.4.5 Bus Scheduling
• The solution from console out of the Java program:
Urban Renewal
• The city of Erstville is faced with a severe budget shortage. Seeking
a long-term solution, the city council votes to improve the tax base by
condemning an inner-city housing area and replacing it with a
modern development.

• The project involves two phases: (1) demolishing substandard


houses to provide land for the new development and (2) building the
new development. The following is a summary of the situation.

1. As many as 300 substandard houses can be demolished. Each


house occupies a .25-acre lot. The cost of demolishing a condemned
house is $2000.

2. Lot sizes for new single-, double-, triple-, and quadruple-family


homes (units) are .18, .28, .4, and .5 acre, respectively. Streets, open
space, and utility easements account for 15% of available acreage.
Urban Renewal
3. In the new development, the triple and quadruple units account
for at least 25% of the total. Single units must be at least 20% of
all units, and double units at least 10%.
4. The tax levied per unit for single, double, triple, and quadruple
units is $1000, $1900, $2700, and $3400, respectively.
5. The construction cost per unit for single-, double-, triple-, and
quadruple-family homes is $50,000, $70,000, $130,000, and
$160,000, respectively.
6. Financing through a local bank is limited to $15 million.
How many units of each type should be constructed to maximize
tax collection?
Urban Renewal

The variables of the problem can be defined as follows:

The objective is to maximize total tax collection from homes:

The first constraint of the problem deals with land availability:


Urban Renewal

From the data of the problem, we have:

Each demolished home occupies a .25-acre lot, thus netting .25x5


acres. Allowing for 15% open space, streets, and easements, the
net acreage available is .851.25x52 = .2125x5. So that:

The number of demolished homes cannot exceed 300:


Urban Renewal

The constraints limiting the number of units of each home type.

Mathematical Formulation:
Urban Renewal

The demolition/construction cost:

Expressing all the costs in thousands of dollars, we get:


Urban Renewal
The complete model:

subject to:
Example 2.4.6 Urban Renewal
• The solution from console out of the Java program:
Crude Oil Refining and Gasoline Blending

Shale Oil, located on the island of Aruba, has a capacity of


1,500,000 bbl of crude oil per day.

The final products from the refinery include three types of


unleaded gasoline with different octane numbers (ON):
regular with ON = 87, premium with ON = 89, and super with
ON = 92.

The refining process encompasses three stages:

(1) a distillation tower that produces feedstock (ON = 82) at


the rate of .2 bbl per bbl of crude oil,

(2) a cracker unit that produces gasoline stock (ON = 98) by


using a portion of the feedstock produced from the
distillation tower at the rate of .5 bbl per bbl of feedstock,
Crude Oil Refining and Gasoline Blending

(3) a blender unit that blends the gasoline stock from the cracker unit
and the feedstock from the distillation tower.
Crude Oil Refining and Gasoline Blending

The company estimates the net profit per barrel of the three types of
gasoline to be $6.70, $7.20, and $8.10, respectively.

The input capacity of the cracker unit is 200,000 bbl of feedstock a


day.

The demand limits for regular, premium, and super gasoline are
50,000, 30,000, and 40,000 bbl, respectively, per day.

Develop a model for determining the optimum production schedule


for the refinery.
Crude Oil Refining and Gasoline Blending
Crude Oil Refining and Gasoline Blending
Crude Oil Refining and Gasoline Blending

The objective of the model is to maximize the total profit:

The objective of the model is to maximize the total profit:


Crude Oil Refining and Gasoline Blending

The octane number of a gasoline product is the weighted


average of the octane numbers:

We find:
Crude Oil Refining and Gasoline Blending
Crude Oil Refining and Gasoline Blending
Example 2.4.7 Crude Oil Refining and Gasoline Blending
• The solution from console out of the Java program:

You might also like