mis775 decision modelling for business analytics module 2 ... · analytics module 2 topic 7 :...

33
MIS775 Decision Modelling for Business Analytics MODULE 2 TOPIC 7 : Nonlinear Programming

Upload: others

Post on 06-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

MIS775 Decision Modelling for Business Analytics

MODULE 2TOPIC 7 : Nonlinear Programming

Page 2: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

TOPIC 7 : Nonlinear Programing (NLP)

• NLP problem is similar to an LP problem as it is composed of an objective function and  constraints.

• LP and ILP assume that an optimisation problem’s objective function and constraints are linear.

• Yet, in many real world business problems, the objective function and/or one or more constraints may be nonlinear. 

• NLP problem differs to an LP problem as it includes at least one nonlinear function, which could be the objective function or  some or all of the constraints.

• In practice, NLP models are difficult to solve and should be used with a lot of caution.

This topic focuses on and the challenges involving in solving NLP business problems.

2

Page 3: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

LEARNING OUTCOMES

1. Understand the differences between LP and NLP business problems.2. Examine the reasons for why NLP problems are difficult to solve. 3. Understand the process of formulating, implementing and solving NLP 

business problems in a spreadsheet.4. Understand the difficulties we might encounter when solving NLP problems.5. Understand how to setup NLP problems on a spreadsheet and solve them 

using Excel’s Solver.

3

Page 4: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

NON‐LINEAR PROGRAMMING (NLP)

• In many optimisation  problems,  the objective  function  is non‐linear  in its variables, and contains terms that include  products  of variables : e.g. Objective function and/or constraints contain squared terms (such as X2). For example:

Maximise P = 3x2 ‐‐5xy + 6ysubject to x>= 0, y>= 0, x<= 10, y<= 6

• Many business processes behave in a non‐linear manner: for example, the demand for a product is usually a non‐linear function of the price. The price of a bond is a nonlinear function of the interest rate.

4

Page 5: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

GRAPHICAL ANALYSIS OF NLP PROBLEMS 2 DECISION VARIABLES

• Example: Let us construct a graph of feasible region of the following problem:

Objective function to be minimised:  14 14

Subject to:    8 9 ≤ 49;2 13

24    X1, X2 ≥ 0

5

X1

X2

Feasible Region

X1+X2 ≤ 24

X1≥ 2 and X2 ≤ 13

8 9 ≤ 49Equation for a circle; center(8,9) and radius = 7

X1, X2 ≥ 0

We plot each of the constraints and locate the feasible region:

Page 6: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

• Plot the Objective function to be minimised:  14 14

6

The optimal solution of this problem is (12, 12) i.e. point in the feasible region that is closest to the point (14, 14). 

X2

X1

(14,14)

(12,12)

If we want to show a 2‐dimension function to illustrate ideas in NLP, how do we show the 3rd dimension for the function value?  One easy way is to use a contour plot! 

‐ A contour plot is a graphical technique for representing a 3‐dimensional surface. ‐ Contour lines connect a set of points that all have the same value of the function.

Note: We need n+1 dimensions to illustrate an n dimensional function. The added dimension is for the function value itself. e.g. two dimensions to show a 1‐dimension function (f(X) =2X+1): 

Horizontal axis is for the variable X 

Vertical axis is for the value of the function f(X).

Contour plot of the objective will be an expanding ring of circles that are all centered at the point (14,14).

GRAPHICAL ANALYSIS OF NLP PROBLEMS 2 DECISION VARIABLES

Feasible Region

Page 7: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

GRAPHICAL ANALYSIS OF NLP PROBLEMS 2 DECISION VARIABLES

7

If the objective function was 16 14 , then the optimal 

point (13, 11) is at the intersection of the   13 and  24.  

X2

X1

(8,8)

Contours are centered at (8, 8).

If the objective function was 8 8 , then the optimal 

solution occurs at the point (8, 8). 

X2

X1

(16,14)

Contours are centered at (16, 14).

• When the optimal solution occurs on the boundary of the feasible region, the optimal solution will be where the best contour of the objective function touches the feasible region.

Feasible Region

Feasible Region

Page 8: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

Categories of Nonlinear Programing (NLP) Problems:1. Linear objective function; Nonlinear and/or linear constraints

8

NON‐LINEAR PROGRAMMING (NLP)

* Plots reference: Spreadsheet Modelling and Decision Analysis

The boundary lines of the feasible region for this problem are not all straight lines. The unique optimal solution to this problem occurs at a solution that is not a corner point of the feasible region.

objective function level curve

Optimal solution

Page 9: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

2. Nonlinear objective function; Nonlinear and/or linear constraints

9

NON‐LINEAR PROGRAMMING (NLP)

* Plots reference: Spreadsheet Modelling and Decision Analysis

The optimal solution to this NLP problem occurs at a solution that is not a corner point of the feasible region—even if all the constraints are linear

The optimal solution to this problem occurs at a point in the interior of the feasible region.

The optimal solution to this NLP problem occurs at a solution that is not a corner point of the feasible region

objective function level curve

Optimal solution

objective function level curve

Optimal solution

objective function level curve

Optimal solution

• The optimal solution of a NLP problem doesn’t needs to occur at a corner point nor even on the boundary of the feasible region.

Page 10: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

Computational Procedures for NLP problems:• Computational procedures to solve many NLP problems do not always yield an optimal solution in a finite number of steps.

• NLP problems are a challenge to solve exactly, and iterative numerical methods are used. 

• An algorithm  chooses a direction for search and then finds the best value of the objective function in that direction. The process then repeats until there is no improvement in the objective function value

• A simplistic explanation of such methods is as follows: ‒Start with a “guess” at a solution (which is called starting point) , and then iterate as follows: ‒check whether the guess can be improved by moving a little; if so, move; otherwise stop.

• It is a bit like climbing  a hill.  One way to climb is to look around,  work  out the direction  of steepest ascent, and move a few steps in that direction  – the steeper the slope, the more steps you take before repeating the process.  

Eventually (you hope) you reach the summit! What can go wrong??

10

SOLVING NLP PROBLEMS

Page 11: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

GENERALIZED REDUCED GRADIENT (GRG) ALGORITHM

• As a general statement, the GRG method is designed for NLP problems that the objective functions and constraints are smooth – no jagged jumps.

• Smooth functions have a unique defined slope or gradient at every point. Graphically, a smooth function of a single variable can be plotted as a single continuous line with no abrupt bends or breaks.

• Non‐smooth functions include non‐differentiable and discontinuous functions. Graph of the function may have discontinuities/holes or may have sharp edges/angles. Example: The absolute value of a variable. 

• Since it is unable to compute the gradient of a function at points where the function is discontinuous, or to compute curvature information at points where the function is non‐smooth, it cannot guarantee that any solution it finds to such a problem is truly optimal.

11

If your model includes discontinuous or non‐smooth functions, your simplest course of action is to use the Evolutionary Solving method to find a “good” solution.

• In general, smooth NLP problems are easier to solve than non‐smooth NLP problems.

Page 12: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

NLP NON‐SMOOTH MODEL: EVOLUTIONARY ALGORITHM 

• Best suited for non‐smooth NLP problems (NSP). This method makes no assumption about the nature of the objective function.

• Is called a heuristic procedure! A systematic procedure based on Darwin’s theory of evolution and a class of solution technique called genetic algorithms. Algorithms inspired by biological evolution and naturally occurring optimisation dynamics.

• Works with a set of specialised parameters. Our suggestions for setting these parameters are merely a starting point.  In general, we use one set of choices at the start and other settings in subsequent runs, as we look to improve the solution.

• Practice and experience using evolutionary method are the key ingredients in effective parameter selection.

• At best, the Evolutionary method – like other genetic or evolutionary algorithms – will be able identify good solutions, but not guaranteed optimal solutions.

• “Good” Versus “Optimal” Solutions:‒ When you use the Evolutionary method, you may find – like other users of genetic and evolutionary algorithms – that you spend a lot of time running and re‐running Solver, trying to find better solutions.

‒ You can never be sure whether you’ve found the best solution.‒ When the Evolutionary method stops, you may find that, if you keep the resulting solution and restart the Evolutionary method, it will find an even better solution.

12

Page 13: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

NLP SOLVERS 

13

• The challenges to solve NLP problems with those algorithms are : i. finding the initial guess; ii. checking whether  an improvement is possible;iii. working out how to move – direction and amount (ie, slightly changing the values of the 

variables in a way that improves the value of the objective function).

Working out how to do all this requires advanced maths. Fortunately, the difficulties of this are hiddenaway behind “solvers” implemented on computers, including in Excel!!

• Two Possible Solver Methods in Excel are available:  GRG Nonlinear (one of the most robust nonlinear programming methods) method Evolutionary solver method 

Page 14: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

WHY ARE NLP PROBLEMS INHERENTLY MUCH MORE DIFFICULT TO SOLVE?

1. Locally optimal solution Vs Globally optimal solution– Within each feasible region, there may be more than one 

"peak" (if maximizing) or "valley" (if minimizing).– Because of these possibilities, nonlinear optimization 

methods can make few guarantees about finding the "true" optimal solution.

– It is difficult to know whether there exists a different and better local maximum, or even how to proceed towards it.  Thus, there is no way to easily determine where the global optimum is.

– A local optimum is a feasible point that optimise the objective function in a small neighbourhood around it. 

– The global optimum is the point with the one that beats all points in the feasible region. Note that the global optimum will also be a local optimum.

Local maximum

Global maximum

Local maximum

2. Optimisation problems with convex feasible region and convex objective functions are easier to solve to global optimum

– Convex function: a line connecting two points on the function falls inside the function.

Non‐Convex function

Convex function

Page 15: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B 15

3. There  may  be multiple  disconnected feasible regions (valleys and peaks). 

– Since nonlinear constraints can twist and curve, a NLP may have more than one feasible region, or set of similar values for the decision variables, where all of the  constraints are satisfied. 

– So even if you are able to find the optimum  within  a  particular feasible  region,  how  do  you  know  that  there  isn't  some  other  disconnected feasible region that you haven't found and explored?   

Multiple disconnected feasible regions

4. It is difficult to satisfy equality constraints (and to keep them satisfied)– In LP, the algorithm finds a feasible solution that satisfies all of the linear constraints (including the equalities), and thereafter these are never violated. 

– In NLP, finding a feasible solution that satisfies curving and twisting equations is difficult in and of itself.– But even if a feasible solution is found at some point, the equality may again be violated when the algorithm tries to move to another point that has a better objection function value.

5. Different starting points may lead to different final optimal solutions– This is related to the way in which nonlinear solvers work. They typically descend to the bottom of whatever valley the starting point happens to be in. Because there may be multiple different valleys, starting at some other point may return a different final solution point and objective function value. 

– The difficulty is compounded worse when the NLP problem is constrained. Because the multiple local optimum values may be in disconnected feasible regions! 

– One option is to simply try restarting the solver from many different initial points, but this can be quite time‐consuming.

WHY ARE NLP PROBLEMS INHERENTLY MUCH MORE DIFFICULT TO SOLVE?

Page 16: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

6. It may be difficult to find a feasible starting point.– LP techniques either find a point that satisfies all of the constraints (and hence is feasible), or they accurately determines that no feasible points exist anywhere. We have no such guarantees in NLP.  Most NLP procedures try to minimize some measure of the total infeasibility,

– We can try restarting the NLP procedure from multiple different starting points.– But if we never find a feasible point, we are still left unsure as to whether the model is actually infeasible, or whether it is feasible but we simply didn't start the solver in the right place.

7. Different algorithms and solvers arrive at different optimal solutions (and outcomes) for  the same formulation.

– Almost all NLP algorithms proceed in a step‐wise fashion, iteratively improving the initial point until certain stopping conditions are met.   

– But each algorithm will likely have a completely different trajectory of points from the initial point to the final point that is output as the solution. 

– This means that different algorithms may terminate at different local optimum, and hence will return different optimal solutions and outcomes, even for the exact same formulation and initial point. 

– Some algorithms may terminate successfully at local optimum while others move off in different directions and are unable to even find a feasible point, so the optimal solutions and outcomes are completely different. 

– Even worse, different implementations of the same algorithm (i.e. different solvers) may also give different results due to different choices of parameters and internal heuristics!

16

WHY ARE NLP PROBLEMS INHERENTLY MUCH MORE DIFFICULT TO SOLVE?

Page 17: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

8. An optimum (local or global) solution is not restricted to extreme points.– In an LP problem, we need only check the extreme points, or corner points of the feasible region to look for the 

optimum solution. – In a NLP problems, an optimum (local or global) could be anywhere: at an extreme point, along an edge of the 

feasible region, or in the interior of the feasible region.

9. There is no definite determination of the outcome– In LP, the solver (generally) has only a couple of outcomes:  (i) the model is feasible and there is a globally optimum solution,  (ii) the model is unbounded, or (iii) the model is infeasible. 

– Things are much less certain for NLP. – The solver may report an optimum, but at best it can check certain conditions to guarantee that the point is a local optimum. We are unable to say whether the point is a global optimum. 

– NLP model may also continue improving the value of the objective function for a long time, but will not be able to say whether the model is unbounded.  

10. It is difficult to determine whether the conditions to apply a particular solver are met.– Many NLP  methods/algorithms  require  that  the  functions  in  the  NLP model  have  particular characteristic,  which  could  relate  to their shape (e.g. convexity).   

– The problem is that it is often difficult in practice to determine whether these conditions are satisfied or not. – There are very few tools for assessing models prior to selecting the solution algorithm and associated NLP solver.  

17

WHY ARE NLP PROBLEMS INHERENTLY MUCH MORE DIFFICULT TO SOLVE?

Page 18: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

THINGS THAT WE CAN DO TO INCREASE THE PROBABILITY OF A SUCCESSFUL SOLUTION:

• Use different algorithms/methods.  This will give you a better chance of finding a solution if your first choice fails. 

• A simpler formulation of NLP model. Sometimes a nonlinear function can even be reduced to a linear form and solved by an LP by simple reformulation. Perhaps, the best way to deal with NLP problems is to try to reduce them into a form that is linear or almost linear!

• Know the characteristics of your model before choosing a solution algorithm. — For example, is it composed entirely of quadratic functions?  If so, then there are 

specialized and highly effective algorithms for solution. — Perhaps you can apply software to determine the shapes of the constraint and 

objective functions.• Reasonable bounds on all variables. This narrows the search space so the method does not spend a lot of time exploring useless regions of the variable space. 

• Make the best use of the solver parameter settings. Many of the default settings for the parameters in a given solver have been carefully tuned to give the best performance over a broad range of model types (usually best to leave them alone).

• A good starting point. If  Solver finds the same solution from many different initial solutions, that should increase our confidence that we have found the global optimum. 

18

Page 19: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

NLP APPLICATION

‐ Portfolio Optimisation

‐ Production Mix and Pricing

‐ Facility Location: involves determining the location of facilities or 

service centres to minimise the distance between 2 or more points

19

Page 20: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

PORTFOLIO OPTIMISATION: RISK AND RETURN

• Investors seek to purchase a variety of securities in order to achieve a good return (profit)  through the increase in value of the investment.

• Individual assets vary in value from minute tominute, and whilst over time they may be almostguaranteed to grow in value, their journey is one of value fluctuations

• If the investor cannot be fully in control of when to sell an investment, there is no guarantee ofavoiding sale when there is a negative fluctuation in place

• The possibility of such fluctuations represents  risk to the investor• Accordingly, investors wisely choose to invest in a portfolio of assets, ideally whose total

value is less liable to fluctuation than are the individual assets• In this topic we will look at a number of strategies based on optimisation that can be used to

choose assets to include in a portfolio• What is portfolio? Aportfolio isa collectionof investmentsheldbyapersonor organisation

• In choosingassetsfor a portfolio, we consider:

– What is the objective: maximisereturn (capital or income),minimiserisk?– What should the investmentsbe? – are there preferred companies, sectors; what

about government bonds,property?

– In whatproportion should they be held?

– Etc.20

Page 21: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

BALANCING RETURN AND RISK

• The “EfficientMarket Hypothesis”states there is a trade‐‐off between Risk and Return. The idea is essentially to ensure that if one or more stocks decline in value, there are others which will rise in value at the same time.

• Some obviouschoices for optimisation:– Maximise return: subject to a constraint on risk that is acceptable– Minimise risk: subject to a minimum return that has to be achieved– Maximise “Sharpe Ratio” (Adjusted Return/Risk): i.e risk adjusted return,meaning 

that for a given amount of risk assumed, the return is maximised. (The AdjustedReturn is the actual return, less the risk‐‐free return. To date, Australian regulatorshave used Commonwealth Government bonds as proxies for the risk‐‐free asset, andthese establish the risk free return rate to be assumed in computing the ratio.  Theratio measures the amount of real return achieved per unit of risk accepted.)

21

Page 22: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

MEASURES OF RETURN AND RISK

Measures of Return• The return of an investment item over a time period is given by 

(value new – value old )/ value old

• Typically the time period chosen will be a year, or a month.• Over a longer period – in our case several years – we are interested tomeasure the mean of

the monthly returns. Such a mean provides a single statisticmeasure of the return achievedon the investment item.

Measures of Risk• Risk reflects the chance that the actual return on an investmentmay be different than the

expected return.• The standardmethod to measure risk is to calculate the variance and standard deviation

of actual returns. Again these may be based on recent history.

22

Measures  the extent to which individual  returns, overtime, deviate from the average return over that period of time. High variability = high risk.

Page 23: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

PORTFOLIO RETURN AND RISK

• The overall returnof a portfolio is the weighted average of the component returns:

• For a portfolioconsisting of two assets, we have:

E[Rp] = w1E[R1] + w2E[R2] (here w1 + w2 = 1; the sum of the weights is always 1)

• If wehave an equallyweightedportfolio of   stock A (expected return 12.5%) and stock B (e.r =20%), then the expectedreturn of the portfolio is: E[Rp] =.50(.125) + .50(.20) = 16.25%

• If wehave a portfolioof75% of stock A and 25% of stock B, then the expected return of the portfolio is: E[Rp] =.75(.125) + .25(.20) = 14.38%

23

• The overall risk of a portfolio ISNOT a linear combination ofthe risks of the individual components.

• Computing the overall portfolio risk involves amore complex risk calculationbasedon how stocksmove relativeto each other (variance, covariance, correlation).

A simple optimisationproblemhere might be :What mix of assets 1 and 2 yields the lowest risk?We see from the graph that it is about70% of Asset 1.

Page 24: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

CALCULATING THE OPTIMUM

• The portfolio standard deviation is given by

2 ,  

: proportion of the portfolio invested in asset 1: proportion of the portfolio invested in asset 2: Asset 1 standard deviation of returns: Asset 2 standard deviation of returns

, : correlation coefficient between the returns of Asset 1 and Asset2

• The optimisation problem is to minimise the portfolio standard deviation subject to w1 +w2 = 1; w1 >= 0; w2 >= 0

• Note that the objective function is not at all linear!

24

Page 25: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

PORTFOLIO STANDARD DEVIATION (GENERAL)

25

Observe that we can computethe portfolio SD if we knowthe individual asset standard deviations, and the correlation coefficientsbetween each pair of individual assets.

Page 26: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

APPLICATIONS OF NLP: INVESTMENT PORTFOLIO MANAGEMENT 

A financial planner for Happy Investments faces a task of how to design a portfolio of assets of stocks in Company A, Company B, and Company C. To meet the needs of their investors most efficiently, he would like to minimise the risk associated with the portfolio.  He has collected data and estimated the expected returns on these stocks as well as standard deviation and correlation matrix on these stocks. 

Note: The risk of the portfolio is measured by the standard deviation of the annual return of the portfolio, which is 

2 2 2 2 ,   2 ,   2 ,  

A,B and C are the fractions of investment $s invested in Company A, B and C respectively.

Suppose that he would like to have an expected rate of return on their portfolio of 11%,  which fraction of its investment  ($) to invest in each of the three firms?

26

Asset Annual Expected Return (%)

Standard deviation of Return (%)

Correlation Matrixbetween annual returns

Company A RA = 11 4 1

Company B RB =14 4.69 0.106 1

Company C RC =7 3.16 -0.395 0.067 1

Corr(RA, RB) = 0.106Corr(RA, RC) = -0.395Corr(RB, RC) = 0.067

Page 27: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

Decision variables: A, B and CObjective function: MinimiseConstraints:  A+B+C =1  (The fraction constraint)

11A+14B+7C ≥ 11  (The target return constraint)A,B,C ≥ 0  (The non‐negativity constraint)

An alternative version of the portfolio problem:• Instead of minimising the risk of the portfolio subject to meeting a given minimal expected 

annual return (%), he wants to assemble the portfolio in order to maximise the rate of expected annual return subject to a condition that limits the standard deviation of the investment portfolio ( ) to be no more than a pre‐set percentage, for example 3.1%.

The resulting NLP problem:Decision variables: A, B and CObjective function: Maximise 11A+14B+7C Constraints: A+B+C =1.0  (The fraction constraint)

16 2 22 2 10 2 6 2 10  ≤ 3.1      (The target risk constraint)A,B,C ≥ 0  (The non‐negativity constraint)

27

Applications of NLP: Investment Portfolio Management

16 2 22 2 10 2 6 2 10

Linear Constraints

Nonlinear Objective function

Linear Objective function

Linear and NonlinearConstraints

Page 28: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

Wrenches Hammers Availability Steel (kg) 1.5 1 27,000Moulding Machine (hours) 1 1 21,000Assembly Machine (hours) 0.3 0.5 9,000Production Cost ($ per 1000 units) $1000 $1200

APPLICATIONS OF NLP: PRODUCTION MIX AND PRICING DECISIONS

A privately held firm competes in the consumer and industrial market for construction tools. It operates several manufacturing plants and one of them only produces hammers and wrenches. Hammers and wrenches are made from steel and the production process involves moulding the tools on the moulding machine and then assembling the tools on an assembly machine.  Machine capacities, requirements and daily  variable cost of producing hammers and wrenches are as follows:

The demand for each tool will be a function of the selling price that the firm sets for each tool. Suppose that regression analysis and possible other forecasting methods have been used to estimate the effects of setting the selling prices of wrenches (SW) and hammers(SH) in $ per 1000 units on the demand for hammers and wrenches. Estimated demand for wrenches (DW) and hammers (DH) respectively: 

DW = 565 – 0.50SWDH = 325 – 0.25SH

28Formulate this optimisation problem

Page 29: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

• If we define W and H to be the number of wrenches and hammers produced per day, in 1000s respectively. 

• The objective function which is the total profit is now expressed as: Total profit = W*(SW ‐1000) + H*(SH ‐1200).

• The NLP model is:Decision variables:   W, H, SW, SHObjective function:  Maximise W*(SW ‐1000) + H*(SH ‐1200) Constraints:  1.5W+H  ≤ 27 (The Steel constraint)

W+H  ≤   21 (The Moulding constraint)0.3W+0.5H  ≤  9 (The Assembly constraint)W ≤ 565 – 0.50SW (The Demand constraint for wrenches)H ≤  325 – 0.25SH (The Demand constraint for hammers)W, H, SW, SH ≥ 0 (The non‐negativity constraint) 

29

APPLICATIONS OF NLP: PRODUCTION MIX AND PRICING DECISIONS

Page 30: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

APPLICATIONS OF NLP: FACILITY LOCATION

A company distributes specialty paper to stores in 4 major metropolitan areas                                          and plans to consolidate its warehouses into one national distribution centre. • To identify a suitable site, logistic manager first maps the 4 stores on a two‐dimensional grid, so that coordinates (X, Y) can associated with each site. 

• The daily number of deliveries that must be made to each sales centre from the new distribution centre, as well as the (x, y) coordinates of each of the sales centre are tabulated below: 

Suppose that truck delivery costs are $1 per km for trucks that travel between the                        distribution centre and the sales centres. The company wishes to determine where to locate the new distribution centre, so as to service the sales centres with the lowest cost. 

30

Shows the relative location of each of these sales centres in the coordinate plane, where each unit is a one km.

Sales Centre

Daily number of truck deliveries

X coordinate

Y coordinate

A 9 8 2B 7 3 10C 2 8 15D 5 14 13A

B

CD

Page 31: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

• Let P = (x, y) be the location of the new distribution centre in the coordinate plane. Then, the distance from P to sales center A  is given by the distance formula:  8 2 . 

• The straight‐line distance (also known as the Euclidean distance) between two points (x1, y1) and (x2, y2) =  x1 x2 y1 y2 2)

• For any distribution centre site (x, y), it is possible to calculate the distance from the new distribution centre to each of the stores and to sum the distances. 

• This total can be thought as a proxy for the total annual cost incurred, since they will make regular trips to the individual stores. 

• Minimizing the sum of distances therefore represents an objective that is consistent with Minimising annual distribution cost. Company wishes to determine the location that achieves the minimum sum of distances. 

31

• Since sales centre A must receive 9 truck deliveries per day, the travel cost associated with the sales centre A is given by: 2*9  8 2 . 

• The number “2” appears above because each truck must travel to the sales centre from the distribution centre and back again. i.e. 9 round trips or 18 one‐way trips.

• If we derive the travel cost associated with the other three sales centres in a similar manner, the total travel Cost: 2*9  8 2 2 +2*7  3 10 2+2*2  8 15 2+2*5 

14 13 2

APPLICATIONS OF NLP: FACILITY LOCATION

Page 32: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

NLP Model:  The coordinate values  x and y of the location P of the distribution centre that will yield the minimum value of the daily travel costs subject to the constraints that the point P must lie in the four‐sided region. 

Decision variables:  x, yObjective function: minimise 

Constraints: X ≥ 10Y ≥ 5 Y ≤  11X ≤ 29X ≥ 11 X,Y ≥ 0         The non‐negativity constraint 

32

C

B

A

D

Suppose that zoning laws restrict the site of the distribution centre to lie in the four sided region as shown below:

Four sides of the region are converted to linear constraints

2*9 8 2 2 + 2*7 3 10 2 + 2*2 8 15 2+2*5 14 13 2

Decision Variable x: location of the new distribution center with respect to the X-axis

Decision Variable y: location of the new distribution center with respect to the y-axis

APPLICATIONS OF NLP: FACILITY LOCATION

Page 33: MIS775 Decision Modelling for Business Analytics MODULE 2 ... · Analytics MODULE 2 TOPIC 7 : Nonlinear Programming. CRICOS Provider Code: 00113B ... • Is called a heuristic procedure!

CRICOS Provider Code: 00113BCRICOS Provider Code: 00113B

MODULE 2 LEARNING OUTCOMES

1. Understand the major business applications areas for LP, ILP and NLP.2. Understand the basic assumptions, properties, complexity of LP and its integer and 

nonlinear extensions.3. Understand how to formulate LP, ILP and NLP problems from marketing, finance and 

operations management.4. Understand the difference between LP, ILP and NLP models.5. Understand how to setup wide variety of LP, ILP and NLP problems that arise in 

business on a spreadsheet, solve them using Excel’s Solver and interpret computer output.

6. Carry out what if analysis and sensitivity analysis on a decision models and interpret computer output.

33

• In real world business situations, the optimisation problem may not be concisely stated, the data for the problem may not be readily available and the problem most likely will involve numerous decision variables and/or constraints. 

• Nevertheless, a thorough study of the applications in this module is a good place to begin in applying LP, ILP and NLP to real world optimisation problems.