chellow 1723041465.0.0__py3-none-any.whl → 1723459091.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chellow might be problematic. Click here for more details.
- chellow/e/computer.py +22 -22
- chellow/e/dno_rate_parser.py +8 -1
- chellow/e/scenario.py +68 -68
- chellow/e/views.py +8 -8
- chellow/models.py +40 -28
- chellow/reports/report_109.py +6 -5
- chellow/reports/report_247.py +146 -151
- chellow/reports/report_59.py +134 -87
- chellow/templates/e/csv_sites_hh_data.html +2 -2
- chellow/templates/e/em_months.html +18 -18
- chellow/templates/e/scenario_docs.html +6 -6
- chellow/templates/site.html +2 -2
- chellow/templates/site_months.html +18 -18
- chellow/views.py +11 -11
- {chellow-1723041465.0.0.dist-info → chellow-1723459091.0.0.dist-info}/METADATA +1 -1
- {chellow-1723041465.0.0.dist-info → chellow-1723459091.0.0.dist-info}/RECORD +17 -17
- {chellow-1723041465.0.0.dist-info → chellow-1723459091.0.0.dist-info}/WHEEL +0 -0
chellow/reports/report_59.py
CHANGED
|
@@ -139,8 +139,8 @@ def _process_site(
|
|
|
139
139
|
"site-name": site.name,
|
|
140
140
|
}
|
|
141
141
|
for sname in (
|
|
142
|
-
"import-
|
|
143
|
-
"export-
|
|
142
|
+
"import-grid",
|
|
143
|
+
"export-grid",
|
|
144
144
|
"import-gen",
|
|
145
145
|
"export-gen",
|
|
146
146
|
"import-3rd-party",
|
|
@@ -148,10 +148,11 @@ def _process_site(
|
|
|
148
148
|
"msp",
|
|
149
149
|
"used",
|
|
150
150
|
"used-3rd-party",
|
|
151
|
-
"billed-import-net",
|
|
152
151
|
):
|
|
153
|
-
for xname in ("kwh", "gbp"):
|
|
152
|
+
for xname in ("kwh", "net-gbp"):
|
|
154
153
|
vals[f"{sname}-{xname}"] = 0
|
|
154
|
+
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
155
|
+
vals[f"billed-import-grid-{suf}"] = 0
|
|
155
156
|
|
|
156
157
|
if imp_mpan_core == "displaced":
|
|
157
158
|
try:
|
|
@@ -172,9 +173,15 @@ def _process_site(
|
|
|
172
173
|
},
|
|
173
174
|
)
|
|
174
175
|
|
|
175
|
-
vals["billed-supplier-import-net-gbp"] = None
|
|
176
|
-
vals["billed-
|
|
177
|
-
vals["billed-
|
|
176
|
+
vals["billed-supplier-import-grid-net-gbp"] = None
|
|
177
|
+
vals["billed-supplier-import-grid-vat-gbp"] = None
|
|
178
|
+
vals["billed-supplier-import-grid-gross-gbp"] = None
|
|
179
|
+
vals["billed-dc-import-grid-net-gbp"] = None
|
|
180
|
+
vals["billed-dc-import-grid-vat-gbp"] = None
|
|
181
|
+
vals["billed-dc-import-grid-gross-gbp"] = None
|
|
182
|
+
vals["billed-mop-import-grid-net-gbp"] = None
|
|
183
|
+
vals["billed-mop-import-grid-vat-gbp"] = None
|
|
184
|
+
vals["billed-mop-import-grid-gross-gbp"] = None
|
|
178
185
|
|
|
179
186
|
vals["used-kwh"] = vals["displaced-kwh"] = sum(
|
|
180
187
|
hh["msp-kwh"] for hh in imp_ss.hh_data
|
|
@@ -184,7 +191,7 @@ def _process_site(
|
|
|
184
191
|
|
|
185
192
|
gbp = disp_supplier_bill.get("net-gbp", 0)
|
|
186
193
|
|
|
187
|
-
vals["used-gbp"] = vals["displaced-gbp"] = gbp
|
|
194
|
+
vals["used-net-gbp"] = vals["displaced-net-gbp"] = gbp
|
|
188
195
|
|
|
189
196
|
vals["imp-supplier-contract"] = imp_ss.supplier_contract.name
|
|
190
197
|
vals["metering-type"] = imp_ss.era.meter_category
|
|
@@ -217,9 +224,10 @@ def _process_site(
|
|
|
217
224
|
|
|
218
225
|
site_sources.add(source_code)
|
|
219
226
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
227
|
+
for suf in ("net-gbp", "vat-gbp", "gross-gbp"):
|
|
228
|
+
vals["billed-supplier-import-grid-{suf}"] = 0
|
|
229
|
+
vals["billed-dc-import-grid-{suf}"] = 0
|
|
230
|
+
vals["billed-mop-import-grid-{suf}"] = 0
|
|
223
231
|
|
|
224
232
|
if imp_ss is None:
|
|
225
233
|
imp_bad_hhs = imp_bad_kwh = imp_supplier_contract_name = None
|
|
@@ -256,26 +264,26 @@ def _process_site(
|
|
|
256
264
|
|
|
257
265
|
gbp = imp_supplier_bill.get("net-gbp", 0)
|
|
258
266
|
|
|
259
|
-
if source_code in ("
|
|
260
|
-
vals["import-net-gbp"] += gbp
|
|
261
|
-
vals["import-
|
|
262
|
-
vals["used-gbp"] += gbp
|
|
267
|
+
if source_code in ("grid", "gen-grid"):
|
|
268
|
+
vals["import-grid-net-gbp"] += gbp
|
|
269
|
+
vals["import-grid-kwh"] += kwh
|
|
270
|
+
vals["used-net-gbp"] += gbp
|
|
263
271
|
vals["used-kwh"] += kwh
|
|
264
|
-
if source_code == "gen-
|
|
272
|
+
if source_code == "gen-grid":
|
|
265
273
|
vals["export-gen-kwh"] += kwh
|
|
266
274
|
elif source_code == "3rd-party":
|
|
267
|
-
vals["import-3rd-party-gbp"] += gbp
|
|
275
|
+
vals["import-3rd-party-net-gbp"] += gbp
|
|
268
276
|
vals["import-3rd-party-kwh"] += kwh
|
|
269
|
-
vals["used-3rd-party-gbp"] += gbp
|
|
277
|
+
vals["used-3rd-party-net-gbp"] += gbp
|
|
270
278
|
vals["used-3rd-party-kwh"] += kwh
|
|
271
|
-
vals["used-gbp"] += gbp
|
|
279
|
+
vals["used-net-gbp"] += gbp
|
|
272
280
|
vals["used-kwh"] += kwh
|
|
273
281
|
elif source_code == "3rd-party-reverse":
|
|
274
|
-
vals["export-3rd-party-gbp"] += gbp
|
|
282
|
+
vals["export-3rd-party-net-gbp"] += gbp
|
|
275
283
|
vals["export-3rd-party-kwh"] += kwh
|
|
276
|
-
vals["used-3rd-party-gbp"] -= gbp
|
|
284
|
+
vals["used-3rd-party-net-gbp"] -= gbp
|
|
277
285
|
vals["used-3rd-party-kwh"] -= kwh
|
|
278
|
-
vals["used-gbp"] -= gbp
|
|
286
|
+
vals["used-net-gbp"] -= gbp
|
|
279
287
|
vals["used-kwh"] -= kwh
|
|
280
288
|
elif source_code == "gen":
|
|
281
289
|
vals["import-gen-kwh"] += kwh
|
|
@@ -312,24 +320,24 @@ def _process_site(
|
|
|
312
320
|
gbp = exp_supplier_bill.get("net-gbp", 0)
|
|
313
321
|
|
|
314
322
|
if source_code in ("net", "gen-net"):
|
|
315
|
-
vals["export-net-gbp"] += gbp
|
|
316
|
-
vals["export-net-kwh"] += kwh
|
|
323
|
+
vals["export-grid-net-gbp"] += gbp
|
|
324
|
+
vals["export-grid-net-kwh"] += kwh
|
|
317
325
|
if source_code == "gen-net":
|
|
318
326
|
vals["import-gen-kwh"] += kwh
|
|
319
327
|
|
|
320
328
|
elif source_code == "3rd-party":
|
|
321
|
-
vals["export-3rd-party-gbp"] += gbp
|
|
329
|
+
vals["export-3rd-party-net-gbp"] += gbp
|
|
322
330
|
vals["export-3rd-party-kwh"] += kwh
|
|
323
|
-
vals["used-3rd-party-gbp"] -= gbp
|
|
331
|
+
vals["used-3rd-party-net-gbp"] -= gbp
|
|
324
332
|
vals["used-3rd-party-kwh"] -= kwh
|
|
325
|
-
vals["used-gbp"] -= gbp
|
|
333
|
+
vals["used-net-gbp"] -= gbp
|
|
326
334
|
vals["used-kwh"] -= kwh
|
|
327
335
|
elif source_code == "3rd-party-reverse":
|
|
328
|
-
vals["import-3rd-party-gbp"] += gbp
|
|
336
|
+
vals["import-3rd-party-net-gbp"] += gbp
|
|
329
337
|
vals["import-3rd-party-kwh"] += kwh
|
|
330
|
-
vals["used-3rd-party-gbp"] += gbp
|
|
338
|
+
vals["used-3rd-party-net-gbp"] += gbp
|
|
331
339
|
vals["used-3rd-party-kwh"] += kwh
|
|
332
|
-
vals["used-gbp"] += gbp
|
|
340
|
+
vals["used-net-gbp"] += gbp
|
|
333
341
|
vals["used-kwh"] += kwh
|
|
334
342
|
elif source_code == "gen":
|
|
335
343
|
vals["export-gen-kwh"] += kwh
|
|
@@ -360,14 +368,14 @@ def _process_site(
|
|
|
360
368
|
gbp += mop_bill["net-gbp"]
|
|
361
369
|
|
|
362
370
|
if source_code in ("3rd-party", "3rd-party-reverse"):
|
|
363
|
-
vals["import-3rd-party-gbp"] += gbp
|
|
364
|
-
vals["used-3rd-party-gbp"] += gbp
|
|
371
|
+
vals["import-3rd-party-net-gbp"] += gbp
|
|
372
|
+
vals["used-3rd-party-net-gbp"] += gbp
|
|
365
373
|
else:
|
|
366
|
-
vals["import-net-gbp"] += gbp
|
|
367
|
-
vals["used-gbp"] += gbp
|
|
374
|
+
vals["import-grid-net-gbp"] += gbp
|
|
375
|
+
vals["used-net-gbp"] += gbp
|
|
368
376
|
|
|
369
377
|
generator_type = sss.generator_type_code
|
|
370
|
-
if source_code in ("gen", "gen-
|
|
378
|
+
if source_code in ("gen", "gen-grid"):
|
|
371
379
|
site_gen_types.add(generator_type)
|
|
372
380
|
|
|
373
381
|
era_category = sss.measurement_type
|
|
@@ -391,18 +399,26 @@ def _process_site(
|
|
|
391
399
|
min(bill_finish, sss.finish_date) - max(bill_start, sss.start_date)
|
|
392
400
|
).total_seconds() + (30 * 60)
|
|
393
401
|
proportion = overlap_duration / bill_duration
|
|
394
|
-
vals["billed-import-
|
|
395
|
-
|
|
396
|
-
|
|
402
|
+
vals["billed-import-grid-kwh"] += proportion * float(bill.kwh)
|
|
403
|
+
bill_prop_net_gbp = proportion * float(bill.net)
|
|
404
|
+
bill_prop_vat_gbp = proportion * float(bill.vat)
|
|
405
|
+
bill_prop_gross_gbp = proportion * float(bill.gross)
|
|
406
|
+
vals["billed-import-grid-net-gbp"] += bill_prop_net_gbp
|
|
407
|
+
vals["billed-import-grid-vat-gbp"] += bill_prop_vat_gbp
|
|
408
|
+
vals["billed-import-grid-gross-gbp"] += bill_prop_gross_gbp
|
|
397
409
|
if bill_role_code == "X":
|
|
398
|
-
|
|
410
|
+
role_name = "supplier"
|
|
399
411
|
elif bill_role_code == "C":
|
|
400
|
-
|
|
412
|
+
role_name = "dc"
|
|
401
413
|
elif bill_role_code == "M":
|
|
402
|
-
|
|
414
|
+
role_name = "mop"
|
|
403
415
|
else:
|
|
404
416
|
raise BadRequest("Role code not recognized.")
|
|
405
417
|
|
|
418
|
+
vals[f"billed-{role_name}-import-grid-net-gbp"] += bill_prop_net_gbp
|
|
419
|
+
vals[f"billed-{role_name}-import-grid-vat-gbp"] += bill_prop_vat_gbp
|
|
420
|
+
vals[f"billed-{role_name}-import-grid-gross-gbp"] += bill_prop_gross_gbp
|
|
421
|
+
|
|
406
422
|
vals["imp-mpan-core"] = imp_mpan_core
|
|
407
423
|
vals["exp-mpan-core"] = exp_mpan_core
|
|
408
424
|
vals["associated-site-codes"] = era_associates
|
|
@@ -526,8 +542,8 @@ def _process_site(
|
|
|
526
542
|
"pc": last_era.pc.code,
|
|
527
543
|
}
|
|
528
544
|
for name in (
|
|
529
|
-
"import-
|
|
530
|
-
"export-
|
|
545
|
+
"import-grid",
|
|
546
|
+
"export-grid",
|
|
531
547
|
"import-gen",
|
|
532
548
|
"export-gen",
|
|
533
549
|
"import-3rd-party",
|
|
@@ -535,13 +551,14 @@ def _process_site(
|
|
|
535
551
|
"displaced",
|
|
536
552
|
"used",
|
|
537
553
|
"used-3rd-party",
|
|
538
|
-
"billed-import-net",
|
|
539
554
|
):
|
|
540
|
-
for sname in ("kwh", "gbp"):
|
|
541
|
-
vals[name
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
555
|
+
for sname in ("kwh", "net-gbp"):
|
|
556
|
+
vals[f"{name}-{sname}"] = 0
|
|
557
|
+
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
558
|
+
vals[f"billed-import-grid-{suf}"] = 0
|
|
559
|
+
vals[f"billed-supplier-import-grid-{suf}"] = 0
|
|
560
|
+
vals[f"billed-dc-import-grid-{suf}"] = 0
|
|
561
|
+
vals[f"billed-mop-import-grid-{suf}"] = 0
|
|
545
562
|
|
|
546
563
|
for bill in bills:
|
|
547
564
|
bill_role_code = bill.batch.contract.market_role.code
|
|
@@ -556,20 +573,30 @@ def _process_site(
|
|
|
556
573
|
).total_seconds() + (30 * 60)
|
|
557
574
|
proportion = overlap_duration / bill_duration
|
|
558
575
|
bill_prop_kwh = proportion * float(bill.kwh)
|
|
559
|
-
|
|
576
|
+
bill_prop_net_gbp = proportion * float(bill.net)
|
|
577
|
+
bill_prop_vat_gbp = proportion * float(bill.vat)
|
|
578
|
+
bill_prop_gross_gbp = proportion * float(bill.gross)
|
|
560
579
|
if bill_role_code == "X":
|
|
561
|
-
key = "
|
|
580
|
+
key = "supplier"
|
|
562
581
|
elif bill_role_code == "C":
|
|
563
|
-
key = "
|
|
582
|
+
key = "dc"
|
|
564
583
|
elif bill_role_code == "M":
|
|
565
|
-
key = "
|
|
584
|
+
key = "mop"
|
|
566
585
|
else:
|
|
567
586
|
raise BadRequest("Role code not recognized.")
|
|
568
587
|
|
|
569
588
|
for data in vals, site_data:
|
|
570
|
-
data["billed-import-
|
|
571
|
-
data["billed-import-net-gbp"] +=
|
|
572
|
-
data[
|
|
589
|
+
data["billed-import-grid-kwh"] += bill_prop_kwh
|
|
590
|
+
data["billed-import-grid-net-gbp"] += bill_prop_net_gbp
|
|
591
|
+
data[
|
|
592
|
+
f"billed-{key}-import-grid-net-gbp"
|
|
593
|
+
] += bill_prop_net_gbp
|
|
594
|
+
data[
|
|
595
|
+
f"billed-{key}-import-grid-vat-gbp"
|
|
596
|
+
] += bill_prop_vat_gbp
|
|
597
|
+
data[
|
|
598
|
+
f"billed-{key}-import-grid-gross-gbp"
|
|
599
|
+
] += bill_prop_gross_gbp
|
|
573
600
|
|
|
574
601
|
era_rows.append([make_val(vals.get(t)) for t in era_titles])
|
|
575
602
|
first_era = (
|
|
@@ -604,8 +631,8 @@ def _process_site(
|
|
|
604
631
|
if len(bills) > 0:
|
|
605
632
|
month_data = {}
|
|
606
633
|
for name in (
|
|
607
|
-
"import-
|
|
608
|
-
"export-
|
|
634
|
+
"import-grid",
|
|
635
|
+
"export-grid",
|
|
609
636
|
"import-gen",
|
|
610
637
|
"export-gen",
|
|
611
638
|
"import-3rd-party",
|
|
@@ -613,13 +640,14 @@ def _process_site(
|
|
|
613
640
|
"displaced",
|
|
614
641
|
"used",
|
|
615
642
|
"used-3rd-party",
|
|
616
|
-
"billed-import-net",
|
|
617
643
|
):
|
|
618
|
-
for sname in ("kwh", "gbp"):
|
|
619
|
-
month_data[name
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
644
|
+
for sname in ("kwh", "net-gbp"):
|
|
645
|
+
month_data[f"{name}-{sname}"] = 0
|
|
646
|
+
for suf in ("kwh", "net-gbp", "vat-gbp", "gross-gbp"):
|
|
647
|
+
month_data["billed-import-grid-{suf}"],
|
|
648
|
+
month_data["billed-supplier-import-grid-{suf}"] = 0
|
|
649
|
+
month_data["billed-dc-import-grid-{suf}"] = 0
|
|
650
|
+
month_data["billed-mop-import-grid-{suf}"] = 0
|
|
623
651
|
|
|
624
652
|
for bill in bills:
|
|
625
653
|
bill_role_code = bill.batch.contract.market_role.code
|
|
@@ -634,20 +662,31 @@ def _process_site(
|
|
|
634
662
|
).total_seconds() + (30 * 60)
|
|
635
663
|
proportion = overlap_duration / bill_duration
|
|
636
664
|
bill_prop_kwh = proportion * float(bill.kwh)
|
|
637
|
-
|
|
665
|
+
bill_prop_net_gbp = proportion * float(bill.net)
|
|
666
|
+
bill_prop_vat_gbp = proportion * float(bill.vat)
|
|
667
|
+
bill_prop_gross_gbp = proportion * float(bill.gross)
|
|
638
668
|
if bill_role_code == "X":
|
|
639
|
-
|
|
669
|
+
role_name = "supplier"
|
|
640
670
|
elif bill_role_code == "C":
|
|
641
|
-
key = "
|
|
671
|
+
key = "dc"
|
|
642
672
|
elif bill_role_code == "M":
|
|
643
|
-
key = "
|
|
673
|
+
key = "mop"
|
|
644
674
|
else:
|
|
645
675
|
raise BadRequest("Role code not recognized.")
|
|
646
676
|
|
|
647
677
|
for data in month_data, site_data:
|
|
648
|
-
data["billed-import-
|
|
649
|
-
data["billed-import-net-gbp"] +=
|
|
650
|
-
data[
|
|
678
|
+
data["billed-import-grid-kwh"] += bill_prop_kwh
|
|
679
|
+
data["billed-import-grid-net-gbp"] += bill_prop_net_gbp
|
|
680
|
+
data[f"billed-{role_name}-import-grid-kwh"] += bill_prop_kwh
|
|
681
|
+
data[
|
|
682
|
+
f"billed-{role_name}-import-grid-net-gbp"
|
|
683
|
+
] += bill_prop_net_gbp
|
|
684
|
+
data[
|
|
685
|
+
f"billed-{role_name}-import-grid-vat-gbp"
|
|
686
|
+
] += bill_prop_vat_gbp
|
|
687
|
+
data[
|
|
688
|
+
f"billed-{role_name}-import-grid-gross-gbp"
|
|
689
|
+
] += bill_prop_gross_gbp
|
|
651
690
|
|
|
652
691
|
imp_supplier_contract = first_era.imp_supplier_contract
|
|
653
692
|
exp_supplier_contract = first_era.exp_supplier_contract
|
|
@@ -900,8 +939,8 @@ def content(
|
|
|
900
939
|
"md-used-kw",
|
|
901
940
|
]
|
|
902
941
|
summary_titles = [
|
|
903
|
-
"import-
|
|
904
|
-
"export-
|
|
942
|
+
"import-grid-kwh",
|
|
943
|
+
"export-grid-kwh",
|
|
905
944
|
"import-gen-kwh",
|
|
906
945
|
"export-gen-kwh",
|
|
907
946
|
"import-3rd-party-kwh",
|
|
@@ -909,20 +948,28 @@ def content(
|
|
|
909
948
|
"displaced-kwh",
|
|
910
949
|
"used-kwh",
|
|
911
950
|
"used-3rd-party-kwh",
|
|
912
|
-
"import-net-gbp",
|
|
913
|
-
"export-net-gbp",
|
|
914
|
-
"import-gen-gbp",
|
|
915
|
-
"export-gen-gbp",
|
|
916
|
-
"import-3rd-party-gbp",
|
|
917
|
-
"export-3rd-party-gbp",
|
|
918
|
-
"displaced-gbp",
|
|
919
|
-
"used-gbp",
|
|
920
|
-
"used-3rd-party-gbp",
|
|
921
|
-
"billed-import-
|
|
922
|
-
"billed-import-net-gbp",
|
|
923
|
-
"billed-
|
|
924
|
-
"billed-
|
|
925
|
-
"billed-
|
|
951
|
+
"import-grid-net-gbp",
|
|
952
|
+
"export-grid-net-gbp",
|
|
953
|
+
"import-gen-net-gbp",
|
|
954
|
+
"export-gen-net-gbp",
|
|
955
|
+
"import-3rd-party-net-gbp",
|
|
956
|
+
"export-3rd-party-net-gbp",
|
|
957
|
+
"displaced-net-gbp",
|
|
958
|
+
"used-net-gbp",
|
|
959
|
+
"used-3rd-party-net-gbp",
|
|
960
|
+
"billed-import-grid-kwh",
|
|
961
|
+
"billed-import-grid-net-gbp",
|
|
962
|
+
"billed-import-grid-vat-gbp",
|
|
963
|
+
"billed-import-grid-gross-gbp",
|
|
964
|
+
"billed-supplier-import-grid-net-gbp",
|
|
965
|
+
"billed-supplier-import-grid-vat-gbp",
|
|
966
|
+
"billed-supplier-import-grid-gross-gbp",
|
|
967
|
+
"billed-dc-import-grid-net-gbp",
|
|
968
|
+
"billed-dc-import-grid-vat-gbp",
|
|
969
|
+
"billed-dc-import-grid-gross-gbp",
|
|
970
|
+
"billed-mop-import-grid-net-gbp",
|
|
971
|
+
"billed-mop-import-grid-vat-gbp",
|
|
972
|
+
"billed-mop-import-grid-gross-gbp",
|
|
926
973
|
]
|
|
927
974
|
|
|
928
975
|
title_dict = {}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<label>Type</label>
|
|
16
16
|
<select name="type">
|
|
17
17
|
<option value="used">Used</option>
|
|
18
|
-
<option value="
|
|
19
|
-
<option value="
|
|
18
|
+
<option value="imp_grid">Imported</option>
|
|
19
|
+
<option value="exp_grid">Exported</option>
|
|
20
20
|
<option value="imp_gen">Generated</option>
|
|
21
21
|
<option value="displaced">Displaced</option>
|
|
22
22
|
<option value="exp_gen">Parasitic</option>
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
|
|
36
36
|
<p>
|
|
37
37
|
This is a table of inflows and outflows of electricity from the site from the public
|
|
38
|
-
electricity
|
|
38
|
+
electricity grid, from generators and from third parties. The 'used' quantity is
|
|
39
39
|
found by taking the sum of all the imports and subtracting all the exports. The
|
|
40
|
-
'displaced' quantity is: generated - parasitic -
|
|
40
|
+
'displaced' quantity is: generated - parasitic - export_to_grid. Virtual supplies
|
|
41
41
|
are excluded as they aren't so useful for energy management and engineering
|
|
42
42
|
purposes.
|
|
43
43
|
</p>
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
{% endif %}
|
|
71
71
|
</th>
|
|
72
72
|
<th>{{"{:,.1f}".format(total.displaced.kwh)}}</th>
|
|
73
|
-
<th>{{"{:,.1f}".format(total.
|
|
73
|
+
<th>{{"{:,.1f}".format(total.imp_grid.md)}}</th>
|
|
74
74
|
<th>
|
|
75
|
-
{% if total.
|
|
76
|
-
{{total.
|
|
75
|
+
{% if total.imp_grid.md_date %}
|
|
76
|
+
{{total.imp_grid.md_date|hh_format}}
|
|
77
77
|
{% endif %}
|
|
78
78
|
</th>
|
|
79
|
-
<th>{{"{:,.1f}".format(total.
|
|
79
|
+
<th>{{"{:,.1f}".format(total.imp_grid.kwh)}}</th>
|
|
80
80
|
<th>{{"{:,.1f}".format(total.imp_3p.md)}}</th>
|
|
81
81
|
<th>
|
|
82
82
|
{% if total.imp_3p.md_date %}
|
|
@@ -91,13 +91,13 @@
|
|
|
91
91
|
{% endif %}
|
|
92
92
|
</th>
|
|
93
93
|
<th>{{"{:,.1f}".format(total.imp_gen.kwh)}}</th>
|
|
94
|
-
<th>{{"{:,.1f}".format(total.
|
|
94
|
+
<th>{{"{:,.1f}".format(total.exp_grid.md)}}</th>
|
|
95
95
|
<th>
|
|
96
|
-
{% if total.
|
|
97
|
-
{{total.
|
|
96
|
+
{% if total.exp_grid.md_date %}
|
|
97
|
+
{{total.exp_grid.md_date|hh_format}}
|
|
98
98
|
{% endif %}
|
|
99
99
|
</th>
|
|
100
|
-
<th>{{"{:,.1f}".format(total.
|
|
100
|
+
<th>{{"{:,.1f}".format(total.exp_grid.kwh)}}</th>
|
|
101
101
|
<th>{{"{:,.1f}".format(total.exp_3p.md)}}</th>
|
|
102
102
|
<th>
|
|
103
103
|
{% if total.exp_3p.md_date %}
|
|
@@ -183,13 +183,13 @@
|
|
|
183
183
|
</td>
|
|
184
184
|
<td>{{ "{:,.1f}".format(month.displaced.kwh)}}</td>
|
|
185
185
|
|
|
186
|
-
<td>{{ "{:,.1f}".format(month.
|
|
186
|
+
<td>{{ "{:,.1f}".format(month.imp_grid.md)}}</td>
|
|
187
187
|
<td>
|
|
188
|
-
{% if month.
|
|
189
|
-
{{month.
|
|
188
|
+
{% if month.imp_grid.md_date %}
|
|
189
|
+
{{month.imp_grid.md_date|hh_format}}
|
|
190
190
|
{% endif %}
|
|
191
191
|
</td>
|
|
192
|
-
<td>{{ "{:,.1f}".format(month.
|
|
192
|
+
<td>{{ "{:,.1f}".format(month.imp_grid.kwh)}}</td>
|
|
193
193
|
|
|
194
194
|
<td>{{ "{:,.1f}".format(month.imp_3p.md)}}</td>
|
|
195
195
|
<td>
|
|
@@ -208,13 +208,13 @@
|
|
|
208
208
|
</td>
|
|
209
209
|
<td>{{ "{:,.1f}".format(month.imp_gen.kwh)}}</td>
|
|
210
210
|
|
|
211
|
-
<td>{{ "{:,.1f}".format(month.
|
|
211
|
+
<td>{{ "{:,.1f}".format(month.exp_grid.md)}}</td>
|
|
212
212
|
<td>
|
|
213
|
-
{% if month.
|
|
214
|
-
{{month.
|
|
213
|
+
{% if month.exp_grid.md_date %}
|
|
214
|
+
{{month.exp_grid.md_date|hh_format}}
|
|
215
215
|
{% endif %}
|
|
216
216
|
</td>
|
|
217
|
-
<td>{{ "{:,.1f}".format(month.
|
|
217
|
+
<td>{{ "{:,.1f}".format(month.exp_grid.kwh)}}</td>
|
|
218
218
|
|
|
219
219
|
<td>{{ "{:,.1f}".format(month.exp_3p.md)}}</td>
|
|
220
220
|
<td>
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
/* HH data to use instead of the data in the database. For each site code,
|
|
108
|
-
you can specify the hh data that's used, generated, parasitic or
|
|
108
|
+
you can specify the hh data that's used, generated, parasitic or gen_grid
|
|
109
109
|
on the site. */
|
|
110
110
|
|
|
111
111
|
"hh_data": {
|
|
@@ -173,12 +173,12 @@
|
|
|
173
173
|
Taking 'generated' as an example, for each half-hour Chellow will calculate the
|
|
174
174
|
difference between the <code>scenario_generated</code> and the
|
|
175
175
|
<code>existing_generated</code>. If <code>scenario_generated</code> >=
|
|
176
|
-
<code>existing_generated</code> then any <code>
|
|
177
|
-
first, then <code>
|
|
176
|
+
<code>existing_generated</code> then any <code>imported_grid</code> will be reduced
|
|
177
|
+
first, then <code>exported_grid</code> will be increased until all the difference is
|
|
178
178
|
exhausted. Otherwise if <code>scenario_generated</code> <
|
|
179
|
-
<code>existing_generated</code> then <code>
|
|
180
|
-
and then <code>
|
|
181
|
-
used, parasitic and
|
|
179
|
+
<code>existing_generated</code> then <code>exported_grid</code> will be reduced first,
|
|
180
|
+
and then <code>imported_grid</code> will be increased. A similar approach is taken with
|
|
181
|
+
used, parasitic and gen_grid kWh.
|
|
182
182
|
</p>
|
|
183
183
|
|
|
184
184
|
<p>
|
chellow/templates/site.html
CHANGED
|
@@ -229,8 +229,8 @@ Table of site level monthly kWh, MD kWh etc.</a>
|
|
|
229
229
|
<label>Type</label>
|
|
230
230
|
<select name="type">
|
|
231
231
|
<option value="used">Used</option>
|
|
232
|
-
<option value="
|
|
233
|
-
<option value="
|
|
232
|
+
<option value="imp_grid">Imported</option>
|
|
233
|
+
<option value="exp_grid">Exported</option>
|
|
234
234
|
<option value="imp_gen">Generated</option>
|
|
235
235
|
<option value="displaced">Displaced</option>
|
|
236
236
|
<option value="exp_gen">Parasitic</option>
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
|
|
33
33
|
<p>
|
|
34
34
|
This is a table of inflows and outflows of electricity from the site from the public
|
|
35
|
-
electricity
|
|
35
|
+
electricity grid, from generators and from third parties. The 'used' quantity is
|
|
36
36
|
found by taking the sum of all the imports and subtracting all the exports. The
|
|
37
|
-
'displaced' quantity is: generated - parasitic -
|
|
37
|
+
'displaced' quantity is: generated - parasitic - export_to_grid. Under the
|
|
38
38
|
category of 'third parties', virtual supplies are included, which don't physically
|
|
39
39
|
exist and are there for financial reporting purposes.
|
|
40
40
|
</p>
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
{% endif %}
|
|
68
68
|
</th>
|
|
69
69
|
<th>{{"{:,.1f}".format(total.displaced.kwh)}}</th>
|
|
70
|
-
<th>{{"{:,.1f}".format(total.
|
|
70
|
+
<th>{{"{:,.1f}".format(total.imp_grid.md)}}</th>
|
|
71
71
|
<th>
|
|
72
|
-
{% if total.
|
|
73
|
-
{{total.
|
|
72
|
+
{% if total.imp_grid.md_date %}
|
|
73
|
+
{{total.imp_grid.md_date|hh_format}}
|
|
74
74
|
{% endif %}
|
|
75
75
|
</th>
|
|
76
|
-
<th>{{"{:,.1f}".format(total.
|
|
76
|
+
<th>{{"{:,.1f}".format(total.imp_grid.kwh)}}</th>
|
|
77
77
|
<th>{{"{:,.1f}".format(total.imp_3p.md)}}</th>
|
|
78
78
|
<th>
|
|
79
79
|
{% if total.imp_3p.md_date %}
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
{% endif %}
|
|
89
89
|
</th>
|
|
90
90
|
<th>{{"{:,.1f}".format(total.imp_gen.kwh)}}</th>
|
|
91
|
-
<th>{{"{:,.1f}".format(total.
|
|
91
|
+
<th>{{"{:,.1f}".format(total.exp_grid.md)}}</th>
|
|
92
92
|
<th>
|
|
93
|
-
{% if total.
|
|
94
|
-
{{total.
|
|
93
|
+
{% if total.exp_grid.md_date %}
|
|
94
|
+
{{total.exp_grid.md_date|hh_format}}
|
|
95
95
|
{% endif %}
|
|
96
96
|
</th>
|
|
97
|
-
<th>{{"{:,.1f}".format(total.
|
|
97
|
+
<th>{{"{:,.1f}".format(total.exp_grid.kwh)}}</th>
|
|
98
98
|
<th>{{"{:,.1f}".format(total.exp_3p.md)}}</th>
|
|
99
99
|
<th>
|
|
100
100
|
{% if total.exp_3p.md_date %}
|
|
@@ -180,13 +180,13 @@
|
|
|
180
180
|
</td>
|
|
181
181
|
<td>{{ "{:,.1f}".format(month.displaced.kwh)}}</td>
|
|
182
182
|
|
|
183
|
-
<td>{{ "{:,.1f}".format(month.
|
|
183
|
+
<td>{{ "{:,.1f}".format(month.imp_grid.md)}}</td>
|
|
184
184
|
<td>
|
|
185
|
-
{% if month.
|
|
186
|
-
{{month.
|
|
185
|
+
{% if month.imp_grid.md_date %}
|
|
186
|
+
{{month.imp_grid.md_date|hh_format}}
|
|
187
187
|
{% endif %}
|
|
188
188
|
</td>
|
|
189
|
-
<td>{{ "{:,.1f}".format(month.
|
|
189
|
+
<td>{{ "{:,.1f}".format(month.imp_grid.kwh)}}</td>
|
|
190
190
|
|
|
191
191
|
<td>{{ "{:,.1f}".format(month.imp_3p.md)}}</td>
|
|
192
192
|
<td>
|
|
@@ -205,13 +205,13 @@
|
|
|
205
205
|
</td>
|
|
206
206
|
<td>{{ "{:,.1f}".format(month.imp_gen.kwh)}}</td>
|
|
207
207
|
|
|
208
|
-
<td>{{ "{:,.1f}".format(month.
|
|
208
|
+
<td>{{ "{:,.1f}".format(month.exp_grid.md)}}</td>
|
|
209
209
|
<td>
|
|
210
|
-
{% if month.
|
|
211
|
-
{{month.
|
|
210
|
+
{% if month.exp_grid.md_date %}
|
|
211
|
+
{{month.exp_grid.md_date|hh_format}}
|
|
212
212
|
{% endif %}
|
|
213
213
|
</td>
|
|
214
|
-
<td>{{ "{:,.1f}".format(month.
|
|
214
|
+
<td>{{ "{:,.1f}".format(month.exp_grid.kwh)}}</td>
|
|
215
215
|
|
|
216
216
|
<td>{{ "{:,.1f}".format(month.exp_3p.md)}}</td>
|
|
217
217
|
<td>
|