Решение задачи повышения надежности резервирования с помощью эволюционного моделирования

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование



:= random(3) + 1; }i := 1 to L-1 dorandom(101)/100 <= Pmut thenj := 1 to N-1 dorandom(101)/100 <= Pmut then.Individs[i][j] := random(3) + 1;;SumTxX (var Indiv: TIndivid): real;: integer;:= 0;j := 0 to N-1 doIndiv[j] of

: result := result + 1/T[j];

: result := result + 2/3/T[j];

1/Tavgdo:=random(N);TempPop.Individs[i][index]=3thendec(TempPop.Individs[i][index],random(2)+1)ifTempPop.Individs[i][index]=1theninc(TempPop.Individs[i][index]);;InitTavg;j:integer;:real;:=0;j:=0toN-1do:=temp+1/T[j];:=1/temp;;InitRecord;i:integer;i:=1toRecQuantitydo[i].S:=-9999999;[i].P:=-9999999;[i].Quantity:=0;;;VectorIsHere(varRecEl:TRecElement;varIndivs:TIndivid):boolean;i,j,k:integer;:boolean;:=false;///i:=0toRecEl.Quantity-1do:=false;j:=0toN-1doRecEl.Solutions[i][j]= Rec[k].P)) then[k].S := TempPop.Fitness[i].S;[k].P := TempPop.Fitness[i].P;(rec[k].Solutions, 1);[k].Quantity := 1; //остальные подтереть(rec[k].Solutions[0], N);j := 0 to N-1 do[k].Solutions[0][j] := TempPop.Individs[i][j];:= 0;

= Rec[g].S) and (TempPop.Fitness[i].P > Rec[g].P))((TempPop.Fitness[g].S > Rec[k].S) and (TempPop.Fitness[i].P >= Rec[g].P)) then[g].S := -9999999;[g].P := -9999999;[g].Quantity := 0;;;//если вектор равен. то добавляем еще одно возможное решение(TempPop.Fitness[i].S = Rec[k].S) and (TempPop.Fitness[i].P = Rec[k].P) thennot VectorIsHere (Rec[k], TempPop.Individs[i]) then(rec[k].Quantity);(rec[k].Solutions, rec[k].Quantity);(rec[k].Solutions[rec[k].Quantity-1], N);j := 0 to N-1 do[k].Solutions[rec[k].Quantity-1][j] := TempPop.Individs[i][j];:= 0;;;if (TempPop.Fitness[i].S = Rec[g].P)) then[g].S := -9999999;[g].P := -9999999;[g].Quantity := 0;;;//если вектор равен. то добавляем еще одно возможное решение(TempPop.Fitness[i].S = Rec[k].S) and (TempPop.Fitness[i].P = Rec[k].P) thennot VectorIsHere (Rec[k], TempPop.Individs[i]) then(rec[k].Quantity);(rec[k].Solutions, rec[k].Quantity);(rec[k].Solutions[rec[k].Quantity-1], N);j := 0 to N-1 do[k].Solutions[rec[k].Quantity-1][j] := TempPop.Individs[i][j];:= 0;;;if (TempPop.Fitness[i].S <= Rec[k].S) and (TempPop.Fitness[i].P <= Rec[k].P) then;;;CopyPopulation (var PopFrom: TPopulation; var PopInto: TPopulation);i,j: integer;i := 0 to L-1 do.Rank[i] := PopFrom.Rank[i];.Fitness[i].S := PopFrom.Fitness[i].S;.Fitness[i].P := PopFrom.Fitness[i].P;j := 0 to N-1 do.Individs[i][j] := PopFrom.Individs[i][j];;;;InitRec;(Rec, RecQuantity + 1);;EraseRec;:= nil;;InitInputArrays;(P,N);(T,N);(S,N);(G,N);;EraseInputArrays;:= nil;:= nil;:= nil;:= nil;;.