State0(n)>=maxu instead of eps0(n)>max_u & purchase_period instead of purchase_index to be consistent with the likelihood function