state reinitialization (reset) function

def create_function_f_i(self):
        """state reinitialization (reset) function"""
        return ca.Function(
            'f_i',
            [self.t, self.x, self.y, self.m, self.p, self.c, self.pre_c, self.ng, self.nu],
            [self.f_i],
            ['t', 'x', 'y', 'm', 'p', 'c', 'pre_c', 'ng', 'nu'], ['x_n'], self.func_opt)