예제 #1
0
 def setUp(self):
     initrv = Constant(0.1 * np.ones(1))
     self.ivp = ode.logistic([0.0, 1.5], initrv)
     self.step = 0.5
     sol = probsolve_ivp(self.ivp, step=self.step, diffconst=1.0, which_prior="ibm1")
     state_rvs = sol.kalman_posterior.filtering_posterior.state_rvs
     self.ms, self.cs = state_rvs.mean, state_rvs.cov
예제 #2
0
 def setUp(self):
     initrv = Dirac(0.1 * np.ones(1))
     self.ivp = ode.logistic([0.0, 1.5], initrv)
     self.step = 0.5
     sol = probsolve_ivp(self.ivp,
                         step=self.step,
                         initrv=initrv,
                         diffconst=1.0,
                         which_prior="ibm1")
     state_rvs = sol._state_rvs
     self.ms, self.cs = state_rvs.mean, state_rvs.cov
예제 #3
0
    def setUp(self):
        initrv = Constant(0.1 * np.ones(1))
        self.ivp = logistic([0.0, 1.5], initrv)
        step = 0.1
        f = self.ivp.rhs
        t0, tmax = self.ivp.timespan
        y0 = self.ivp.initrv.mean

        self.solution = probsolve_ivp(f,
                                      t0,
                                      tmax,
                                      y0,
                                      algo_order=3,
                                      step=step,
                                      adaptive=False)
예제 #4
0
def ivp():
    initrv = Constant(0.1 * np.ones(1))
    return ode.logistic([0.0, 1.5], initrv)
예제 #5
0
 def setUp(self):
     initrv = Constant(0.1 * np.ones(1))
     self.ivp = logistic([0.0, 1.5], initrv)
     step = 0.1
     self.solution = probsolve_ivp(self.ivp, which_prior="ibm3", step=step)
예제 #6
0
 def setUp(self):
     """Setup odesolver and solve a scalar ode."""
     initrv = Constant(0.1 * np.ones(1))
     self.ivp = ode.logistic([0.0, 1.5], initrv)
     self.stps = [0.2, 0.1]