Skip to content

Commit 88ca1fa

Browse files
authored
Merge pull request polca#164 from polca/ei310
Ei310
2 parents f34d894 + 8c207de commit 88ca1fa

33 files changed

+6123
-896
lines changed

dev/Untitled.ipynb

+31-134
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 9,
5+
"execution_count": 1,
66
"id": "9072abc3-ba48-4b33-945e-7696686bb30d",
77
"metadata": {},
88
"outputs": [],
@@ -13,131 +13,7 @@
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": 25,
17-
"id": "fbe36131-cd47-4a6a-ba7c-bf85b170740c",
18-
"metadata": {},
19-
"outputs": [
20-
{
21-
"data": {
22-
"text/plain": [
23-
"Brightway2 projects manager with 3 objects:\n",
24-
"\tdefault\n",
25-
"\tei39\n",
26-
"\tnew4\n",
27-
"Use `projects.report()` to get a report on all projects."
28-
]
29-
},
30-
"execution_count": 25,
31-
"metadata": {},
32-
"output_type": "execute_result"
33-
}
34-
],
35-
"source": [
36-
"bw2data.projects"
37-
]
38-
},
39-
{
40-
"cell_type": "code",
41-
"execution_count": 7,
42-
"id": "2969f3c0-1073-44ef-9beb-5e31989b2c2b",
43-
"metadata": {},
44-
"outputs": [
45-
{
46-
"name": "stdout",
47-
"output_type": "stream",
48-
"text": [
49-
"Vacuuming database \n",
50-
"Vacuuming database \n",
51-
"Vacuuming database \n",
52-
"Vacuuming database \n",
53-
"Vacuuming database \n",
54-
"Vacuuming database \n",
55-
"Vacuuming database \n",
56-
"Vacuuming database \n",
57-
"Vacuuming database \n",
58-
"Vacuuming database \n",
59-
"Vacuuming database \n",
60-
"Vacuuming database \n",
61-
"Vacuuming database \n",
62-
"Vacuuming database \n",
63-
"Vacuuming database \n",
64-
"Vacuuming database \n",
65-
"Vacuuming database \n",
66-
"Vacuuming database \n",
67-
"Vacuuming database \n",
68-
"Vacuuming database \n",
69-
"Vacuuming database \n",
70-
"Vacuuming database \n",
71-
"Vacuuming database \n",
72-
"Vacuuming database \n",
73-
"Vacuuming database \n",
74-
"Vacuuming database \n",
75-
"Vacuuming database \n",
76-
"Vacuuming database \n",
77-
"Vacuuming database \n",
78-
"Vacuuming database \n",
79-
"Vacuuming database \n",
80-
"Vacuuming database \n",
81-
"Vacuuming database \n",
82-
"Vacuuming database \n",
83-
"Vacuuming database \n",
84-
"Vacuuming database \n",
85-
"Vacuuming database \n",
86-
"Vacuuming database \n",
87-
"Vacuuming database \n",
88-
"Vacuuming database \n",
89-
"Vacuuming database \n",
90-
"Vacuuming database \n",
91-
"Vacuuming database \n",
92-
"Vacuuming database \n",
93-
"Vacuuming database \n",
94-
"Vacuuming database \n",
95-
"Vacuuming database \n",
96-
"Vacuuming database \n",
97-
"Vacuuming database \n",
98-
"Vacuuming database \n",
99-
"Vacuuming database \n"
100-
]
101-
}
102-
],
103-
"source": [
104-
"import bw2data\n",
105-
"bw2data.projects.set_current(\"ei39\")\n",
106-
"\n",
107-
"dbs = [\n",
108-
" db for db in bw2data.databases if db not in [\n",
109-
" \"biosphere3\",\n",
110-
" \"ecoinvent 3.9.1 cutoff\"\n",
111-
" ]\n",
112-
"]\n",
113-
"for db in dbs:\n",
114-
" del bw2data.databases[db]"
115-
]
116-
},
117-
{
118-
"cell_type": "code",
119-
"execution_count": 8,
120-
"id": "c23776c7-6f4b-4d34-bb2a-fa148340c62c",
121-
"metadata": {},
122-
"outputs": [
123-
{
124-
"data": {
125-
"text/plain": [
126-
"['biosphere3', 'ecoinvent 3.9.1 cutoff']"
127-
]
128-
},
129-
"execution_count": 8,
130-
"metadata": {},
131-
"output_type": "execute_result"
132-
}
133-
],
134-
"source": [
135-
"list(bw2data.databases)"
136-
]
137-
},
138-
{
139-
"cell_type": "code",
140-
"execution_count": 1,
16+
"execution_count": 2,
14117
"id": "f8e0a4cb-a226-4ab7-a093-015ea48749d0",
14218
"metadata": {
14319
"tags": []
@@ -147,7 +23,7 @@
14723
"name": "stdout",
14824
"output_type": "stream",
14925
"text": [
150-
"premise v.(2, 1, 0, 'dev5')\n",
26+
"premise v.(2, 1, 0)\n",
15127
"+------------------------------------------------------------------+\n",
15228
"| Warning |\n",
15329
"+------------------------------------------------------------------+\n",
@@ -219,15 +95,15 @@
21995
},
22096
{
22197
"cell_type": "code",
222-
"execution_count": 2,
98+
"execution_count": 3,
22399
"id": "0b728a1d-97ca-446e-9213-122530e198a2",
224100
"metadata": {},
225101
"outputs": [
226102
{
227103
"name": "stderr",
228104
"output_type": "stream",
229105
"text": [
230-
"Processing scenarios: 100%|█████████████| 1/1 [01:24<00:00, 84.58s/it]"
106+
"Processing scenarios: 100%|█████████████| 1/1 [01:11<00:00, 71.05s/it]"
231107
]
232108
},
233109
{
@@ -256,18 +132,39 @@
256132
},
257133
{
258134
"cell_type": "code",
259-
"execution_count": 3,
135+
"execution_count": 4,
260136
"id": "211a6853-25fe-4c87-999f-542a1266c678",
261137
"metadata": {},
262138
"outputs": [
263139
{
264140
"name": "stdout",
265141
"output_type": "stream",
266142
"text": [
267-
"Write new database(s) to matrix.\n",
143+
"Write new database(s) to Brightway.\n",
268144
"Running all checks...\n",
269-
"Minor anomalies found: check the change report.\n",
270-
"Matrices saved in /Users/romain/GitHub/premise/dev/export/remind/SSP2-PkBudg500/2050.\n",
145+
"Minor anomalies found: check the change report.\n"
146+
]
147+
},
148+
{
149+
"name": "stderr",
150+
"output_type": "stream",
151+
"text": [
152+
"Writing activities to SQLite3 database:\n",
153+
"0% [##############################] 100% | ETA: 00:00:00\n",
154+
"Total time elapsed: 00:00:25\n"
155+
]
156+
},
157+
{
158+
"name": "stdout",
159+
"output_type": "stream",
160+
"text": [
161+
"Title: Writing activities to SQLite3 database:\n",
162+
" Started: 05/17/2024 10:51:40\n",
163+
" Finished: 05/17/2024 10:52:06\n",
164+
" Total time elapsed: 00:00:25\n",
165+
" CPU %: 90.10\n",
166+
" Memory %: 14.69\n",
167+
"Created database: ei_cutoff_3.9_remind_SSP2-PkBudg500_2050 2024-05-17\n",
271168
"Generate scenario report.\n",
272169
"Report saved under /Users/romain/GitHub/premise/dev/export/scenario_report.\n",
273170
"Generate change report.\n",
@@ -276,7 +173,7 @@
276173
}
277174
],
278175
"source": [
279-
"ndb.write_db_to_matrices()"
176+
"ndb.write_db_to_brightway()"
280177
]
281178
},
282179
{

0 commit comments

Comments
 (0)