You are on page 1of 5

République Algérienne démocratique

et populaire
Ministère de l’enseignement
supérieur et de la recherche scientifique.
Université kasdi merbah Ouargla.
Faculté des sciences technologies.
Département de génie mécanique.
Spécialité : énergétique

Présenté par : Dirigé par :


➢ Mezabia Mohamed Ali.

Groupe :
M2EN2.2

Promotion:
2021/2022
SOLUTION COMPTE RENDU

function f = temps(x)
%%%%%%%%%%%%la fonction objectif 1 le temps de
production%%%%%%%%%%%%%%%%%%%%
D=152;
L=203;
A=(pi*D*L)/1000;
a1=0.29;
a2=0.35;
a3=0.25;
tcs=0.5;
th=1.5;
tr=0.13;
% C0=0.1;
% Ct=0.5;
K=193.3;
f = A*(x(1)^-1)*(x(2)^-1)+A*(x(1)^((1-a3)/a3))*(x(2)^((a1-
a3)/a3))*(x(3)^(a2/a3))*(K^(-1/a3))*tcs+th+tr;
function f = cout(x)
%%%%%%%%%%%%la fonction objectif 1 le cout de
production%%%%%%%%%%%%%%%%%%%
D=152;
L=203;
A=(pi*D*L)/1000;
a1=0.29;
a2=0.35;
a3=0.25;
tcs=0.5;
th=1.5;
tr=0.13;
C0=0.1;
Ct=0.5;
K=193.3;
f = C0*A.*(x(1).^-1)*(x(2).^-1)+A.*(x(1).^((1-a3)/a3))*(x(2).^((a1-
a3)/a3))*(x(3).^(a2/a3))*(K^(-1/a3))*(C0*tcs+Ct)+C0*(th+tr);
%**************************************************************************
%%%%%%%%%%%%%%%%%%Programme principal%%%%%%%%%%%%%%%%%%%
%**************************************************************************
clc
close all
clear all
x0 = [200,0.4,2]; % points de départ
options = optimset('LargeScale','off');
options = optimset('LargeScale','off');
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
disp('%%%%%%%%%%%%%%%%critère du temps de
production%%%%%%%%%%%%%%%%%%%%%')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
[x,fval,exitflag,output] = fminunc(@temps,x0,options)
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
disp('%%%%%%%%%%%%%%%%critère du cout de
production%%%%%%%%%%%%%%%%%%%%%')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
[x,fval,exitflag,output] = fminunc(@cout,x0,options)
Résultat

%%%%%%%%%%%%%%%% critère du temps de production % % % % % % % % % % % % % % %


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%.
Local minimum possible.
fminunc stopped because it cannot decrease the objective function
along the current search direction.
<stopping criteria details>
x=
1.0e+002 *
1.9997 - 0.0002i 0.0238 + 0.0059i -0.0020 - 0.0132i
fval =
1.4747 - 0.3830i
exitflag =
5
output =
iterations: 3
funcCount: 80
stepsize: 1.0000
firstorderopt: 0.5043
algorithm: 'medium-scale: Quasi-Newton line search'
message: [1x362 char]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%critère du cout de production%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Local minimum possible.
fminunc stopped because it cannot decrease the objective function
along the current search direction.
<stopping criteria details>
x=
1.0e+002 *
1.9998 - 0.0006i 0.0138 + 0.0070i -0.0027 - 0.0627i
fval =
-2.2807 - 3.5225i
exitflag =
5
output =
iterations: 2
funcCount: 224
stepsize: 1
firstorderopt: 0.9567
algorithm: 'medium-scale: Quasi-Newton line search'
message: [1x362 char]

You might also like