Revision 862, 0.9 kB
(checked in by zimamiro, 15 years ago)
|
|
Line | |
---|
1 | function [H,u]=init_hyperstate(sidp_parameters, system, apriori)
|
---|
2 | %OK
|
---|
3 |
|
---|
4 | H=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim,system.dim); %prostor hyperstavu - kazdy bod ma souradnice (y, b, P)
|
---|
5 | u=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim); %nejlepsi nalezena rozhodnuti - pocatecni strategie =0
|
---|
6 |
|
---|
7 | %nastavi H0
|
---|
8 | step_y0=apriori.y0_range/(sidp_parameters.n_grid-1)*2;
|
---|
9 | min_y0=apriori.y0-apriori.y0_range;
|
---|
10 | step_b0=apriori.b0_range/(sidp_parameters.n_grid-1)*2;
|
---|
11 | min_b0=apriori.b0-apriori.b0_range;
|
---|
12 | step_P0=apriori.P0_range/(sidp_parameters.n_grid-1)*2;
|
---|
13 | min_P0=apriori.P0-apriori.P0_range;
|
---|
14 | for i=1:size(H,2)
|
---|
15 | H(1,i,1)=min_y0+step_y0*(index(i,sidp_parameters.n_grid,1)-1);
|
---|
16 | H(1,i,2)=min_b0+step_b0*(index(i,sidp_parameters.n_grid,2)-1);
|
---|
17 | H(1,i,3)=min_P0+step_P0*(index(i,sidp_parameters.n_grid,3)-1);
|
---|
18 | for j=1:1:sidp_parameters.horizont
|
---|
19 | u(j,i)=0.1*(randn-0.5);
|
---|
20 | end
|
---|
21 | end
|
---|
22 |
|
---|
23 | end
|
---|
24 |
|
---|
25 |
|
---|