1 | function [regulator_parameters, rsss_parameters,system,apriori]=nastav(horizont, num_of_candidates, generate_candidates_mode, search_region_init, gama, lambda, n_grid, n_pass, n_iter, n0, delta, alfa,b, sigma,yr, y0, y0_range, b0, b0_range,P0, P0_range)
|
---|
2 | %OK
|
---|
3 | %nastaveni
|
---|
4 | %sidp
|
---|
5 | %horizont...ridici horizont
|
---|
6 | %num_of_candidates...pocet kandidatu na zmenu u
|
---|
7 | %search_region_init...pocatecni rozsah pro zmenu prozatimniho optimalniho u
|
---|
8 | %gama, lambda...parametri pro redukci search_region_init
|
---|
9 | %n_grid...pocet bodu v diskretizaci kazdeho rozmeru hyperstavu
|
---|
10 | %n_pass...pocet nezavislych pruchodu
|
---|
11 | %n_iter...pocet opakovani v kazdem pruchodu
|
---|
12 | %n0, delta, alfa...parametry RSSS (implementovana ve funkci
|
---|
13 | %compare_candidaes)
|
---|
14 | %system
|
---|
15 | %dim...dimenze hyperstavu ulohy
|
---|
16 | %b,sigma...parametr systemu
|
---|
17 | %apriori
|
---|
18 | %b0, b_range...apriorni informace o b
|
---|
19 | %P0, P_range...apriorni informace o P
|
---|
20 | %y0, y_range...pocatecni stav systemu
|
---|
21 | if nargin == 0
|
---|
22 | horizont=10;
|
---|
23 | num_of_candidates=7;
|
---|
24 | generate_candidates_mode=1;
|
---|
25 | search_region_init=1;
|
---|
26 | gama=0.95;
|
---|
27 | lambda=0.9;
|
---|
28 | n_grid=20;
|
---|
29 | n_pass=7;
|
---|
30 | n_iter=14;
|
---|
31 |
|
---|
32 | n0=20;
|
---|
33 | delta=0.01;
|
---|
34 | alfa=0.05;
|
---|
35 |
|
---|
36 | b=0.5;
|
---|
37 | sigma=0.1;
|
---|
38 | yr(1:horizont+1)=0; %pozadovane rizeni yr(1) nema smysl, je tam proto, aby yr(i) odpovidalo pozadovanemu vystupu na H(i)
|
---|
39 |
|
---|
40 | y0=0;
|
---|
41 | y0_range=2;
|
---|
42 | b0=0;
|
---|
43 | b0_range=1;
|
---|
44 | P0=4;
|
---|
45 | P0_range=2;
|
---|
46 | end
|
---|
47 |
|
---|
48 | regulator_parameters.horizont=horizont;
|
---|
49 | regulator_parameters.num_of_candidates=num_of_candidates;
|
---|
50 | regulator_parameters.generate_candidates_mode=generate_candidates_mode;
|
---|
51 | regulator_parameters.search_region_init= search_region_init;
|
---|
52 | regulator_parameters.gama= gama;
|
---|
53 | regulator_parameters.lambda=lambda;
|
---|
54 | regulator_parameters.n_grid=n_grid;
|
---|
55 | regulator_parameters.n_pass=n_pass;
|
---|
56 | regulator_parameters.n_iter=n_iter;
|
---|
57 |
|
---|
58 | rsss_parameters.n0=n0;
|
---|
59 | rsss_parameters.delta=delta;
|
---|
60 | rsss_parameters.alfa=alfa;
|
---|
61 |
|
---|
62 | system.dim=3;
|
---|
63 | system.b=b;
|
---|
64 | system.sigma=sigma;
|
---|
65 | system.yr=yr;
|
---|
66 |
|
---|
67 | apriori.y0=y0;
|
---|
68 | apriori.y0_range=y0_range;
|
---|
69 | apriori.b0=b0;
|
---|
70 | apriori.b0_range=b0_range;
|
---|
71 | apriori.P0=P0;
|
---|
72 | apriori.P0_range=P0_range;
|
---|
73 | end |
---|