forked from Prosimio/Cellular_Growth_CA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ratios_simulations.py
30 lines (22 loc) · 919 Bytes
/
ratios_simulations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 30 21:55:18 2018
@author: Prosimios
"""
import pickle as pkl
def save_obj(obj, name, folder ):
with open(folder+'/'+ name + '.pkl', 'wb') as f:
pkl.dump(obj, f, pkl.HIGHEST_PROTOCOL)
def load_obj(name, folder ):
with open(folder+'/' + name + '.pkl', 'rb') as f:
return pkl.load(f)
GRR = ['1:1','20:19','10:9','8:7','4:3','3:2','2:1']
all_sims = []
filename_path = 'D:/Dropbox/Dia dia/Sistemas complejos IIQ3763/Isaac/Semestral project/Codes/Cellular_Growth_CA/celular_growth_ca.py'
work_dir = 'D:/Dropbox/Dia dia/Sistemas complejos IIQ3763/Isaac/Semestral project/Codes/Cellular_Growth_CA'
for i in range(len(GRR)):
argums = '150 100 15000 ' + GRR[i]
runfile(filename_path, args = argums , wdir= work_dir)
ratio_values = load_obj('ratios', 'data' )
all_sims.append(ratio_values)
save_obj(all_sims, 'all_ratios', 'data')