function [H_tilde,C]=init_hyperstate(regulator_parameters, apriori)
n_grid=regulator_parameters.n_grid;
H_tilde=zeros(regulator_parameters.dim,n_grid);
rozsah=apriori.Hmax-apriori.Hmin;
a=0;
for i=1:size(regulator_parameters.H_tilde_on,1)
    for j=1:size(regulator_parameters.H_tilde_on,2)
        if (regulator_parameters.H_tilde_on(i,j))
            a=a+1;
            H_tilde(a,:)=ones(1,n_grid)*apriori.Hmin(i,j)+(0:n_grid-1)*rozsah(i,j)/(n_grid-1);
        end
    end
end
C=zeros(1,n_grid^size(H_tilde,1)); 
end


