Advertisement
Ostu

Untitled

Dec 10th, 2021
1,309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.30 KB | None | 0 0
  1. methods (Access = private)
  2.        
  3.         function results = start(app, XD)
  4.            
  5.             regu = PopulacjaStart(app.ileOs);
  6.            
  7.             tic;
  8.            
  9.             if app.wybor == "iteracje"
  10.                
  11.                 x = 1;
  12.                
  13.             elseif app.wybor == "czas"
  14.                
  15.                 x = toc;
  16.                
  17.             end
  18.             z = 1;
  19.            
  20.             data = zeros([1, app.itera]) * nan;
  21.             j = zeros([1, app.itera]) * nan;
  22.             axis(app.UIAxes, [0, inf, 0, inf]);
  23.            
  24.             while  x <= app.itera && app.Sterowanie.Value == "Start"  
  25.                
  26.                
  27.                 nastepne = feval(XD, regu, app.obiekt, app.szanse);
  28.                 if app.metoda.Value == "Ruletka"
  29.                     pary = ParRUL(nastepne);
  30.                     potom = KrzyzRUL(pary);
  31.                 elseif app.metoda.Value == "Rangowa"
  32.                     pary = ParRANG(nastepne);
  33.                     potom = KrzyzRANG(pary,app.ileOs);
  34.                 end
  35.                
  36.                 mut = Mutacja(potom);
  37.                 regu = mut;
  38.            
  39.                 pause(0)
  40.                
  41.                 [FC, PR, CR, UCH, KC] = PIDOptimFun(regu(1, :), app.obiekt);
  42.                 .
  43.                 .
  44.                 .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement