How can I define two function in function handle for GAMULTIOBJ?
Mostrar comentarios más antiguos
I have 3 decision variables and 2 objective functions.
This is my code:
lb=[0.01,0.0075,0.01];
ub=[0.2,0.07,0.07];
func=@(x) [efficiency,LCCfunc];
[x,fvar]=gamultiobj(func,3,[],[],[],[],lb,ub);
My question:
Efficiency and LCCfunc are my objective functions. For example LCCfuns is:
function y=LCCfunc(var)
delta_PCM=var(3);
L=1.5;
W=1;
rho_PCMs=880;
m_PCM=W*L*delta_PCM*rho_PCMs;
phi_np=var(1);
m_nano=phi_np*m_PCM/(1-phi_np);
U_C_nano=100;
U_C_PCM=1;
cost_nanoPCM=(U_C_nano*m_nano)+(U_C_PCM*m_PCM);
IC=cost_nanoPCM;
k=0.2;
INR=0.12;
IFR=0.03;
MC=zeros(1,24);
MC(2)=1300*(1+IFR);
MCDiscount=zeros(1,24);
RC=zeros(1,24);
RC(2)=cost_nanoPCM;
RCDiscount=zeros(1,24);
% CRF=;
% RC=
% MC=k*IC*CRF;
for i=2:25
MC(i+1)=MC(i)*(1+IFR);
MCDiscount(i)=MC(i)/((1+INR)^(i-1));
end
MCtotal=sum(MCDiscount);
for i=2:25
RC(i+1)=RC(i)*(1+IFR);
RCDiscount(i)=RC(i)/((1+INR)^(i-1));
end
RCtotal=sum(RCDiscount);
LCC=IC+MCtotal+RCtotal;
y=LCC;
end
How can I define these two objective function in one function handle for using in GAMULTIOBJ?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Multiobjective Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!