* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Optimization_2016_JS
Open energy system models wikipedia , lookup
Perturbation theory wikipedia , lookup
Knapsack problem wikipedia , lookup
Computational phylogenetics wikipedia , lookup
Cryptanalysis wikipedia , lookup
Lateral computing wikipedia , lookup
Artificial intelligence wikipedia , lookup
Computational electromagnetics wikipedia , lookup
Computational complexity theory wikipedia , lookup
Natural computing wikipedia , lookup
Computational fluid dynamics wikipedia , lookup
Inverse problem wikipedia , lookup
Reinforcement learning wikipedia , lookup
Computational chemistry wikipedia , lookup
Numerical continuation wikipedia , lookup
Operations research wikipedia , lookup
Travelling salesman problem wikipedia , lookup
Mathematical physics wikipedia , lookup
Theoretical computer science wikipedia , lookup
Simplex algorithm wikipedia , lookup
Mathematical economics wikipedia , lookup
Multiple-criteria decision analysis wikipedia , lookup
Genetic algorithm wikipedia , lookup
ELEC-E3150 Mathematical Methods Optimization A concise hands-on tutorial for Excel Solver and MATLAB optimization Jorma Selin, Micro and Quantum Systems Group (MQS), Aalto University Outline 1. 2. 3. 4. 5. 6. What is optimization? Problem types Excel Solver MATLAB Optimization Toolbox MATLAB Global Optimization Toolbox Homework ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 2 What is optimization? • Optimization = Finding the best way of doing something • The overall problem usually consists of a multitude of decisions that are made simultaneously (decision variables) • The “goodness” of a certain set of decisions is measured by a numerical value called the objective function • The range of suitable solutions is often limited by a set of constraints ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 3 What is optimization? • Optimization algorithms can be applied in various situations • Finance and investment • Manufacturing • Scheduling and project management • … ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 4 Problem types The mathematical relationships between the objective function, constraints and the decision variables determine what type of an optimization problem one is dealing with, i.e. • how hard it is to solve • the solution methods or algorithms that can be used for optimization • the confidence you can have that the solution is truly optimal Difficulty Linear / Quadratic / Smooth Nonlinear / Integer / Nonsmooth problems Certitude ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 5 Excel Solver • Optimization Tutorial: http://www.solver.com/optimization-tutorial • The Solver is opened from the “Analysis” section of the “DATA” tab in Excel • Three optimization algorithms: 1. Simplex LP for linear (integer) problems 2. GRG Nonlinear for smooth (integer) nonlinear problems 3. Evolutionary for nonsmooth (nonconvex) problems ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 6 MATLAB Optimization Toolbox Mathematical Modeling with Optimization, Parts 1 and 2: 1. https://se.mathworks.com/videos/mathematical-modeling-withoptimization-part-1-101559.html 2. https://se.mathworks.com/videos/mathematical-modeling-withoptimization-part-2-68974.html You can also search the MATLAB documentation for “Set Up a Linear Program”. ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 7 MATLAB Optimization Toolbox Solving an optimization problem with MATLAB: 1. Separating bounds, linear equalities, linear inequalities, nonlinear equalities, and nonlinear inequalities 2. Choosing a solver (see Optimization Decision Table) 3. Combining variables into one vector (x) 4. Bound constraints (lb, ub) 5. Inequality constraints (A, b) 6. Equality constraints (Aeq, beq) 7. Nonlinear constraints 8. Write the objective 9. Call the solver 10. Examine the solution ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 8 MATLAB Global Optimization Toolbox • Includes methods that search for global solutions to problems that contain multiple maxima or minima, such as • Genetic algorithm (ga) • For a detailed explanation, search the documentation for “How the Genetic Algorithm Works”. • GlobalSearch algorithm • Peculiar MATLAB syntax “gs = GlobalSearch” constructs a global search optimization solver object “run(gs,problem)” has to be used to find the global minimum ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 9 Homework • • Deadline is Wednesday 21st of Dec. at 22:00 Two separate sets of exercises • 1st set should be solved using the Excel Solver • 2nd should be solved using MATLAB • Document your answers and figures, and return all exercises in one .pdf file to MyCourses • In your solutions file, also write the amount of active time you used for each of the assignments ELEC-E3150 Mathematical Methods Thursday the 8th of December, 2016 10 Go get ‘em! !