code: def sim_model_backwards(self,tmax,X0):
          
          X = np.zeros((tmax,self.dim))
          X[tmax-1] = X0
          for t in range(tmax-2,-1,-1):
              sol = sp.optimize.root(self.sim_model_back_help,
                                     X[t+1],
                                     args=(X[t+1]),method='hybr')
              X[t] = sol.x
          return X
docs: Simulate the model backwards in time.