Professional Documents
Culture Documents
Matlab Expo 2021 Modeling and Solving Optimization Problems Edt
Matlab Expo 2021 Modeling and Solving Optimization Problems Edt
Mary Fenelon
1
Outline
▪ Introduction
▪ Nonlinear problem
▪ Location planning
▪ Takeaways
2
Introduction
3
What can you do with optimization?
BuildingIQ: Reduce energy Realtek: Optimize designs PTTEP: Plan gas field production
consumption
Constraints
Variables
What restricts my choices?
What are my choices?
Data
5
Formulating an Optimization Problem: Transportation Problem
Objective
What is my goal?
minimize cost of transportation
Constraints
Variables
What restricts my choices?
What are my choices?
Supply and demand at sites
Amount shipped from/to sites
Data
supply, demand, cost
6
Formulating an Optimization Problem: Transportation Problem
Objective
What is my goal?
minimize cost of transportation
𝑚 𝑛
𝑥𝑖𝑗 ≥ 0
Data
supply, demand, cost
𝑠𝑖 𝑑𝑗 𝑐𝑖𝑗 𝑚 𝑛
7
Specify the problem using expressions with Problem-Based
Optimization
8
Problem-Based Optimization makes optimization easier to use
9
Solve many types of optimization problems with MATLAB Optimization Toolbox
Global Optimization Toolbox
Discrete intlinprog ga
surrogateopt
10
Exercises
11
Instructions to get started with the exercises
Clickable links are in the Chat and in the handout
1. Access MATLAB Online using the link. Sign in with your MathWorks account
3. Return to the MATLAB Online window and open the Live Script
a. Double-click on Expo2021_Optimization_Workshop folder in the Current Folder pane
b. Double-click on 1_Simple_Nonlinear_Problem folder
c. Double-click on Work_NonlinearProblem.mlx to open
12
Exercise 1 - Nonlinear Problem
Purpose:
▪ Ensure MATLAB Online is running properly
▪ Create and solve a nonlinear optimization problem
▪ Include a black-box MATLAB function
To Do:
▪ Open the 1-Simple_Nonlinear_Problem folder
▪ Open Work_NonlinearProblem.mlx
– Accept the prompt to open MATLAB Online
▪ Follow along with instructor
13
Nonlinear Problem Review
Data
Problem optimproblem
Variables optimvar
Workflow
ObjectiveSense
Objective
Objective
Constraints Constraints
Solve solve
14
Exercise 2 - Hydroelectric Dam Operation
Purpose:
▪ Solve a planning problem over multiple time periods
▪ Use vectors of variables and constraints
To Do:
▪ Open the 2-HydroelectricDamOperation folder
▪ Open Work_HydroelectricDamOperation.mlx
▪ Follow along with instructor
15
Hydroelectric Dam Operation Review
16
Exercise 3 - Disaster Response Facility Location
Purpose:
▪ Solve a facility location problem
▪ Use arrays of variables and constraints
To Do:
▪ Open the 3-LocationPlanning folder
▪ Open Work_DisasterResponseFacilityLocation.mlx
▪ Work on your own
17
Facility Location Review
18
Takeaways
19
Problem-Based Optimization makes optimization easier to use
20
Use these resources to learn about optimization with MATLAB
Getting Started How-To Videos
Optimization Overview Video Documentation Master Class: Solving Mathematical Modeling with
Toolbox Optimization Problems Optimization
Basics Examples
Nonlinear Programming Flight Path Optimization Traveling Salesman Problem
Linear Programming
Production Planning Portfolio Optimization
Integer Programming
Minimizing Electrostatic Energy Optimal Dispatch of Power
Quadratic Programming Generators
Genetic Algorithm
Antenna Design Circuit Component Selection
Least Squares and Nonlinear Systems of Equations
21
Thank you
© 2021 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks
for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
22