Penalty Functions. The Premise Quadratic Loss Problems and Solutions

Similar documents
Part 3: Trust-region methods for unconstrained optimization. Nick Gould (RAL)

Linear functions Increasing Linear Functions. Decreasing Linear Functions

Theory of Consumer Behavior First, we need to define the agents' goals and limitations (if any) in their ability to achieve those goals.

Optimization 101. Dan dibartolomeo Webinar (from Boston) October 22, 2013

Mathematics for Management Science Notes 07 prepared by Professor Jenny Baglivo

Calculus Chapter 3 Smartboard Review with Navigator.notebook. November 04, What is the slope of the line segment?

3/1/2016. Intermediate Microeconomics W3211. Lecture 4: Solving the Consumer s Problem. The Story So Far. Today s Aims. Solving the Consumer s Problem

Choice. A. Optimal choice 1. move along the budget line until preferred set doesn t cross the budget set. Figure 5.1.

Graphs Details Math Examples Using data Tax example. Decision. Intermediate Micro. Lecture 5. Chapter 5 of Varian

Symmetric Game. In animal behaviour a typical realization involves two parents balancing their individual investment in the common

Characterization of the Optimum

Decomposition Methods

Trust Region Methods for Unconstrained Optimisation

Notes on Intertemporal Optimization

Chapter 7 One-Dimensional Search Methods

JEFF MACKIE-MASON. x is a random variable with prior distrib known to both principal and agent, and the distribution depends on agent effort e

MATH20330: Optimization for Economics Homework 1: Solutions

Terminology. Organizer of a race An institution, organization or any other form of association that hosts a racing event and handles its financials.

CSCI 1951-G Optimization Methods in Finance Part 07: Portfolio Optimization

CHAPTER 13: A PROFIT MAXIMIZING HARVEST SCHEDULING MODEL

GOOD LUCK! 2. a b c d e 12. a b c d e. 3. a b c d e 13. a b c d e. 4. a b c d e 14. a b c d e. 5. a b c d e 15. a b c d e. 6. a b c d e 16.

MDPs and Value Iteration 2/20/17

CS 3331 Numerical Methods Lecture 2: Functions of One Variable. Cherung Lee

Optimization Models one variable optimization and multivariable optimization

FISCAL POLICY AND THE PRICE LEVEL CHRISTOPHER A. SIMS. C 1t + S t + B t P t = 1 (1) C 2,t+1 = R tb t P t+1 S t 0, B t 0. (3)

3.1 Solutions to Exercises

Golden-Section Search for Optimization in One Dimension

Lecture outline W.B.Powell 1

1.1 Forms for fractions px + q An expression of the form (x + r) (x + s) quadratic expression which factorises) may be written as

Algebra with Calculus for Business: Review (Summer of 07)

Partial Fractions. A rational function is a fraction in which both the numerator and denominator are polynomials. For example, f ( x) = 4, g( x) =

FORECASTING & BUDGETING

Reinforcement Learning

Chapter 1 Microeconomics of Consumer Theory

3.1 Solutions to Exercises

Semester Exam Review

EconS Constrained Consumer Choice

1 Overview. 2 The Gradient Descent Algorithm. AM 221: Advanced Optimization Spring 2016

Reinforcement learning and Markov Decision Processes (MDPs) (B) Avrim Blum

Economics 386-A1. Practice Assignment 3. S Landon Fall 2003

Lecture 8: Producer Behavior

Sensitivity Analysis with Data Tables. 10% annual interest now =$110 one year later. 10% annual interest now =$121 one year later

1 Economical Applications

Modelling the Sharpe ratio for investment strategies

Lecture 17: More on Markov Decision Processes. Reinforcement learning

Chapter 2-4 Review. Find the equation of the following graphs. Then state the domain and range: 1a) 1b) 1c)

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 10, 2017

In a moment, we will look at a simple example involving the function f(x) = 100 x

Math 1314 Week 6 Session Notes

Maximum Contiguous Subsequences

Definition 4.1. In a stochastic process T is called a stopping time if you can tell when it happens.

Product Di erentiation: Exercises Part 1

lecture 31: The Secant Method: Prototypical Quasi-Newton Method

Lecture 2: Marginal Functions, Average Functions, Elasticity, the Marginal Principle, and

PROBLEM SET 3 SOLUTIONS. 1. Question 1

Logarithmic and Exponential Functions

SA2 Unit 4 Investigating Exponentials in Context Classwork A. Double Your Money. 2. Let x be the number of assignments completed. Complete the table.

Lecture 2 Consumer theory (continued)

1. f(x) = x2 + x 12 x 2 4 Let s run through the steps.

The homework is due on Wednesday, September 7. Each questions is worth 0.8 points. No partial credits.

Eco504 Spring 2010 C. Sims FINAL EXAM. β t 1 2 φτ2 t subject to (1)

2-4 Completing the Square

TCM Final Review Packet Name Per.

Economics 2010c: Lecture 4 Precautionary Savings and Liquidity Constraints

Part I OPTIMIZATION MODELS

CS 361: Probability & Statistics

January 26,

Chapter 3. A Consumer s Constrained Choice

Econ 172A, W2002: Final Examination, Solutions

Optimization Prof. A. Goswami Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 18 PERT

Writing Exponential Equations Day 2

Economics 101 Fall 2016 Answers to Homework #1 Due Thursday, September 29, 2016

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 13, 2018

Lecture 4 - Utility Maximization

x x x1

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

An adaptive cubic regularization algorithm for nonconvex optimization with convex constraints and its function-evaluation complexity

LECTURE 1 : THE INFINITE HORIZON REPRESENTATIVE AGENT. In the IS-LM model consumption is assumed to be a

ECON 301: General Equilibrium V (Public Goods) 1. Intermediate Microeconomics II, ECON 301. General Equilibrium V: Public Goods

2) Endpoints of a diameter (-1, 6), (9, -2) A) (x - 2)2 + (y - 4)2 = 41 B) (x - 4)2 + (y - 2)2 = 41 C) (x - 4)2 + y2 = 16 D) x2 + (y - 2)2 = 25

Support Vector Machines: Training with Stochastic Gradient Descent

Homework #2 Graphical LP s.

CS 188: Artificial Intelligence Fall 2011

What can we do with numerical optimization?

Ellipsoid Method. ellipsoid method. convergence proof. inequality constraints. feasibility problems. Prof. S. Boyd, EE392o, Stanford University

Math 111 Midterm II February 20th, 2007

Lesson 3.3 Constant Rate of Change (linear functions)

This method uses not only values of a function f(x), but also values of its derivative f'(x). If you don't know the derivative, you can't use it.

Chapter 3: Model of Consumer Behavior

Exponential Functions

Math Fall 2016 Final Exam December 10, Total 100

Production Theory. Lesson 7. Ryan Safner 1. Hood College. ECON Microeconomic Analysis Fall 2016

Additional Review Exam 1 MATH 2053 Please note not all questions will be taken off of this. Study homework and in class notes as well!

Section 9.1 Solving Linear Inequalities

Notes for Econ202A: Consumption

5.1 Exponents and Scientific Notation

Exercise 1. Jan Abrell Centre for Energy Policy and Economics (CEPE) D-MTEC, ETH Zurich. Exercise

ECON Micro Foundations

Scenario Generation and Sampling Methods

Basic Framework. About this class. Rewards Over Time. [This lecture adapted from Sutton & Barto and Russell & Norvig]

Transcription:

Penalty Functions The Premise Quadratic Loss Problems and Solutions

The Premise You may have noticed that the addition of constraints to an optimization problem has the effect of making it much more difficult. The goal of penalty functions is to convert constrained problems into unconstrained problems by introducing an artificial penalty for violating the constraint.

The Premise Consider this example: Suppose there is a freeway (like a toll freeway) that monitors when you enter and exit the road. Instead of establishing a speed limit of 65 mph, they could use these rules: You can drive as fast as you want. If you drive under 65 mph you can use our road for free. Every mph you drive over 65 will cost you $500.

The Premise The previous example had no constraints you can drive as fast as you want! But the effect of these rules would still be to limit drivers to 65mph. You can also control the likelihood of speeding by adjusting the fine. Penalty functions work in exactly this way.

Initial Steps We will be working with a very simple example: minimize f(x) = 100/x subject to x 5 (With a little thought, you can tell that f(x) will be minimized when x = 5, so we know what answer we should get!) Before starting, convert any constraints into the form (expression) 0. In this example, x 5 becomes: x 5 0

Initial Steps Once your constraints are converted, the next step is to start charging a penalty for violating them. Since we re trying to minimize f(x), this means we need to add value when the constraint is violated. If you are trying to maximize, the penalty will subtract value.

Quadratic Loss: Inequalities With the constraint x 5 0, we need a penalty that is: 0 when x 5 0 (the constraint is satisfied) positive when x 5 is > 0 (the constraint is violated) This can be done using the operation P(x) = max(0, x 5) which returns the maximum of the two values, either 0 or whatever (x 5) is. We can make the penalty more severe by using P(x) = max(0, x 5) 2. This is known as a quadratic loss function.

Quadratic Loss: Equalities It is even easier to convert equality constraints into quadratic loss functions because we don t need to worry about the operation (max, g(x)). We can convert h(x) = c into h(x) c = 0, then use P(x) = (h(x) c) 2 The lowest value of P(x) will occur when h(x) = c, in which case the penalty P(x) = 0. This is exactly what we want.

Practice Problem 1 Convert the following constraints into quadratic loss functions: a) x 12 b) x 2 200 c) 2x + 7 16 d) e 2x + 1 9 e) 4x 2 + 2 x = 12

The Next Step Once you have converted your constraints into penalty functions, the basic idea is to add all the penalty functions on to the original objective function and minimize from there: minimize T(x) = f(x) + P(x) In our example, minimize T(x) = 100/x + max(0, x 5) 2

A Problem But it isn t quite that easy. The addition of penalty functions can create severe slope changes in the graph at the boundary, which interferes with typical minimization programs. Fortunately, there are two simple changes that will alleviate this problem.

First Solution: r The first is to multiply the quadratic loss function by a constant, r. This controls how severe the penalty is for violating the constraint. The accepted method is to start with r = 10, which is a mild penalty. It will not form a very sharp point in the graph, but the minimum point found using r = 10 will not be a very accurate answer because the penalty is not severe enough.

First Solution: r Then, r is increased to 100 and the function minimized again starting from the minimum point found when r was 10. The higher penalty increases accuracy, and as we narrow in on the solution, the sharpness of the graph is less of a problem. We continue to increase r values until the solutions converge.

Second Solution: Methods The second solution is to be thoughtful with how we minimize. The more useful minimization programs written in unit 2 were interval methods. The program started with an interval and narrowed it in from the endpoints. With a severe nonlinearity, interval methods have a tendency to skip right over the minimum.

Second Solution: Methods For this reason, interval methods are generally not ideal for penalty functions. It is better to use methods that take tiny steps from a starting point, similar to the brute force methods we used in 1-variable, or any of the methods we used in 2-variable minimization. It is also important when using penalty functions to run the program a few times from various starting points to avoid local extremes.

Practice Problem 2 Write a program that, given an initial point and a function, 1) uses the derivative to determine the direction of the minimum 2) takes small steps in that direction until the function value increases 3) decreases the step size to narrow in on the minimum 4) reports the minimum value Test, document and save your code!

The Final Step Now, back to the example: has become minimize f(x) = 100/x subject to x 5 minimize T(x) = 100/x + r (max(0, x 5) 2 ) The initial point must be chosen in violation of the constraint, which is why these are known as exterior penalty functions. We ll start with x = 20.

Practice Problem 3 Using your step minimization program, minimize f(x) = 100/x + 10 (max(0, x 5)) 2 from starting point 20. Call your answer a. Then, minimize f(x) = 100/x + 100 (max(0, x 5)) 2 from starting point a. Repeat for r = 1000 and r = 10,000.

Practice Problem 4 Write a function that will carry out successive iterations of raising the value of r and closing the interval boundaries. Check your loop with the previous problem, then use it to solve this problem: minimize f(x) = 0.8x 2 2 x subject to x 4 Test different starting points to see the effect.

Practice Problem 5 Next, solve this problem: Minimize f(x) = (x 8) 2 subject to x 10 (Be careful with that! it will affect both your g(x) and your starting point.)

A Note About Exterior Penalty Functions Because exterior penalty functions start outside the feasible region and approach it from the outside, they only find extremes that occur on the boundaries of the feasible region. They will not find interior extremes. In order to accomplish that, these are often used in combination with interior penalty functions next lesson!