def __init__(self, params): self.K = params['K'] self.rununtiltime = params['rununtiltime'] mtpy.mt_seed32new(params['seed']) self.koffp = params['koffp'] self.kcat = params['r'] self.delta = ( log(self.rununtiltime) - log(self.EXPSTART)) / float(self.K - 1) self.leg = 0 self.substrate = 0 self.obs_i = 0 self.observations = zeros(shape=self.K, dtype=int) self.t = 0.0 # FIXME Added so that Stella knows about the member ahead of time self.next_obs_time = 0.0 # FIXME Added so that Stella knows about the member ahead of time
def __init__(self, params): self.K = params['K'] self.rununtiltime = params['rununtiltime'] mtpy.mt_seed32new(params['seed']) self.koffp = params['koffp'] self.kcat = params['r'] self.delta = (log(self.rununtiltime) - log(self.EXPSTART)) / float(self.K - 1) self.leg = 0 self.substrate = 0 self.obs_i = 0 self.observations = zeros(shape=self.K, dtype=int) self.t = 0.0 # FIXME Added so that Stella knows about the member ahead of time self.next_obs_time = 0.0 # FIXME Added so that Stella knows about the member ahead of time
def __init__(self, params, observations): self.K = params['K'] self.rununtiltime = params['rununtiltime'] mtpy.mt_seed32new(params['seed']) self.koffp = params['koffp'] self.kcat = params['r'] self.delta = (log(self.rununtiltime) - log(EXPSTART)) / float(self.K - 1) self.leg = 0 self.substrate = 0 self.obs_i = 0 self.observations = observations # LANG: Init below required before entering stella! # TODO: Static analysis could discover the use in the original location self.t = 0.0 self.next_obs_time = 0.0
def prepare(args): global K, rununtiltime, koffp, kcat, delta, leg, substrate, obs_i, observations params = Settings(args) K = params['K'] rununtiltime = params['rununtiltime'] mtpy.mt_seed32new(params['seed']) koffp = params['koffp'] kcat = params['r'] delta = (log(rununtiltime) - log(EXPSTART)) / float(K - 1) leg = 0 substrate = 0 obs_i = 0 observations = np.zeros(shape=K, dtype=int) def get_results(r): print (observations) return observations return (run, (), get_results)
def seed(s): #random.seed(s) mtpy.mt_seed32new(s)
def drand(s): mtpy.mt_seed32new(s) return mtpy.mt_drand() + mtpy.mt_drand()
def drand_const(): mtpy.mt_seed32new(42) return mtpy.mt_drand()
def seed(s): mtpy.mt_seed32new(s)
def seed_const(): mtpy.mt_seed32new(42)
def seed(s): #random.seed(s) mtpy.mt_seed32new(s)
def drand(s): mtpy.mt_seed32new(s) return mtpy.mt_drand() + mtpy.mt_drand()
def drand_const(): mtpy.mt_seed32new(42) return mtpy.mt_drand()
def seed(s): mtpy.mt_seed32new(s)
def seed_const(): mtpy.mt_seed32new(42)