You are on page 1of 30

Linear Programming (LP) Problem

 MAX (or MIN): c1X1 + c2X2 + … + cnXn


 Subject to: a11X1 + a12X2 + … + a1nXn <= b1
 :
 ak1X1 + ak2X2 + … + aknXn >= bk
 :
 am1X1 + am2X2 + … + amnXn = bm
Nonlinear Programming (NLP)
 A problem is nonlinear (NLP) if its objective or at least
one constraint are nonlinear.
 NLP problems are formulated and implemented in Excel
in virtually the same way as linear problems.
 However, the mathematics involved in solving NLPs is
quite different than for LPs.
 Solver tends to mask this difference but it is important to
understand the difficulties that may be encountered when
solving NLPs.

2
Possible Optimal Solutions to NLPs
(not occurring at corner points)

3
Possible Optimal Solutions to NLPs
(not occurring at corner points)

4
Possible Optimal Solutions to NLPs
(not occurring at corner points)
Nonlinear objective function
Nonlinear constraints

5
Possible Optimal Solutions to NLPs
(not occurring at corner points)
Nonlinear objective function
Nonlinear constraints

6
The GRG Algorithm
 Solver uses the Generalized Reduced Gradient (GRG)
algorithm to solve NLPs.
 GRG can also be used on LPs but is slower than the
Simplex method.
 And it provides no sensitivity information.
 The following discussion gives a general (but somewhat
imprecise) idea of how GRG works.

7
An NLP Solution Strategy

X2 C D
B E

objective function
level curves

Feasible
Region
A
(the starting point)

X1
8
Local vs. Global Optimal Solutions

X2
Local optimal solution

C
Local and global
F optimal solution
E
Feasible Region
G
B

A
D

X1
9
Local vs. Global Optimal Solution
 Local optimal solution is a solution that is not worse than
its immediate neighboring feasible solutions.
 Global optimal solution (true optimal solution) is a
solution that is not worse than any other feasible solution.
 For NLPs, Solver always finds one of the local optimal
solutions, which may be much worse than the global
optimal solution.
 Conclusion: Whenever possible, use LP models. Their
solutions are always globally optimal.

10
Comments About NLP Algorithms

11
Comments About Starting Points
 The null starting point should be avoided.
 When possible, it is best to use starting values of
approximately the same magnitude as the expected
optimal values.

12
A Note About “Optimal” Solutions
 When solving a NLP problem, Solver normally stops
when the first of three numerical tests is satisfied, causing
one of the following three completion messages to appear:

1) “Solver found a solution. All constraints and


optimality conditions are satisfied.”

This means Solver found a local optimal


solution, but does not guarantee that the
solution is the global optimal solution.

13
A Note About “Optimal” Solutions
 When solving a NLP problem, Solver normally stops
when the first of three numerical tests is satisfied, causing
one of the following three completion messages to appear:

2) “Solver has converged to the current solution.


All constraints are satisfied.”

This means the objective function value


changed very slowly for the last few iterations.

14
A Note About “Optimal” Solutions
 When solving a NLP problem, Solver normally stops
when the first of three numerical tests is satisfied, causing
one of the following three completion messages to appear:

3) “Solver cannot improve the current solution.


All constraints are satisfied.”

This rare message means that your model is


degenerate and the Solver is cycling.
Degeneracy can often be eliminated by
removing redundant constraints in a model.
15
The Economic Order Quantity
(EOQ) Problem
 Involves determining the optimal quantity to purchase
when orders are placed.
 Small orders result in:
 low inventory levels & carrying costs
 frequent orders & higher ordering costs
 Large orders result in:
 higher inventory levels & carrying costs
 infrequent orders & lower ordering costs

16
Economic Order Quantity

D = annual demand for the item =150


Q = order quantity = 50

D/Q = # of orders per year = 3


Q/2 = Average Inventory = 25
17
Sample Inventory Profiles
Inventory
60
Annual Usage = 150 Number of Orders = 3
50 Order Size = 50 Avg Inventory = 25

40

30

20

10

0
0 1 2 3 4 5 6 7 8 9 10 11 12 Month
Inventory
60
Annual Usage = 150 Number of Orders = 6
50 Order Size = 25 Avg Inventory = 12.5

40

30

20

10

0
0 1 2 3 4 5 6 7 8 9 10 11 12 Month
18
The EOQ Model
D Q
Total Annual Cost = DC  S  C i
Q 2
 Assumptions:
 Demand (or use) is constant over the year.
 New orders are received in full when the inventory level drops to
zero.
 where:
 D = annual demand for the item
 C = unit purchase cost for the item
 S = fixed cost of placing an order : Setup/Ordering cost
 i = cost of holding inventory for a year (expressed as a % of C)
 Q = order quantity

19
EOQ Cost Relationships
$

1000

800 Total Cost

600

400 Carrying Cost

200 Ordering Cost


EOQ
0
0 10 20 30 40 50
Order Quantity
20
An EOQ Example:
Ordering Paper for MetroBank
 Alan purchases paper for copy machines and laser printers
at MetroBank.
 Annual demand (D) is for 24,000 boxes
 Each box costs $35 (C)
 Each order costs $50 (S)
 Inventory carrying costs are 18% (i)
 What is the optimal order quantity (Q)?

See file EOQ NLP

21
The Model
D Q
MIN : DC  S  C i
Q 2
Subject to: Q  1

 (Note the nonlinear objective!)

22
Comments on the EOQ Model
 Using calculus, it can be shown the optimal value of Q is:

* 2DS
Q 
Ci

 Numerous variations on the basic EOQ model exist


accounting for:
 quantity discounts
 storage restrictions
 backlogging
 etc.

23
Location Problems
 Many decision problems involve determining optimal locations
for facilities or service centers. For example:
 Manufacturing plants
 Warehouse
 Fire stations
 Ambulance centers
 These problems usually involve distance measures in the
objective and/or constraints.
 The straight line (Euclidean) distance between two points
(X1,Y1) and (X2,Y2) is:

Distance  X 1  X 2   Y1  Y2 
2 2

24
A Location Problem:
Rappaport Communications
 Rappaport Communications provides cellular phone
service in several mid-western states.
 They want to expand to provide inter-city service between
four cities in northern Ohio.
 A new communications tower must be built to handle
these inter-city calls.
 The tower will have a 40 mile transmission radius.

25
Graph of the Tower Location Problem
Y
50
Cleveland
x=5, y=45
40

30
Youngstown
Akron
x=12, y=21 x=52, y=21
20

10
Canton
x=17, y=5
0
20 30 40 50 60
X
0 10
26
Defining the Variables and the Objective
Function
 X1= location of the new tower with respect to the X-axis
 Y1 = location of the new tower with respect to the Y-axis

 Minimize the total distance from the new tower to the


existing towers

MIN:        
5-X
1
2
 45  Y
1
2
 12 - X
1
2
 21  Y
1
2

       
 17 - X
1
2
 5 Y
1
2
 52 - X
1
2
 21  Y
1
2

27
Defining the Constraints
 Cleveland
5 - X1 2  45  Y1 2  40
 Akron

12 - X
1
 
2
 21  Y
1
2
 40

 Canton
 17 - X
1
  
2
 5 Y
1
2
 40

 Youngstown
   
52 - X
1
2
 21  Y
1
2
 40

28
Analyzing the Solution
 The optimal location of the “new tower” is in virtually the
same location as the existing Akron tower.
 Maybe they should just upgrade the Akron tower.
 The maximum distance is 39.8 miles to Youngstown.
 This is pressing the 40 mile transmission radius.
 Where should we locate the new tower if we want the
maximum distance to the existing towers to be
minimized?

29
Comments on Location Problems
 The optimal solution to a location problem may not work:
 The land may not be for sale.
 The land may not be zoned properly.
 The “land” may be a lake.
 In such cases, the optimal solution is a good starting point
in the search for suitable property.
 Constraints may be added to location problems to
eliminate infeasible areas from consideration.

30

You might also like