-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMC_simulation.py
More file actions
84 lines (68 loc) · 2.83 KB
/
MC_simulation.py
File metadata and controls
84 lines (68 loc) · 2.83 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
from project_class import *
from building_matrices import *
import pickle
from CommonData import *
#from CommonData_for_Sensitivity_Analysis import *
from Compost_use import *
from time import time
from Store_results import *
from brightway2 import *
if __name__=='__main__':
demo = pickle.load(open("Compost_use","rb"))
project = "Compost_use"
projects.set_current(project)
db = Database("waste")
functional_unit = {db.get("scenario1") : 1}
method = [('IPCC 2013, Ecoinvent V3.5', 'climate change', 'GWP 100a, bioCO2=1, C1_36'),
('IPCC 2013, Ecoinvent V3.5', 'climate change', 'GWP 100a, bioCO2=0, C1_36'),
('IPCC 2007, Ecoinvent V3.5', 'climate change', 'GWP 100a, bioCO2=1'),
('IPCC 2007, Ecoinvent V3.5', 'climate change', 'GWP 100a, bioCO2=0'),
('SWOLF_Acidification','SWOLF'),
('SWOLF_Eutrophication','SWOLF'),
('SWOLF_CED','SWOLF'),
('CML (v4.4, 2015)', 'resources', 'depletion of abiotic resources - elements, ultimate reserves')
]
Treatment_processes = {}
Treatment_processes['Compost_use']={'input_type':[],'model': Compost_use()}
process_models = list()
process_model_names = list()
process_models.append(Treatment_processes['Compost_use']['model'])
process_model_names.append('Compost_use')
CommonData = CommonData()
t1 = time()
n=20000
a = ParallelData(functional_unit, method, project,process_models=process_models,process_model_names=process_model_names,common_data =CommonData ,seed = 100)
a.run(8,n)
t2=time()
print(n, 'runs in: ', t2-t1)
Results=store_results(a.results)
AAA = Results
#Results.to_pickle('BU1_Peat')
#Results=pd.read_pickle('BU1_Peat')
# =============================================================================
# contour plots
# ('initflow', 'C_cont')
# 'list': np.linspace(0.10,0.47,10).tolist()*10
# ('Lanfill', 'percCStor_LF')
# 'list': np.repeat(np.linspace(40,100,10),10)
#
#
# =============================================================================
# =============================================================================
#
# ('Land_app', 'PeatSubFac')
# 'list': np.linspace(0,1,10).tolist()*10
# ('Land_app', 'densPeat')
# 'list': np.repeat(np.linspace(100,600,10),10)
#
# =============================================================================
# =============================================================================
# ('initflow', 'C_cont')
# 'list':np.repeat(np.linspace(0.10,0.47,10),10)
# ('Material_Properties', 'mcFC')
# 'list':np.linspace(0.18,0.67,10).tolist()*10
# =============================================================================
# ('initflow', 'N_cont')
# 'list':np.repeat(np.linspace(0.0051,0.028,10),10)
# MFEN
# 'list':np.linspace(0,1,10).tolist()*10