ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ
ํ•„ํ„ฐ ์ง€์šฐ๊ธฐ

Optimization of the given set of equation

์กฐํšŒ ์ˆ˜: 1 (์ตœ๊ทผ 30์ผ)
Sudhir Sahoo
Sudhir Sahoo 2021๋…„ 4์›” 30์ผ
๋‹ต๋ณ€: Nipun 2024๋…„ 5์›” 22์ผ
How to optimize the equation with following constraints
Here our objective function is
where the ranges of ,
Further set of constraints are
and
  1. , for and for
  2. , for all n
condition of c are
  1. when
  2. when
  3. when

๋‹ต๋ณ€ (1๊ฐœ)

Nipun
Nipun 2024๋…„ 5์›” 22์ผ
Hi Sudhir,
I understand that you are trying to optimize the given equation with the specified constraints.
Here is the MATLAB code to solve this optimization problem:
% Define the ranges for B and V
B = 1:1:5;
V = 3.5:0.01:5;
% Pre-allocate the matrix to store results
results = zeros(length(B), length(V));
% Iterate over each combination of B and V
for i = 1:length(B)
for j = 1:length(V)
b = B(i);
v = V(j);
% Define tc based on the given constraints
n = 4; % Example value of n, can be varied as needed
if n < 3
f2 = 0;
else
if n > 3
c = 2; % Example value, vary as per conditions
if n >= 6 && n <= 10
c = 3;
elseif n > 10 && n <= 15
c = 4;
end
f2 = 4042.5 * c / (n - 3);
else
f2 = 0;
end
end
f1 = 404250 / n;
v1 = 6240 * v * b;
v2 = 1803.3 * b;
tc = v1 + v2 + f1 + f2;
% Calculate the objective function
Cop = tc / (280.8 * v * b);
% Store the result
results(i, j) = Cop;
end
end
% Find the minimum value of the objective function and its indices
[minCop, idx] = min(results(:));
[row, col] = ind2sub(size(results), idx);
% Get the optimal B and V values
optimalB = B(row);
optimalV = V(col);
% Display the results
fprintf('The minimum value of Cop is: %.4f\n', minCop);
fprintf('This occurs at B = %.2f and V = %.2f\n', optimalB, optimalV);
This code iterates over all combinations of ๐ต and ๐‘‰, computes the objective function ๐ถ๐‘œ๐‘ for each combination while considering the constraints, and finds the optimal values that minimize ๐ถ๐‘œ๐‘. Adjust the value of ๐‘› as needed based on the specific scenario.
Hope this helps.
Regards,
Nipun

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ Choose a Solver์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by