Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Preliminary work with Matlab programming

Read carefully the tutorial on Matlab Optimization Toolbox and program the Constrained Optimization
Example: Inequalities (https://fr.mathworks.com/help/optim/ug/optimization-toolbox-tutorial.html).

Questions:

Solve the optimization problem below:

(𝑥1 + 𝑥2 − 10)2 (𝑥1 − 𝑥2 + 10)2


𝑚𝑎𝑥 +
30 120

𝑥12 . 𝑥2 ≥ 5
(𝑥1 + 𝑥2 − 5)2 (𝑥1 − 𝑥2 − 12)2
𝑠. 𝑡. + ≥1
30 120
𝑥12 + 8𝑥2 ≤ 75

0 ≤ 𝑥1 ≤ 10
𝑤𝑖𝑡ℎ
0 ≤ 𝑥2 ≤ 10

a) Write the Matlab functions for the objective function and non-linear constraints and
upload them.
b) Write the Matlab script to run optimization and upload it.
c) Set the starting point at the center of the search space (𝑥1 = 5, 𝑥2 = 5) and run
optimization. Is the optimization successful? What are the best values of objective and
variables?
d) Set the starting point at (𝑥1 = 0, 𝑥2 = 0) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
e) Set the starting point at (𝑥1 = 10, 𝑥2 = 10) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
f) Set the starting point at (𝑥1 = 0, 𝑥2 = 10) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
g) Set the starting point at (𝑥1 = 10, 𝑥2 = 0) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
h) Set the starting point at (𝑥1 = 5, 𝑥2 = 0) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
i) Set the starting point at (𝑥1 = 5, 𝑥2 = 10) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
j) Set the starting point at (𝑥1 = 0, 𝑥2 = 5) and run optimization. Is the optimization
successful? What are the best values of objective and variables?
k) Set the starting point at (𝑥1 = 10, 𝑥2 = 5) and run optimization. Is the optimization
successful? What are the best values of objective and variables?

You might also like