SLIDE 23 23
Solving stochastic dynamic programming models without transition matrices Paul L. Fackler, NCSU
Indexed EV evaluations (cont.)
A full EV function evaluation could be computed using the following algorithm:
set ๐ง = ๐ค reshape ๐ง to be โ ๐๐
๐ ๐=2
ร ๐1 set ๐ง โ ๐ง โ ๐1 set useI = true loop from ๐ = 2 to ๐ = ๐ if ๐๐ < ๐๐ก reshape ๐ง to be (โ ๐๐
๐ ๐=๐+1
) ร ๐๐ ร ๐๐โ1 and expand ๐ง(: , : , ๐) โ ๐ง(โ, : , ๐พ๐โ1
๐ง
(๐ฝ๐(๐))) set useI = false if useI=true reshape ๐ง to be (โ ๐๐
๐ ๐=๐+1
) ร ๐๐ ร ๐๐โ1 perform an indexed multiplication where ๐ง(โ, ๐) โ ๐ง(โ, : , ๐ฝ๐
๐ง(๐)) โ ๐๐ (: , ๐ฝ๐
๐(๐))
perform an indexed multiplication where ๐ง(โ, ๐) โ ๐ง(โ, : , ๐) โ ๐๐ (: , ๐พ๐
๐(๐ฝ๐(๐)))
return ๐ง