You are on page 1of 33

Mathematical modeling

Operations Research

Applied Math for DS

Son P. Nguyen

UEL
VNU in HCMC

June 9, 2018

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

Table of Contents

1 Mathematical modeling

2 Operations Research

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

SilComputers

SilComputer would like to determine the number of laptops and


desktops produced tomorrow to maximize their profits. Selling
each laptop brings a profit of $750 and selling each desktop brings
a profit of $ 1000. However, the manufacturer have the following
constraints
1 Each computer (laptop or desktop) needs one CPU and the
inventory for CPU is currently at 10 units.
2 Each laptop needs 16MB RAM and each desktop needs 32MB
RAM. The company has 15 units of 16MB RAM in stock.
3 The assembly time for a laptop and a desktop are 4 minutes
and 3 minutes respectively. The total assembly time is 25
minutes
Formulate an LP and solve it to find an optimal solution.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

SilComputers

SilComputer would like to determine the number of laptops and


desktops produced tomorrow to maximize their profits. Selling
each laptop brings a profit of $750 and selling each desktop brings
a profit of $ 1000. However, the manufacturer have the following
constraints
1 Each computer (laptop or desktop) needs one CPU and the
inventory for CPU is currently at 10 units.
2 Each laptop needs 16MB RAM and each desktop needs 32MB
RAM. The company has 15 units of 16MB RAM in stock.
3 The assembly time for a laptop and a desktop are 4 minutes
and 3 minutes respectively. The total assembly time is 25
minutes
Formulate an LP and solve it to find an optimal solution.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

More examples

Consider a restaurant that is open seven days a week. Based


of past experience, the number of workers needed on a
particular day is given as follows:
Day Mon Tue Wed Thu Fri Sat Sun
NUmber 14 13 15 16 19 18 11

Every worker works five consecutive days, and then takes two
days off, repeating this pattern idefinitely. How can we
minimize the number of workers that staff the restaurant.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

More examples (cont.)

The optimality of a portfolio depends heavily on the model used


for defining risk and other aspects of financial instruments. Here is
a particularly simple model anenable to linear programming
techniques.
Consider a mortgage team with $100,000,000 to finance various
instruments. There are five categories of loans, each with an
associated return and risk (1-10, 1 best):

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

More examples (cont.)

Loan/investment Return(%) Risk


First mortgages 9 3
Second mortgages 12 6
Personal Loans 15 8
Commercial Loans 8 2
Government Securites 6 1

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

More examples (cont.)

Any uninvested money goes into a savings account with no


risk and 3% return. The goal for the mortgage team is to
allocate the money to the categories so as to:
Maximize the average return per dollar.
Have an average risk of no more than 5 (all averages and
fractions taken over the invested money (not over the saving
account)).
Invest at least 20% in commercial loans.
The amount in second mortgages and personal loans combined
should be no higher than the amount in first mortgages.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

More examples (cont.)

Any uninvested money goes into a savings account with no


risk and 3% return. The goal for the mortgage team is to
allocate the money to the categories so as to:
Maximize the average return per dollar.
Have an average risk of no more than 5 (all averages and
fractions taken over the invested money (not over the saving
account)).
Invest at least 20% in commercial loans.
The amount in second mortgages and personal loans combined
should be no higher than the amount in first mortgages.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

The Modeling Approach to Problem Solving

Everyone uses models to make decisions.


Types of models:
Mental (arranging furniture)
Visual (blueprints, road maps)
Physical/Scale (aerodynamics, buildings)
Mathematical (what we’ll be studying)

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

Characteristics of Models

Models are usually simplified versions of the things they


represent
A valid model accurately represents the relevant
characteristics of the object or decision being studied

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

Benefits of Modeling

Economy - It is often less costly to analyze decision problems


using models.
Timeliness - Models often deliver needed information more
quickly than their real-world counterparts.
Feasibility - Models can be used to do things that would be
impossible.
Models give us insight & understanding that improves
decision making.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

A Generic Mathematical Model

Y = f (X1 , . . . , Xn )
where
Y = dependent (response) variable (aka bottom-line
performance measure).
Xi = independent (explanatory) variables (inputs having an
impact on Y)
f (·) = function defining the relationship between the Xi & Y

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

Categories of Mathematical Models

Model Cate- Form of f (·) Independent OR tech-


gory Variables niques
Prescriptive, known know or un- LP, Networks,
well-defined der decision’s IP etc.
maker’s con-
trol
Predictive, ill- unknown known or Regression
defined under deci- analysis,
sion maker’s Time series
control analysis etc.

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

Categories of Mathematical Models

Model Cate- Form of f (·) Independent OR tech-


gory Variables niques
Descriptive, Known, unknown or simulation,
well-defined uncertain queueing inventory

Son P. Nguyen Applied Math for DS


Mathematical modeling
Operations Research

The Problem Solving Process

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Table of Contents

1 Mathematical modeling

2 Operations Research
Graphical Method
The simplex method

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

LP model

Let x1 and x2 be the number of laptops and desktops to be


produced (decision variables)
The objective function: z = 750x1 + 1000x2

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

LP model

Let x1 and x2 be the number of laptops and desktops to be


produced (decision variables)
The objective function: z = 750x1 + 1000x2
The constraints:
1 x1 + x2 ≤ 10
2 x1 + 2x2 ≤ 15
3 4x1 + 3x2 ≤ 25
4 Sign constraints: x1 , x2 ≥ 0

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

LP model

Let x1 and x2 be the number of laptops and desktops to be


produced (decision variables)
The objective function: z = 750x1 + 1000x2
The constraints:
1 x1 + x2 ≤ 10
2 x1 + 2x2 ≤ 15
3 4x1 + 3x2 ≤ 25
4 Sign constraints: x1 , x2 ≥ 0

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The first constraint

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The feasible region

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The solution

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The solution is at the intersection point of the two lines

x1 + 2x2 = 15
4x1 + 3x2 = 25

Solve the linear system to get the optimal solution (1, 7)


corresponding to the maximum profit z = $7, 750.

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The solution is at the intersection point of the two lines

x1 + 2x2 = 15
4x1 + 3x2 = 25

Solve the linear system to get the optimal solution (1, 7)


corresponding to the maximum profit z = $7, 750.

Recall
The optimal solution happens on the boundary of the feasible
region.
In particular, it is at a vertex of the feasible region.

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The graphical method

The solution is at the intersection point of the two lines

x1 + 2x2 = 15
4x1 + 3x2 = 25

Solve the linear system to get the optimal solution (1, 7)


corresponding to the maximum profit z = $7, 750.

Recall
The optimal solution happens on the boundary of the feasible
region.
In particular, it is at a vertex of the feasible region.

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Standard form

Convert the SilComputer model into the standard form.

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

The tableau method

The starting tableau

z x1 x2 x3 x4 x5 RHS
λi
1 -0,75 -1 0 0 0 0
0 1 1 1 0 0 10 10
0 1 2 0 1 0 15 15/2
0 4 3 0 0 1 25 25/3

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Example

Starting position

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Example

After step 1

z x1 x2 x3 x4 x5 RHS
λi
1 -1/4 0 0 1/2 0 15/2
0 1/2 0 1 -1/2 0 5/2 5
0 1/2 1 0 1/2 0 15/2 15
0 5/2 0 0 -3/2 1 5/2 1

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Example

After step 1

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Example

z x1 x2 x3 x4 x5 RHS
λi
1 0 0 0 4/5 1/10 7.75
0 0 0 1 1/4 -1/5 2
0 0 1 0 5/4 -1/5 7
0 1 0 0 -3/5 2/5 1

The solution is optimal

Son P. Nguyen Applied Math for DS


Mathematical modeling Graphical Method
Operations Research The simplex method

Example

The optimal solution

Son P. Nguyen Applied Math for DS

You might also like