-
Notifications
You must be signed in to change notification settings - Fork 1
Exam 3
Exercise 3. Consider the following multi-objective problem:
We need to analyze the convexity of all the objective function and the feasible region:
-
Objective Function:
$f_1 \left(x\right)=x_2$ and$f_2 \left(x\right)={-x}_1 -2x_2$ .The objective function$f_1 \left(x\right)$ is a linear function, as same as$f_2 \left(x\right)$ , which it means both of the objective functions are convex. -
Constraints:
$g_1 \left(x\right)=x_1 \ge 0$ ,$g_2 \left(x\right)=x_2 \ge 0$ and$g_3 \left(x\right)=x_1 +x_2 \le 5$ . The constraints functions$g_1 \left(x\right)$ and$g_2 \left(x\right)$ are both linear inequalities and the feasible region belong to the non-negative Castersian plane, and it means is convex set.
The constraint function$g_3 \left(x\right);$ is also linear inequality constraint and the region is defined by$x_1 +x_2 =5$ ,$x_1 =0$ and$x_2 =0$ makes a triangle set that is also convex. Since all the objective functions and the feasible region are convex, we can confirm that this multi-objective optimization problem is convex.
% Definition of the objective functions and the constraints
objective_function_1 = @(x1,x2) x2;
objective_function_2 = @(x1,x2) -x1 - 2.*x2;
constraint_1 = @(x1) -x1;
constraint_2 = @(x2) -x2;
constraint_3 = @(x1,x2) x1 + x2 - 5;
% Creation of the grid with x1 and x2
x1 = linspace(0, 5, 100);
x2 = linspace(0, 5, 100);
[X1,X2] = meshgrid(x1,x2);
% Evaluate the objective functions and the feasible region
F1 = objective_function_1(X1,X2);
F2 = objective_function_2(X1,X2);
C1 = constraint_1(x1);
C2 = constraint_2(x2);
C3 = constraint_3(X1,X2);% Create a 3D plot
figure;
surf(X1,X2,F1);
hold on
surf(X1,X2,F2);
plot3(x1,C1,zeros(size(x1)), 'r-');
plot3(-C2, x2,zeros(size(x2)), 'b-');
surf(X1,X2,C3, 'FaceAlpha', 0.3);
plot3(x1,-C1,zeros(size(x1)), 'r-');
plot3(C2,x2, zeros(size(x2)), 'b-');
xlabel("x1");
ylabel("x2");
zlabel("Objective Function");
legend("F1", "F2", "C1", "C2", "C3");
title("3D Multi-objective Function");
view(3);
hold offOutput