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)
%OK
%nastaveni
%sidp
%horizont...ridici horizont
%num_of_candidates...pocet kandidatu na zmenu u
%search_region_init...pocatecni rozsah pro zmenu prozatimniho optimalniho u
%gama, lambda...parametri pro redukci search_region_init
%n_grid...pocet bodu v diskretizaci kazdeho rozmeru hyperstavu
%n_pass...pocet nezavislych pruchodu
%n_iter...pocet opakovani v kazdem pruchodu
%n0, delta, alfa...parametry RSSS (implementovana ve funkci
%compare_candidaes)
%system
%dim...dimenze hyperstavu ulohy
%b,sigma...parametr systemu
%apriori
%b0, b_range...apriorni informace o b
%P0, P_range...apriorni informace o P
%y0, y_range...pocatecni stav systemu
if nargin == 0
    horizont=30;
    num_of_candidates=11;
    generate_candidates_mode=1;
    search_region_init=10;
    gama=0.95;
    lambda=0.9;
    n_grid=9;
    n_pass=7;
    n_iter=14;
    
    n0=20;
    delta=0.01;
    alfa=0.05;

    b=0.5;
    sigma=0.1;
    yr(1:horizont+1)=10;   %pozadovane rizeni yr(1) nema smysl, je tam proto, aby yr(i) odpovidalo pozadovanemu vystupu na H(i)

    y0=0;
    y0_range=2;
    b0=0;
    b0_range=1;
    P0=4;
    P0_range=2;
end
    
regulator_parameters.horizont=horizont;
regulator_parameters.num_of_candidates=num_of_candidates;
regulator_parameters.generate_candidates_mode=generate_candidates_mode;
regulator_parameters.search_region_init= search_region_init;
regulator_parameters.gama= gama;
regulator_parameters.lambda=lambda;
regulator_parameters.n_grid=n_grid;
regulator_parameters.n_pass=n_pass;
regulator_parameters.n_iter=n_iter;

rsss_parameters.n0=n0;
rsss_parameters.delta=delta;
rsss_parameters.alfa=alfa;

system.dim=3;
system.b=b;
system.sigma=sigma;
system.yr=yr;

apriori.y0=y0;
apriori.y0_range=y0_range;
apriori.b0=b0;
apriori.b0_range=b0_range;
apriori.P0=P0;
apriori.P0_range=P0_range;
end