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_create(NVARS,FitnessFcn,options)
|
% this function creates the first population used by Genetic Algorithm
function pop = SP_create(NVARS,FitnessFcn,options)
global T L FinalTransPow FinalLoad FinalTransCap TransTypes AuxTransCap AuxTransPow K2 K3
global SelCaseRow FinalTrans_x FinalTrans_y FinalLoad_x FinalLoad_x FinalLoad_y
global AuxFinalTrans_x AuxFinalTrans_y AuxFinalLoad_x AuxFinalLoad_x AuxFinalLoad_y AuxFinalLoad
global FinalTLDistances
totalPopulationSize = sum(options.PopulationSize);
pop = cell(totalPopulationSize,1);
for counter=1:NVARS,
SelDistance = FinalTLDistances(counter,:);
[SelTr,SelectedTrIndex] = min(SelDistance);
firstpop(counter,1) = counter;
firstpop(counter,2) = SelCaseRow(1,SelectedTrIndex);
end;
pop{1} = firstpop;
for j=2:totalPopulationSize,
for count1=1:NVARS, % NVARS=L the number of final loads and also the number of variables.
TIndex = randperm(length(SelCaseRow));
popindividual(count1,1) = count1;
popindividual(count1,2) = SelCaseRow(1,TIndex(1,1));
end;
pop{j} = popindividual;
end;
|
|
Contact us at files@mathworks.com