|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "code",
|
5 |
| - "execution_count": 9, |
| 5 | + "execution_count": 1, |
6 | 6 | "id": "9072abc3-ba48-4b33-945e-7696686bb30d",
|
7 | 7 | "metadata": {},
|
8 | 8 | "outputs": [],
|
|
13 | 13 | },
|
14 | 14 | {
|
15 | 15 | "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, |
141 | 17 | "id": "f8e0a4cb-a226-4ab7-a093-015ea48749d0",
|
142 | 18 | "metadata": {
|
143 | 19 | "tags": []
|
|
147 | 23 | "name": "stdout",
|
148 | 24 | "output_type": "stream",
|
149 | 25 | "text": [
|
150 |
| - "premise v.(2, 1, 0, 'dev5')\n", |
| 26 | + "premise v.(2, 1, 0)\n", |
151 | 27 | "+------------------------------------------------------------------+\n",
|
152 | 28 | "| Warning |\n",
|
153 | 29 | "+------------------------------------------------------------------+\n",
|
|
219 | 95 | },
|
220 | 96 | {
|
221 | 97 | "cell_type": "code",
|
222 |
| - "execution_count": 2, |
| 98 | + "execution_count": 3, |
223 | 99 | "id": "0b728a1d-97ca-446e-9213-122530e198a2",
|
224 | 100 | "metadata": {},
|
225 | 101 | "outputs": [
|
226 | 102 | {
|
227 | 103 | "name": "stderr",
|
228 | 104 | "output_type": "stream",
|
229 | 105 | "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]" |
231 | 107 | ]
|
232 | 108 | },
|
233 | 109 | {
|
|
256 | 132 | },
|
257 | 133 | {
|
258 | 134 | "cell_type": "code",
|
259 |
| - "execution_count": 3, |
| 135 | + "execution_count": 4, |
260 | 136 | "id": "211a6853-25fe-4c87-999f-542a1266c678",
|
261 | 137 | "metadata": {},
|
262 | 138 | "outputs": [
|
263 | 139 | {
|
264 | 140 | "name": "stdout",
|
265 | 141 | "output_type": "stream",
|
266 | 142 | "text": [
|
267 |
| - "Write new database(s) to matrix.\n", |
| 143 | + "Write new database(s) to Brightway.\n", |
268 | 144 | "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", |
271 | 168 | "Generate scenario report.\n",
|
272 | 169 | "Report saved under /Users/romain/GitHub/premise/dev/export/scenario_report.\n",
|
273 | 170 | "Generate change report.\n",
|
|
276 | 173 | }
|
277 | 174 | ],
|
278 | 175 | "source": [
|
279 |
| - "ndb.write_db_to_matrices()" |
| 176 | + "ndb.write_db_to_brightway()" |
280 | 177 | ]
|
281 | 178 | },
|
282 | 179 | {
|
|
0 commit comments