Skip to content

Commit 7492d1c

Browse files
committed
Adds a sample demo application
1 parent 89f2a07 commit 7492d1c

11 files changed

+1225
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Python Demo Console App for Open-IMO-CII-Calculator
2+
3+
This directory contains a small Python console application that mirrors the demo functionality of the C# app in `EtiveMor.OpenImoCiiCalculator.DemoConsoleApp`.
4+
5+
- See `main.py` for entry point.
6+
- Run with: `python main.py`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.json
2+
3+
!3b6c5150-8e0a-45bf-9094-5edb474d04ee-multi-fuel-demo.json
4+
!35acf7dc-60a3-4a6a-9773-a22c9f5fc699-single-fuel-demo.json
5+
!b3fa068c-1312-4486-8090-ca2f2faf27a3-single-fuel-gas-carrier-demo.json
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This directory will contain output JSON files from demo runs.
2+
# Files are named as {uuid}-single-fuel-demo.json or {uuid}-multi-fuel-demo.json
Lines changed: 328 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,328 @@
1+
{
2+
"results": [
3+
{
4+
"is_measured_year": true,
5+
"is_estimated_year": false,
6+
"year": 2019,
7+
"required_cii": 19.184190519387734,
8+
"attained_cii": 16.243733333333335,
9+
"attained_required_ratio": 0.8467249799733408,
10+
"rating": 2,
11+
"calculated_co2e_emissions": 60914000000.0,
12+
"calculated_ship_capacity": 25000,
13+
"calculated_transport_work": 3750000000,
14+
"vector_boundaries_for_year": {
15+
"year": 2019,
16+
"ship_type": 110,
17+
"weight_classification": {
18+
"upper_limit": 0,
19+
"lower_limit": Infinity
20+
},
21+
"capacity_unit": 3,
22+
"boundary_dd_vectors": {
23+
"1": 14.579984794734678,
24+
"2": 17.649455277836715,
25+
"3": 21.869977192102013,
26+
"4": 24.939447675204054
27+
}
28+
}
29+
},
30+
{
31+
"is_measured_year": false,
32+
"is_estimated_year": true,
33+
"year": 2020,
34+
"required_cii": 18.992348614193855,
35+
"attained_cii": 16.243733333333335,
36+
"attained_required_ratio": 0.8552777575488293,
37+
"rating": 2,
38+
"calculated_co2e_emissions": 60914000000.0,
39+
"calculated_ship_capacity": 25000,
40+
"calculated_transport_work": 3750000000,
41+
"vector_boundaries_for_year": {
42+
"year": 2020,
43+
"ship_type": 110,
44+
"weight_classification": {
45+
"upper_limit": 0,
46+
"lower_limit": Infinity
47+
},
48+
"capacity_unit": 3,
49+
"boundary_dd_vectors": {
50+
"1": 14.43418494678733,
51+
"2": 17.472960725058346,
52+
"3": 21.651277420180993,
53+
"4": 24.690053198452013
54+
}
55+
}
56+
},
57+
{
58+
"is_measured_year": false,
59+
"is_estimated_year": true,
60+
"year": 2021,
61+
"required_cii": 18.80050670899998,
62+
"attained_cii": 16.243733333333335,
63+
"attained_required_ratio": 0.8640050816054499,
64+
"rating": 2,
65+
"calculated_co2e_emissions": 60914000000.0,
66+
"calculated_ship_capacity": 25000,
67+
"calculated_transport_work": 3750000000,
68+
"vector_boundaries_for_year": {
69+
"year": 2021,
70+
"ship_type": 110,
71+
"weight_classification": {
72+
"upper_limit": 0,
73+
"lower_limit": Infinity
74+
},
75+
"capacity_unit": 3,
76+
"boundary_dd_vectors": {
77+
"1": 14.288385098839985,
78+
"2": 17.29646617227998,
79+
"3": 21.432577648259976,
80+
"4": 24.440658721699975
81+
}
82+
}
83+
},
84+
{
85+
"is_measured_year": false,
86+
"is_estimated_year": true,
87+
"year": 2022,
88+
"required_cii": 18.6086648038061,
89+
"attained_cii": 16.243733333333335,
90+
"attained_required_ratio": 0.8729123504879803,
91+
"rating": 2,
92+
"calculated_co2e_emissions": 60914000000.0,
93+
"calculated_ship_capacity": 25000,
94+
"calculated_transport_work": 3750000000,
95+
"vector_boundaries_for_year": {
96+
"year": 2022,
97+
"ship_type": 110,
98+
"weight_classification": {
99+
"upper_limit": 0,
100+
"lower_limit": Infinity
101+
},
102+
"capacity_unit": 3,
103+
"boundary_dd_vectors": {
104+
"1": 14.142585250892637,
105+
"2": 17.119971619501612,
106+
"3": 21.21387787633895,
107+
"4": 24.19126424494793
108+
}
109+
}
110+
},
111+
{
112+
"is_measured_year": false,
113+
"is_estimated_year": true,
114+
"year": 2023,
115+
"required_cii": 18.224980993418345,
116+
"attained_cii": 16.243733333333335,
117+
"attained_required_ratio": 0.8912894526035168,
118+
"rating": 2,
119+
"calculated_co2e_emissions": 60914000000.0,
120+
"calculated_ship_capacity": 25000,
121+
"calculated_transport_work": 3750000000,
122+
"vector_boundaries_for_year": {
123+
"year": 2023,
124+
"ship_type": 110,
125+
"weight_classification": {
126+
"upper_limit": 0,
127+
"lower_limit": Infinity
128+
},
129+
"capacity_unit": 3,
130+
"boundary_dd_vectors": {
131+
"1": 13.850985554997942,
132+
"2": 16.76698251394488,
133+
"3": 20.77647833249691,
134+
"4": 23.69247529144385
135+
}
136+
}
137+
},
138+
{
139+
"is_measured_year": false,
140+
"is_estimated_year": true,
141+
"year": 2024,
142+
"required_cii": 17.84129718303059,
143+
"attained_cii": 16.243733333333335,
144+
"attained_required_ratio": 0.9104569677132699,
145+
"rating": 2,
146+
"calculated_co2e_emissions": 60914000000.0,
147+
"calculated_ship_capacity": 25000,
148+
"calculated_transport_work": 3750000000,
149+
"vector_boundaries_for_year": {
150+
"year": 2024,
151+
"ship_type": 110,
152+
"weight_classification": {
153+
"upper_limit": 0,
154+
"lower_limit": Infinity
155+
},
156+
"capacity_unit": 3,
157+
"boundary_dd_vectors": {
158+
"1": 13.55938585910325,
159+
"2": 16.413993408388144,
160+
"3": 20.33907878865487,
161+
"4": 23.19368633793977
162+
}
163+
}
164+
},
165+
{
166+
"is_measured_year": false,
167+
"is_estimated_year": true,
168+
"year": 2025,
169+
"required_cii": 17.45761337264284,
170+
"attained_cii": 16.243733333333335,
171+
"attained_required_ratio": 0.9304670109597152,
172+
"rating": 3,
173+
"calculated_co2e_emissions": 60914000000.0,
174+
"calculated_ship_capacity": 25000,
175+
"calculated_transport_work": 3750000000,
176+
"vector_boundaries_for_year": {
177+
"year": 2025,
178+
"ship_type": 110,
179+
"weight_classification": {
180+
"upper_limit": 0,
181+
"lower_limit": Infinity
182+
},
183+
"capacity_unit": 3,
184+
"boundary_dd_vectors": {
185+
"1": 13.267786163208559,
186+
"2": 16.061004302831414,
187+
"3": 19.901679244812836,
188+
"4": 22.69489738443569
189+
}
190+
}
191+
},
192+
{
193+
"is_measured_year": false,
194+
"is_estimated_year": true,
195+
"year": 2026,
196+
"required_cii": 17.073929562255085,
197+
"attained_cii": 16.243733333333335,
198+
"attained_required_ratio": 0.9513763819925177,
199+
"rating": 3,
200+
"calculated_co2e_emissions": 60914000000.0,
201+
"calculated_ship_capacity": 25000,
202+
"calculated_transport_work": 3750000000,
203+
"vector_boundaries_for_year": {
204+
"year": 2026,
205+
"ship_type": 110,
206+
"weight_classification": {
207+
"upper_limit": 0,
208+
"lower_limit": Infinity
209+
},
210+
"capacity_unit": 3,
211+
"boundary_dd_vectors": {
212+
"1": 12.976186467313864,
213+
"2": 15.708015197274678,
214+
"3": 19.464279700970796,
215+
"4": 22.196108430931613
216+
}
217+
}
218+
},
219+
{
220+
"is_measured_year": false,
221+
"is_estimated_year": true,
222+
"year": 2027,
223+
"required_cii": 16.690245751867327,
224+
"attained_cii": 16.243733333333335,
225+
"attained_required_ratio": 0.9732471034176333,
226+
"rating": 3,
227+
"calculated_co2e_emissions": 60914000000.0,
228+
"calculated_ship_capacity": 25000,
229+
"calculated_transport_work": 3750000000,
230+
"vector_boundaries_for_year": {
231+
"year": 2027,
232+
"ship_type": 110,
233+
"weight_classification": {
234+
"upper_limit": 0,
235+
"lower_limit": Infinity
236+
},
237+
"capacity_unit": 3,
238+
"boundary_dd_vectors": {
239+
"1": 12.684586771419168,
240+
"2": 15.35502609171794,
241+
"3": 19.02688015712875,
242+
"4": 21.697319477427527
243+
}
244+
}
245+
},
246+
{
247+
"is_measured_year": false,
248+
"is_estimated_year": true,
249+
"year": 2028,
250+
"required_cii": 16.306561941479572,
251+
"attained_cii": 16.243733333333335,
252+
"attained_required_ratio": 0.996147035262754,
253+
"rating": 3,
254+
"calculated_co2e_emissions": 60914000000.0,
255+
"calculated_ship_capacity": 25000,
256+
"calculated_transport_work": 3750000000,
257+
"vector_boundaries_for_year": {
258+
"year": 2028,
259+
"ship_type": 110,
260+
"weight_classification": {
261+
"upper_limit": 0,
262+
"lower_limit": Infinity
263+
},
264+
"capacity_unit": 3,
265+
"boundary_dd_vectors": {
266+
"1": 12.392987075524475,
267+
"2": 15.002036986161206,
268+
"3": 18.58948061328671,
269+
"4": 21.198530523923445
270+
}
271+
}
272+
},
273+
{
274+
"is_measured_year": false,
275+
"is_estimated_year": true,
276+
"year": 2029,
277+
"required_cii": 15.922878131091819,
278+
"attained_cii": 16.243733333333335,
279+
"attained_required_ratio": 1.0201505782811335,
280+
"rating": 3,
281+
"calculated_co2e_emissions": 60914000000.0,
282+
"calculated_ship_capacity": 25000,
283+
"calculated_transport_work": 3750000000,
284+
"vector_boundaries_for_year": {
285+
"year": 2029,
286+
"ship_type": 110,
287+
"weight_classification": {
288+
"upper_limit": 0,
289+
"lower_limit": Infinity
290+
},
291+
"capacity_unit": 3,
292+
"boundary_dd_vectors": {
293+
"1": 12.101387379629783,
294+
"2": 14.649047880604474,
295+
"3": 18.152081069444673,
296+
"4": 20.699741570419366
297+
}
298+
}
299+
},
300+
{
301+
"is_measured_year": false,
302+
"is_estimated_year": true,
303+
"year": 2030,
304+
"required_cii": 15.539194320704066,
305+
"attained_cii": 16.243733333333335,
306+
"attained_required_ratio": 1.0453394814485688,
307+
"rating": 3,
308+
"calculated_co2e_emissions": 60914000000.0,
309+
"calculated_ship_capacity": 25000,
310+
"calculated_transport_work": 3750000000,
311+
"vector_boundaries_for_year": {
312+
"year": 2030,
313+
"ship_type": 110,
314+
"weight_classification": {
315+
"upper_limit": 0,
316+
"lower_limit": Infinity
317+
},
318+
"capacity_unit": 3,
319+
"boundary_dd_vectors": {
320+
"1": 11.80978768373509,
321+
"2": 14.296058775047742,
322+
"3": 17.714681525602632,
323+
"4": 20.200952616915288
324+
}
325+
}
326+
}
327+
]
328+
}

0 commit comments

Comments
 (0)