Optimization. Broadly two types: Unconstrained and Constrained optimizations We deal with constrained optimization. General form:

Similar documents
Chapter 3 Introduction to Linear Programming PART 1. Assoc. Prof. Dr. Arslan M. Örnek

Operations Research Graphical Solution. Dr. Özgür Kabak

Theory of Linear Programming

Study Unit 3 : Linear algebra

Solution Cases: 1. Unique Optimal Solution Reddy Mikks Example Diet Problem

The Simplex Algorithm

Graphical and Computer Methods

Linear Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Linear Programming. Dr. Xiaosong DING

Introduction to Operations Research. Linear Programming

Chapter 4 The Simplex Algorithm Part I

Introduction to Operations Research

IE 400 Principles of Engineering Management. Graphical Solution of 2-variable LP Problems

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

The Simplex Algorithm and Goal Programming

LP Definition and Introduction to Graphical Solution Active Learning Module 2

2. Linear Programming Problem

Linear Programming. H. R. Alvarez A., Ph. D. 1

Introduction. Formulating LP Problems LEARNING OBJECTIVES. Requirements of a Linear Programming Problem. LP Properties and Assumptions

Linear programming I João Carlos Lourenço

ENM 202 OPERATIONS RESEARCH (I) OR (I) 2 LECTURE NOTES. Solution Cases:

Linear Programming and Marginal Analysis

LINEAR PROGRAMMING: A GEOMETRIC APPROACH. Copyright Cengage Learning. All rights reserved.

Spring 2018 IE 102. Operations Research and Mathematical Programming Part 2

Optimization Methods in Management Science

Chapter 2. Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall 2-1

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1

Practice Questions for Math 131 Exam # 1

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

School of Business. Blank Page

Linear Programming: Model Formulation and Graphical Solution

MATH2070 Optimisation

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

MS-E2140. Lecture 1. (course book chapters )

Math 1101 Chapter 2 Review Solve the equation. 1) (y - 7) - (y + 2) = 4y A) B) D) C) ) 2 5 x x = 5

32. Use a graphing utility to find the equation of the line of best fit. Write the equation of the line rounded to two decimal places, if necessary.

MS-E2140. Lecture 1. (course book chapters )

3 Development of the Simplex Method Constructing Basic Solution Optimality Conditions The Simplex Method...

SECTION 5.1: Polynomials

Optimization Methods in Management Science

Sensitivity Analysis and Duality

Introduction. Very efficient solution procedure: simplex method.

Optimization Methods in Management Science

AIMMS Modeling Guide - Formulating Optimization Models

Optimisation. 3/10/2010 Tibor Illés Optimisation

Optimization Methods in Management Science

UNIT-4 Chapter6 Linear Programming

Linear Programming II NOT EXAMINED

...(iii), x 2 Example 7: Geetha Perfume Company produces both perfumes and body spray from two flower extracts F 1. The following data is provided:

3. Find the slope of the tangent line to the curve given by 3x y e x+y = 1 + ln x at (1, 1).

Section 1.1 Solving Linear Equations and Inequalities a + 4b c

NATIONAL OPEN UNIVERSITY OF NIGERIA SCHOOL OF SCIENCE AND TECHNOLOGY COURSE CODE: MTH 309 COURSE TITLE: OPTIMIZATION THEORY

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

Introduction to linear programming using LEGO.

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc. Mathematics (2011 Admission Onwards) II SEMESTER Complementary Course

1.4 CONCEPT QUESTIONS, page 49

AM 121: Intro to Optimization Models and Methods

MATH150-E01 Test #2 Summer 2016 Show all work. Name 1. Find an equation in slope-intercept form for the line through (4, 2) and (1, 3).

The steps in Raya s solution to 2.5 (6.25x + 0.5) = 11 are shown. Select the correct reason for line 4 of Raya s solution.

MAT016: Optimization

LINEAR PROGRAMMING. Relation to the Text (cont.) Relation to Material in Text. Relation to the Text. Relation to the Text (cont.

Section #2: Linear and Integer Programming

ALGEBRA I SEMESTER EXAMS PRACTICE MATERIALS SEMESTER Use the diagram below. 9.3 cm. A = (9.3 cm) (6.2 cm) = cm 2. 6.

Formulating and Solving a Linear Programming Model for Product- Mix Linear Problems with n Products

Systems and Matrices CHAPTER 7

OPERATIONS RESEARCH LECTURE NOTES

Theoretical questions and problems to practice Advanced Mathematics and Statistics (MSc course)

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to Canonical Form

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1

Deterministic Operations Research, ME 366Q and ORI 391 Chapter 2: Homework #2 Solutions

Introduction to LP. Types of Linear Programming. There are five common types of decisions in which LP may play a role

Linear programming Dr. Arturo S. Leon, BSU (Spring 2010)

Introduction to linear programming

ISE 330 Introduction to Operations Research: Deterministic Models. What is Linear Programming? www-scf.usc.edu/~ise330/2007. August 29, 2007 Lecture 2

56:171 Operations Research Midterm Exam - October 26, 1989 Instructor: D.L. Bricker

Introduction to optimization and operations research

Linear Programming. Businesses seek to maximize their profits while operating under budget, supply, Chapter

Simplex Method. Dr. rer.pol. Sudaryanto

Lecture 6: Sections 2.2 and 2.3 Polynomial Functions, Quadratic Models

Decision Models Lecture 5 1. Lecture 5. Foreign-Currency Trading Integer Programming Plant-location example Summary and Preparation for next class

MAC 2233, Survey of Calculus, Exam 3 Review This exam covers lectures 21 29,

LINEAR PROGRAMMING. Introduction

Solutions to Review Questions, Exam 1

4. Duality and Sensitivity

Page Points Score Total: 100

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

Math 120 Final Exam Practice Problems, Form: A

Modern Logistics & Supply Chain Management

The Graph of a Quadratic Function. Quadratic Functions & Models. The Graph of a Quadratic Function. The Graph of a Quadratic Function

Handout 1: Introduction to Dynamic Programming. 1 Dynamic Programming: Introduction and Examples

Algorithms and Theory of Computation. Lecture 13: Linear Programming (2)

Sensitivity Analysis and Duality in LP

An Introduction to Linear Programming

36106 Managerial Decision Modeling Linear Decision Models: Part II

Operations Research: Introduction. Concept of a Model

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Overview of course. Introduction to Optimization, DIKU Monday 12 November David Pisinger

Concept and Definition. Characteristics of OR (Features) Phases of OR

Optimization. A first course on mathematics for economists

Transcription:

Optimization Broadly two types: Unconstrained and Constrained optimizations We deal with constrained optimization General form: Min or Max f(x) (1) Subject to g(x) ~ b (2) lo < x < up (3)

Some important terms Eq1 is called objective function and if it is of nonlinear function of x vector of variables then it is called non-linear mathematical programming problem Eq2 is called constraint function and it can either be linear or non-linear function of x Eq3 is the boundary conditions of the variable x Optimization problem can either be maximizing or minimizing the Eq1 satisfying the constraints eqs 2 and 3 simultaneously.

Terms ~ indicates the relation between g(.) and b and it can either be equal or unequal depending upon the problem in hand If both the objective and constraint functions are linear then the problem becomes linear optimization Optimization problems can be continuous, integer or mixed integer depending upon types of value variables x take

Linear programming (LP) LP is a tool for solving linear optimization problems. Simplex algorithm: A tool for solving LP problems (Dantzig 1947). LP has been used to solve optimization problems in various industries, e.g. forestry, banking, trucking etc.

An illustration of LP A company makes 2 types of wooden toys: dolls and trucks. A doll sells for $27, uses $10 of raw material and other costs of $14. A truck sells for $21, uses $9 of raw material and other costs of $10. A doll requires 2 hours of carpentry and 1 hour of painting work. A truck requires 1 hour of carpentry and 1 hour of painting work. Each week only 100 painting hours and 80 carpentry hours are available. Raw material supply is unlimited. Demand for trucks is unlimited, but at most 40 dolls can be sold per week. Formulate a LP problem to maximize the company s profit.

Decision Variables Decision variables : should completely define the decisions to be made. x 1 = no. of dolls produced per week x 2 = no. of trucks produced per week

Objective Function In any LP problem the decision maker wants to maximize (usually revenue or profit) or minimize (usually costs) some function of the decision variables. What is the objective in Example 1? Maximize profit = revenues costs Costs Fixed costs: does not depend on decision variables (e.g. rent) Variable costs: raw material costs + other variable costs. Revenues weekly revenues from dolls + weekly revenues from trucks.

Objective Function Revenues = weekly revenues from dolls + weekly revenues from trucks. Rev. = (selling price per doll * no. of dolls per week) + (selling price per truck * no. of trucks per week) Rev. = 27*x 1 + 21*x 2.

Objective Function Weekly raw material costs = 10 x 1 + 9 x 2 Other weekly variable costs = = 14 x 1 + 10 x 2 So, profits = (27 x 1 + 21 x 2 ) (10 x 1 +9 x 2 ) (14 x 1 + 10 x 2 ) = 3x 1 +2x 2 Therefore, objective function = Maximize z = 3*x 1 +2*x 2 The coefficient of a decision variable in the objective function is called an objective function coefficient. The variable z is used to represent the objective function value of any LP.

Constraints Constraints : restrictions that limit the values of the decision variables. Constraints for Example 1: c 1 ) No more than 100 hours of painting time can be used per week. c 2 ) No more than 80 hours of carpentry time can be used per week. c 3 ) Due to limited demand, at most 40 dolls should be produced per week.

Constraint c 1 c 1 ) No more than 100 hours of painting time can be used per week. Total painting hours per week = (painting hours per doll * no. of dolls per week) + (painting hours per truck * no. of trucks per week) = 2 * x 1 + 1 * x 2 = 2 x 1 + x 2 c 1 : 2 x 1 + x 2 < 100 (2) The coefficient of a decision variable in a constraint is often called a technological coefficient

Constraint c 2 c 2 ) No more than 80 hours of carpentry time can be used per week. Total carpentry hours per week = (carpentry hours per doll * no. of dolls per week) + (carpentry hours per truck * no. of trucks per week) = 1 * x 1 + 1 * x 2 = x 1 + x 2 c 2 : x 1 + x 2 < 80 (3)

Constraint c 3 c 3 ) Due to limited demand, at most 40 dolls should be produced per week. No. of dolls per week = x 1 Maximum no. of dolls produced per week = 40 c 3 : x 1 < 40 (4)

Sign Restrictions Can the decision variable assume only nonnegative values or both positive and negative values? If a decision variable (x i )can take only nonnegative values, we add sign restriction x i > 0. Otherwise we say x i is unrestricted in sign (urs).

LP Formulation for Example 1 Maximize z = 3*x 1 +2*x 2 (1) Objective function subject to (s.t.) 2*x 1 + x 2 < 100 (2) painting constraint x 1 + x 2 < 80 (3) carpentry constraint x 1 < 40 (4) demand constraint x 1 > 0 (5) sign restriction x 2 > 0 (6) sign restriction

Some Definitions Definition 1: A function f(x 1, x 2,, x n ) of x 1, x 2,, x n is a linear function if and only if for some set of constants c 1, c 2,, c n, f(x 1, x 2,, x n ) = c 1 x 1 +c 2 x 2 + +c n x n For example, f(x 1, x 2 ) = 2x 1 + x 2 is a linear function of x 1 and x 2, but f(x 1, x 2 ) = x 12 x 2 is not a linear function of x 1 and x 2 Definition 2: For any linear function f and any number b, the inequalities f(x 1, x 2,, x n ) b and f(x 1, x 2,, x n ) b are linear inequalities. Thus, 2x 1 + 3x 2 3 and 2x 1 + x 2 3 are linear inequalities, but x 12 x 2 3 is not a linear inequality.

Feasible Region The feasible region for an LP is the set of points satisfying all its constraints and sign restrictions. Is the point (x 1 = 40, x 2 = 20 ) in the feasible region for Example 1: Put these values (of x 1 and x 2 ) in each constraint (2)-(6) and check if the constraint is satisfied for each case. Ans: (x 1 = 40, x 2 = 20 ) is in the feasible region. Is the point (x 1 = 15, x 2 = 70 ) in the feasible region of Example 1: No, it violates (3) Is the point (x 1 = 40, x 2 = -20 ) in the feasible region of Example 1: No, it violates (6), i.e. sign restriction on x 2. Any point that is not in an LP s feasible region is called an infeasible point.

Optimal Solution For a maximization (minimization) problem, an optimal solution to an LP is a point in the feasible region with the largest (smallest) objective function value. Most LPs have one optimal solution. Some LPs have no optimal solution; some have an infinite number of solutions. What is the objective function value for (x 1 = 30, x 2 = 40 )? Is this optimal? What is the objective function value for (x 1 = 40, x 2 = 20 )? Is this optimal? What is the objective function value for (x 1 = 20, x 2 = 60 )? Is this optimal?

Feasible Solution for Example 1 constraints 2 6 only points in first quadrant satisfy sign restrictions. (2) is satisfied by all lines on or below line AB (3) is satisfied by all lines on or below CD (4) is satisfied by all points to the left of EF Feasible region is bounded by polygon DGFEH. 100 80 60 40 20 D x 2 B G F A C x 1 10 20 30 40 50 60 70 80 E

Optimal Solution for Example 1 (e1.gms) Optimal solution is the point in the feasible region with the largest value of z=3x 1 +2x 2 Draw a single isoprofit (isocost for min problem) line, z =60 Generate other isoprofit lines by moving parallel to the drawn isoprofit line, such as z=100 Point G is the last isoprofit line to intersect the feasible region. And the optimal value is 180 100 80 60 40 20 D x 2 B G E 10 20 30 40 50 60 70 80 F A Z = 60, 100, 180 C x 1

Some Assumptions Proportionality Assumption: The contribution of the objective function from each decision variable is proportional to the value of the decision variable. The contribution of each variable to the left-hand side of each constraint is proportional to the value of the variable. Additivity Assumption: The contribution to the objective function for any variable is independent of the values of the other decision variables. The contribution of a variable to the left-hand side of each constraint is independent of the values of the variable

Some Assumptions (cont d) Divisibility Assumption: each decision variable allowed to assume fractional values E.g., in Example 1, it implies that it is acceptable to produce 1.5 dolls, or 1.63 trucks. If divisibility is not valid, rounding off each variable in the optimal LP solution to an integer may yield a reasonable solution. Certainty Assumption: each parameter ( objective function coefficient, right-hand side, and technological coefficient ) is known with certainty. E.g if we were unsure of the exact amount of carpentry required to build a truck, the Certainty Assumption would be violated.

Infeasible LP It is possible for an LP s feasible region to be empty (contain no points). This results in an infeasible LP. An infeasible LP has no optimal solution e.g. in Example 1, suppose the company is required to make at least 90 trucks per week. x 2 > 90 (7) 100 I 80 60 40 20 D x 2 B G 10 20 30 40 50 60 70 80 E F A C J x 1

For a max (or min) problem, the LP is unbounded if it is possible to find points in the feasible region with arbitrarily large (or small) objective values. Unbouned LP 100 80 60 D x 2 B G Should not occur in a correctly formulated LP e.g. in Example 1, suppose there is no restriction on the amount of labour available. remove constraints (2) and (3) 40 20 F A C 10 20 30 40 50 60 70 80 E x 1

Exercise... (e2.gms) A company sells luxury goods and wants to reach Highincome Men (HM) and High-income Women (HW), by advertising on comedy shows and football games. A 1-minute spot on a comedy show is seen by 7M HW and 2M HM. A 1-minute spot on football game is seen by 2M HW and 12M HM. A 1-minute comedy ad costs $50,00 and a 1-minute football ad costs $100,000. The company wants to reach at least 28M HW and 24M HM. Formulate a LP problem to minimize the company s advertising costs.

Variables & Objective x 1 = no. of 1-minute comedy ads purchased x 2 = no. of 1-minute football ads purchased Total cost = cost of comedy ads + cost of football adds (cost per comedy ad * no. of comedy ads)+(cost per football ad * no. of football ads) 50,000 x 1 + 100,000 x 2 50 x 1 + 100 x 2 (in thousands of dollars) objective function: min z = 50 x 1 + 100 x 2 (1)

Constraints c 1 ) must reach at least 28 million HW no. of HW = (HW per comedy add * no. of comedy ads)+ (HW per football add * no. of football ads) = 7 x 1 + 2 x 2 > 28 (2) in millions of viewers c 2 ) must reach at least 24 million HM no. of HM = (HM per comedy add * no. of comedy ads)+ (HM per football add * no. of football ads) = 2 x 1 + 12 x 2 > 24 (3) in millions of viewers sign restrictions: x 1 > 0 ; x 2 > 0;

LP Formulation Min z = 50 x 1 + 100 x 2 s.t. 7x 1 + 2x 2 > 28 2 x 1 + 12 x 2 > 24 x 1, x 2 > 0

Graphical Solution x 2 c 1 satisfied by point on or above line AB 7x 1 + 2x 2 = 28 c 2 satisfied by point on or above line CD 2x 1 + 12 x 2 = 24 unbounded feasible region isocost line through (x 1 = 4, x 2 = 4); z = 600 E is last point in feasible region to intersect isocost line E = (x 1 = 3.6, x 2 = 1.4); optimal z = 320 14 12 10 8 6 4 2 B D E (4,4) C x 1 A 2 4 6 8 10 12 14 16 Z=320, Z=600

GAMS: Introduction GAMS (General Algebraic Modeling System) Programming language to formulate optimization problems Integrated interface to solver (for example Cplex) i. several solvers can be chosen ii. solver solves optimization problem (for example via Simplex algorithm) Website: http://www.gams.com useful information and additional tools

Language elements Case insensitive and user friendly language based on relational database theory Parameters i. exogenous data, fixed values ii. declaration of parameters and definition of values Variables i. declaration of variables that will be calculated by the model = decision variables ii. no defining of values Equations i. declaration and definition of equations describing the objective function and the restrictions Model and Solve i. name model (tell which equations are included, normally all) ii. specifying solving mode (linear, mixed-integer, ) and specifying whether objective function is to be minimized or maximized

GAMS IDE Create Project Open GAMS (gamside.exe) Create project i. create project file (File -> Project -> New Project) as C:\..\test.gpr ii. create new gms file (File -> New) as C:\..\e1.gms Test project i. type code of e1.gms file ii. run code (F9) iii. check listing file (e1.lst) Declaration: stating that something exists Definition: assignment of value/explicit equation