www.gusucode.com > MOFEPSO- Multi-objective feasibility enhanced particle swarm 工具箱matlab源码 > MOFEPSO- Multi-objective feasibility enhanced particle swarm/+mog_example/mog_objective.m

    function objectiveVec = mog_objective( x, transfer )
%mog_constraint calculates the objectives of the four-stage gear train
%problem
%**************************************************************************
%Inputs
all_b = [x(11); x(12); x(13); x(14)];
%**************************************************************************
%Get transferred variables
V = transfer{1};
boxBoundMin = transfer{2};
boxBoundMax = transfer{3};

%output vector
boundDif = boxBoundMax - boxBoundMin;
V_box = sum(all_b) * boundDif(1,1) * boundDif (1,2);

objectiveVec     = [V; V_box];
end