def main(): #Creates SSA version of model. SSAmodel,state_names,param_names=StochModel() #calls and runs stochkit trajectories = stk.stochkit(SSAmodel,job_id='test',t=75,number_of_trajectories=100,increment=0.1) #evaluation bit StochEval = stk.StochEval(trajectories,state_names,param_names,vol) StochEval.PlotAvg('p',color='blue') pl.show() pdb.set_trace()
def main(): #Creates SSA version of model. ODEmodel, SSAmodel, state_names, param_names = FullModel(True) ODEsol = ctb.CircEval(ODEmodel, param, y0in) y0LC = ODEsol.burnTransient_sim(tf=000, numsteps=1000) sol = ODEsol.intODEs_sim(y0LC, 10, numsteps=1000) tsol = ODEsol.ts pdb.set_trace() trajectories = stk.stochkit(SSAmodel, job_id='tyson', t=10, number_of_trajectories=100, increment=0.1) StochEval = stk.StochEval(trajectories, state_names, param_names, vol) StochEval.PlotAvg('X', color='red', traces=True) StochEval.PlotAvg('Y', color='black', traces=True) pl.plot(tsol, vol * sol) pl.show() pdb.set_trace()
sol = ODEsolC.intODEs_sim(100) tsol = ODEsolC.ts plt.plot(sol) plt.show() tf=10 inc = 0.05 adjacency = np.array([[1,1,0],[0,1,1],[0,0,1]])#, #[0,0.5,0.5,0], #[0,0,0.5,0], #[0,0,0,0]]) SSAnet,state_names,param_names = SSAnetwork(ODEmodel(), y0in,param,adjacency) pdb.set_trace() traj = stk.stochkit(SSAnet,job_id='threestate',t=tf, number_of_trajectories=1,increment=inc, seed=11) plt.plot(traj[:,1:]) pass
#find where we should rewire rewire = (np.random.rand(len(locs[0])) <= beta) for i in xrange(len(rewire)): if rewire[i] == True: #remove conn1 adjacency[locs[0][i],locs[1][i]] = 0 adjacency[np.random.randint(cellcount),locs[1][i]] = 1 plt.imshow(ring) plt.figure() plt.imshow(adjacency) pdb.set_trace() SSAnet,state_names,param_names = SSAnetwork(ODEmodel(), y0in,param,adjacency) traj = stk.stochkit(SSAnet,job_id='beta0.1_network',t=tf, number_of_trajectories=1,increment=inc, seed=11) plt.plot(traj[0][:,1:]) pass