Exemplo n.º 1
0
    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
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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
Exemplo n.º 4
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)
Exemplo n.º 5
0
 def seed(s):
     #random.seed(s)
     mtpy.mt_seed32new(s)
Exemplo n.º 6
0
def drand(s):
    mtpy.mt_seed32new(s)
    return mtpy.mt_drand() + mtpy.mt_drand()
Exemplo n.º 7
0
def drand_const():
    mtpy.mt_seed32new(42)
    return mtpy.mt_drand()
Exemplo n.º 8
0
def seed(s):
    mtpy.mt_seed32new(s)
Exemplo n.º 9
0
def seed_const():
    mtpy.mt_seed32new(42)
Exemplo n.º 10
0
 def seed(s):
     #random.seed(s)
     mtpy.mt_seed32new(s)
Exemplo n.º 11
0
def drand(s):
    mtpy.mt_seed32new(s)
    return mtpy.mt_drand() + mtpy.mt_drand()
Exemplo n.º 12
0
def drand_const():
    mtpy.mt_seed32new(42)
    return mtpy.mt_drand()
Exemplo n.º 13
0
def seed(s):
    mtpy.mt_seed32new(s)
Exemplo n.º 14
0
def seed_const():
    mtpy.mt_seed32new(42)