Download presentation
Presentation is loading. Please wait.
Published byLouise Brown Modified over 6 years ago
1
Lecture 5: Optimisation UNIK4820/9820 UNIK: 22/02-2017 Arne Lind
2
Outline Course content Introduction to optimisation
Part 0: Outline Outline Course content Introduction to optimisation Introductional examples Linear programming models Non linear programming models Integer programming models UNIK4820
3
Part 0: Outline Course content (2/6) Lecture 4 (8th of February): Energy systems and energy technologies (focus on economical aspects) Investment and operational costs for various technologies Learning curves, discount rates, economic lifetime, etc Definition of levelized cost of electricity (LCOE) Assignment 1 (15th of February): Energy systems and energy technologies (technology and economic focus) Calculation of levelized cost of electricity (LCOE) for various technologies Lecture 5 (22nd of February): Mathematical modelling and optimisation Introduction and basic concepts Linear programming models Introduction to non-linear optimisation UNIK4820
4
Course content (3/6) Assignment 2 (15th of March): Linear programming
Part 0: Outline Course content (3/6) Lecture 6 (8th of March): Linear programming Introduction Simplex method Sensitivity analysis Duality Assignment 2 (15th of March): Linear programming Solve various LP models by using the simplex method Interpretation of solutions Lecture 7 (22nd of March): Linear energy system models How to make (and solve) a simple energy system model in Excel Interpretation of results UNIK4820
5
Introduction to optimisation
Part 1: Introduction Introduction to optimisation UNIK4820
6
Part 1: Introduction What is optimisation? The field of optimisation belongs to the field of applied mathematics Consists of the use of mathematical models and methods to find the best alternative in decision making processes Optimisation models are often used to describe and analyse economic and technical systems Main purpose: Get insights into the systems and to find possible solutions for the decision problem Optimisation is the science of making the best decision or making the best possible decision Best -> We have a defined objective Possible -> There are restrictions on the type of decisions we can make UNIK4820
7
Optimisation models (1/2)
Part 1: Introduction Optimisation models (1/2) A optimisation model requires that the problem has something that is variable and can be controlled or affected by the decision maker This defines the problemβs decision variables To optimise is to find the best possible values for the decision variables Requires a specific target or objective The objective is expressed through an objective function Depends on the decision variables Can be minimised or maximised The restrictions on the values of the decision variables are expressed through a set of constraints UNIK4820
8
Optimisation models (2/2)
Part 1: Introduction Optimisation models (2/2) A requirement for using optimisation models is that the objective and constraints can be expressed quantitatively in mathematical functions and relations Assumed that the number of decision variables and possible values are large Assumed that optimisation models and computer support are required in order to find the best possible solution The theory behind optimisation originates in classical mathematical science Military operations were the starting point of this field Today, optimisation is used in a large number of economic and technical application areas Used in both short term (operative) and long term (tactical/strategic) planning Often requires skills and competence in mathematics/computer science in combination with competence in the technical or economic area UNIK4820
9
The optimisation process
Part 1: Introduction Identify problem Simplifcation, Limitations Formulation Optimisation method Real problem Simplified problem Optimisation model Solution Verification Evaluation Result UNIK4820
10
Mathematical formulation and classification (1/3)
Part 1: Introduction Mathematical formulation and classification (1/3) Formulation of a general optimisation problem: π min π(π) π .π‘. πβπ f(x) is an objective function that depends on decision variables x = (x1β¦..xn)T The set X defines the feasible solutions to the problem. Usually X is expressed by constraints and an alternative formulation of (P) is: π min π(π) π .π‘. π π π β€ π π , π=1,β¦.,π Where g1(x),β¦.,gm(x) are functions that depend on x, and b1,β¦β¦,bm are given parameters UNIK4820
11
Mathematical formulation and classification (2/3)
Part 1: Introduction Mathematical formulation and classification (2/3) A solution x β X that minimises f(x) is called an optimal solution. Generally denoted x*. The optimal objective function value is denoted z*=f(x*) Problem (P) is formulated as a minimisation problem, but can also be formulated as a maximisation problem. πππ₯ π§ 1 = π 1 π min π§ 2 = π 2 π =β π 1 π π§ β 2 =βπ§ β 1 Problem (P) is a linear programming problem (LP problem) if: all functions f, g1,β¦,gm are linear all variables are continuous (can obtain any fractions value), i.e. x β Rn UNIK4820
12
Mathematical formulation and classification (3/3)
Part 1: Introduction Mathematical formulation and classification (3/3) Problem (P) is a nonlinear problem if At least one of the functions f, g1,β¦..,gm is a nonlinear function All variables are continuous, x β Rn Depending on the functions and the problem structure, a large number of classes can be defined No constraints = Unconstrained optimisation problem Quadratic objective function and constraints = Quadratic optimisation problem Problem (P) is an integer programming problem if At least one of the variables (or more) is defined as an integer variable(s) These variables can take on integer (or discrete) values Xj β {0, 1, 2, β¦.} These variables can be binary Xj β {0, 1} The problem is called a linear integer programming problem UNIK4820
13
Introductional examples
Part 1: Introductional examples Introductional examples UNIK4820
14
Example 1: Linear programming
Part 2: Introductional examples Example 1: Linear programming Problem description Company Fajo AB produces hockey sticks and bandy sticks Hockey stick: Sells for 125 kr and uses raw material for 40 kr Hockey stick: Additional cost of 65 kr for labour/administration/etc Bandy stick: Sells for 115 kr and use raw material for 35 kr Bandy stick: Additional cost of 62 kr The production of sticks requires two working elements; sawing and gluing Hockey stick: 7 min sawing and 16 min gluing Bandy stick: 10 min sawing and 12 min gluing Each weak, Fajo has a working capacity of 60 hours of sawing and 90 hours of gluing No limit on raw material, and the demand for sticks is unlimited Formulate an optimisation problem that maximises the weekly profit i.e. sales minus raw material and productions costs UNIK4820
15
Part 2: Introductional examples
Graphical solution Feasible region UNIK4820
16
Part 2: Introductional examples
Graphical solution z = 0 UNIK4820
17
Part 2: Introductional examples
Graphical solution z = 2000 UNIK4820
18
Part 2: Introductional examples
Graphical solution x1* = and x2* = 260.5 z* = Optimal solution z = 6000 z = 4000 z = 2000 UNIK4820
19
Part 2: Introductional examples
Example 1: Solution The constraints that are satisfied with equality in a point are called active (or binding) constraints In the example, constraints 1 and 2 are active in the optimal solution The optimal solution is found in the vertex of the feasible region Regardless of the objective function, the optimal solution to an LP problem will always be attained in a corner point of the feasible region A constraint that does not affect the feasible region is called redundant A constraint that does not affect the optimal solution is called redundant in optimum UNIK4820
20
Different cases of redundancy
Part 2: Introductional examples Different cases of redundancy Redundant Active constraints Redundant in optimum Redundant but active UNIK4820
21
Solution properties (1/2)
Part 2: Introductional examples Solution properties (1/2) Unique optimal solution Means that there is only one optimal solution to the problem The solution is always found in a corner point of the feasible region Alternative optimal solutions Appear when the best optimal objective function values is found in at least two corner points All points that lie between these two have the same objective function value Infinite number of optimal solutions Unbounded solution Appears when the feasible region is open in the direction of improving objective function value No solution exists Appears when the constraints are defined so that there is no point that satisfies all constraints UNIK4820
22
Solution properties (2/2)
Part 2: Introductional examples Solution properties (2/2) Alternative optimal solutions Unique optimal solution Unlimited solution No feasible solution UNIK4820
23
Example 2: Nonlinear optimisation (1/6)
Part 2: Introductional examples Example 2: Nonlinear optimisation (1/6) Problem description The company Sport AB intend to start up business in a new region and establish a new low price shop There are five towns in the region The location of the five towns are given in the figure below where the sizes of the circles are proportional to the number of inhabitants in each town UNIK4820
24
Example 2: Nonlinear optimisation (2/6)
Part 2: Introductional examples Example 2: Nonlinear optimisation (2/6) The company has developed an empirical formula that expresses the expected sales volume Function of the distance from the towns to the location of the new store Formula is based on peopleβs propensity to shop is inversely proportional to the distance (except for a constant) Formula: π π = π π π+ ππ 2 Vi is the sales volume from town i bi is the number of inhabitants in town i (in thousands) di is the distance (in km) between town i and the store k is a constant whose value is estimated to 4 UNIK4820
25
Example 2: Nonlinear optimisation (3/5)
Part 2: Introductional examples Example 2: Nonlinear optimisation (3/5) The geographical coordinates of the towns are given by coordinates (ui,vi), together with the number of inhabitants in the towns (bi): Environmental protected area (constraint): 8x + y β€ -4 Assignment: Formulate an optimisation model that determines a location of the shop that maximises the sales volume Town bi ui vi 1 30 -2 2 40 -3 3 4 5 20 -1 UNIK4820
26
Part 2: Introductional examples
UNIK4820
27
Example 2: Nonlinear optimisation (4/5)
Part 2: Introductional examples Example 2: Nonlinear optimisation (4/5) Level curves to the function V(x,y) Global maxima Feasible region Local maxima UNIK4820
28
Example 2: Nonlinear optimisation (5/5)
Part 2: Introductional examples Example 2: Nonlinear optimisation (5/5) Possible solutions: (x,y) = (-2.8, -2.8) = 14.07 (x,y) = (-1.25, 1.9) = (optimal solution) (x,y) = (-0.35, -1.0) = (corner solution) The example shows the difference between a nonlinear problem and an LP problem NLP may have several local optima, and one (or several) of these are the global optima A local optima can be in the interior of the feasible region, or on the border of one or several constraints of the feasible region If the NLP problem is convex, there is only one local optimum Strictly concave objective function and minimisation problem = One unique solution Strictly convex objective function and maximisation problem = One unique solution Alternative optimal solutions can appear in several ways, particularly in non-convex problems UNIK4820
29
Example 3: Integer programming (1/9)
Part 2: Introductional examples Example 3: Integer programming (1/9) Housing company LinbostΓ€der has bought a site with an area of m2 The company has to decide what to build on the site Through market surveys the company has noticed a demand for two types of departments Apartment 1 High quality with 4 rooms Demanded by people working in high tech companies Apartment 2 Basic quality with 2 rooms For students The company does not want to mix the two apartment types in the same house UNIK4820
30
Example 3: Integer programming (2/9)
Part 2: Introductional examples Example 3: Integer programming (2/9) To meet the demand, the company has developed two types of apartment blocks The blocks are of the same size with an area of m2 Block A 8 apartments with 4 rooms Costs: 10 MNOK to build Block B 12 apartments with 2 rooms Costs: 5 MNOK to build The company has a budget of 40 MNOK Block A is three times as profitable as Block B In order to get subsidies, 60% of the apartments must be of type 2 (2 rooms) Formulate an optimisation model that determines which apartment blocks to build in order to maximise profit UNIK4820
31
Example 3: Integer programming (3/9)
Part 2: Introductional examples Example 3: Integer programming (3/9) Feasible region UNIK4820
32
Example 3: Integer programming (4/9)
Part 2: Introductional examples Example 3: Integer programming (4/9) 15 possible solutions UNIK4820
33
Example 3: Integer programming (5/9)
Part 2: Introductional examples Example 3: Integer programming (5/9) UNIK4820
34
Example 3: Integer programming (6/9)
Part 2: Introductional examples Example 3: Integer programming (6/9) UNIK4820
35
Example 3: Integer programming (7/9)
Part 2: Introductional examples Example 3: Integer programming (7/9) UNIK4820
36
Example 3: Integer programming (8/9)
Part 2: Introductional examples Example 3: Integer programming (8/9) UNIK4820
37
Example 3: Integer programming (9/9)
Part 2: Introductional examples Example 3: Integer programming (9/9) Integer solution (z = 10 and x1 = 2, x2 = 4) UNIK4820
38
Integer programming: Solution properties
Part 2: Introductional examples Integer programming: Solution properties The feasible region in the example problem constitutes a discrete set of points The optimal solution to a linear integer programming problem can be found: On the border of the feasible region An interior point where no constraints are active An IPP can have a unique optimal solution or alternative solutions Can also have an unbounded solution or not any feasible solution at all If the integer requirements are removed on the variables, we get an LP problem So-called LP relaxation of the IPP Some IPP can be solved by first solving the LP relaxation If the values of the decision variables are βlarge enoughβ, it is reasonable to round the values Rule of thumb: If the values are larger than 10 UNIK4820
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.