No BSD License
-
DSP(varargin)
-
FValue=SP_tlosscost1(InValue)
this function return the transformer's (input argument) loss
-
FValue=SP_tlosscost1(InValue)
this function return the transformer's (input argument) loss
-
SP_2kva(InVal)
this function convert the input to a correspounding kVA.
-
SP_create(NVARS,FitnessFcn,op...
this function creates the first population used by Genetic Algorithm
-
SP_crossover(parents,options,...
this function is dedicated for crossover operation used by MATLAB ga
-
SP_fitness(x,FinalTLDistances...
here, the fitness function is created. the sum of distances from loads to
-
SP_instcost(substation)
this function dedicates the primary installation cost
-
SP_main()
this program is designed for optimal substation placement
-
SP_mutation(parents ,options,...
this function is dedicated for crossover operation used by MATLAB ga
-
SP_stepup(CurVal,X_Cord,Y_Cor...
this function step-up the transformers size until it can feed the total
-
DSP_help.m
-
SP_initialize.m
-
View all files
|
|
| SP_crossover(parents,options,NVARS, ...
|
% this function is dedicated for crossover operation used by MATLAB ga
% function.
function xoverKids = SP_crossover(parents,options,NVARS, ...
FitnessFcn,thisScore,thisPopulation)
nKids = length(parents)/2;
xoverKids = cell(nKids,1); % Normally zeros(nKids,NVARS);
index = 1;
for i=1:nKids
parent = thisPopulation{parents(index)};
index = index + 2;
% Flip a section of parent1.
p1 = ceil((length(parent) -1) * rand);
p2 = p1 + ceil((length(parent) - p1- 1) * rand);
child = parent;
child(p1:p2) = fliplr(child(p1:p2));
xoverKids{i} = child; % Normally, xoverKids(i,:);
end
|
|
Contact us at files@mathworks.com