0% found this document useful (0 votes)
113 views24 pages

Optimization Toolbox of MATLAB

The document discusses optimization tools in MATLAB, including solvers for linear programming, nonlinear unconstrained optimization, and nonlinear constrained optimization. It describes the commands and functions for each type of optimization problem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views24 pages

Optimization Toolbox of MATLAB

The document discusses optimization tools in MATLAB, including solvers for linear programming, nonlinear unconstrained optimization, and nonlinear constrained optimization. It describes the commands and functions for each type of optimization problem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Optimization Toolbox of 

MATLAB
Optimization of Engineering Systems
Topics
• MATLAB Toolbox Solvers
• Linear Programming
• Nonlinear unconstrained
• Nonlinear constrained
MATLAB Toolbox Solvers
MATLAB Optimization Toolbox Solvers
MATLAB Optimization Toolbox Solvers
MATLAB Optimization Toolbox Solvers
• fmincon (constrained nonlinear minimization)
• Trust‐region‐reflective (default)
• Allows only bounds or linear equality constraints, but not both.
• Active‐set (solve Karush‐Kuhn‐Tucker (KKT) equations and used quasi‐Newton 
method to approximate the hessian matrix)
• Interior‐point
• Sequential Quadratic Programming (SQP)
• fminunc (unconstrained nonlinear minimization)
• Large‐Scale Problem: Trust‐region method based on the interior‐reflective 
Newton method
• Medium–Scale: BFGS Quasi‐Newton method with a cubic line search 
procedure.
Linear Programming
Linear Programming
• Command syntax
[x, fval, exitflag, output] = linprog (f, A, b, Aeq, beq, lb, [], [], optimset
('Display','iter'));
• Vector f defines objective function coefficients. Matrix A and vector b define 
linear inequality constraints
• as Ax<=b. Matrix Aeq and vector beq define linear equality constraints as Aeq
x <= beq. Lower bounds on
• variables are defined as vector lb.
• f, b, and beq must be column vectors. Lower bounds, even when they are 
zero, must also be specified.
Example

Solution

9
Example (Contd…)
MATLAB Output
Nonlinear Unconstrained
Nonlinear Constrained
• Command syntax
Nonlinear Constrained (Contd…)
• Without gradient
Nonlinear Constrained (Contd…)
• With gradient
Nonlinear Constrained (Contd…)
• With gradient
Nonlinear Constrained
Nonlinear Constrained
• Command syntax

• Objective function is defined as a function file ‘fun’
• x0 is vector of starting solution
• Matrix A and vector b define linear inequality constraints as Ax<=b. Matrix 
Aeq and vector beq define linear equality constraints as Aeq x <= beq.
• Lower and upper bounds on variables are defined as vectors lb and ub
• Nonlinear constraints are defined in a function file ‘nonlcon’.
• Input arguments to the function is vector x.
• Output must be two vectors, one defining inequality constraints and the 
other equality constraints.
Nonlinear Constrained(Contd…)
• Without gradient
Nonlinear Constrained(Contd…)
• Without gradient
Nonlinear Constrained(Contd…)
• Without gradient
Nonlinear Constrained(Contd…)
• With gradient
Nonlinear Constrained(Contd…)
• With gradient
Nonlinear Constrained(Contd…)
• With gradient
THANKS

You might also like