for each order and day
term_init_like <- matrix(0, M+1, 1)
term_general_like <- matrix(0, dias, M+1)
#######