This code implements ideas and methods described in the following articles: Chaigneau et al., 2009; Chaigneau et al., 2011; Pegliasco et al., 2015; Laxenaire et al., 2018.
e1 is directly i1 + 1 and we just need the new function `date_index` to process k1. Additional benefit: we process k1 out of the loop on `id_child_1`.
This code implements ideas and methods described in the following articles: Chaigneau et al., 2009; Chaigneau et al., 2011; Pegliasco et al., 2015; Laxenaire et al., 2018.