From ef20605ccc5ace20d8c7b7de80bdac410a45b199 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:44:47 +0200 Subject: [PATCH 1/4] Works until you add custom PV profiles (with additional tablefunctions) --- Zero_Interface-Loader.alp.autosave | 50485 ---------------- _alp/Agents/Zero_Interface/Code/Functions.xml | 2 +- _alp/Agents/Zero_Loader/Code/Functions.java | 64 +- _alp/Agents/Zero_Loader/Code/Functions.xml | 54 + _alp/Agents/Zero_Loader/EmbeddedObjects.xml | 9 - .../Agents/Zero_Loader/Levels/Level.level.xml | 51 + 6 files changed, 169 insertions(+), 50496 deletions(-) delete mode 100644 Zero_Interface-Loader.alp.autosave diff --git a/Zero_Interface-Loader.alp.autosave b/Zero_Interface-Loader.alp.autosave deleted file mode 100644 index f56af938..00000000 --- a/Zero_Interface-Loader.alp.autosave +++ /dev/null @@ -1,50485 +0,0 @@ - - - - - 1658477103134 - - 6 - - - - - 1658478100573 - - - - - - - - - - - - - - - - 1660743989698 - - - - - - - - 1660743989798 - - - - - - 1667742453792 - - true - - - 1675025163072 - - true - - - 1709718356700 - - - - - - - - - 1726584216672 - - - - - - - - 1726584216682 - - - - - - - 1753086929090 - - - - - - - - - - - - - - - 1726584205528 - - false - - 1726584205523 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089981 - true - 1710835200000 - - - - - - - - - - - 1726584205524 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1726584205534 - 1726584205728 - - - 1726584205532 - - Houdt dit rekening met zomer/winter tijd?]]> - 1070150 - - false - true - true - - - - - - - - - 1726584205579 - - 3*25*230 = 17.25 kW]]> - 50170 - - false - true - true - - - - false - - - - - 1726584205577 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205582 - - 50188.976 - - false - true - true - - - - false - - - - - 1726584205580 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205585 - - 17.25 -> set to 17, to prevent slider errors (stepsize cant be double, otherwise to small for user experience) - ---> 17.25 is way to small -> 3x80 is taken : 55 kW]]> - 50330 - - false - true - true - - - - false - - - - - 1726584205583 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205588 - - 50310 - - false - true - true - - - - false - - - - - 1726584205586 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205591 - - 2479 kWh/yr is the average of NL ---> Overwrite if numbers are available in the project selection agent -]]> - 50148.976 - - false - true - true - - - - false - - - - - 1726584205589 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205594 - - 1169 m3 is the average of NL ---> Overwrite if numbers are available in the project selection agent -]]> - 50128.976 - - false - true - true - - - - false - - - - - 1726584205592 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205597 - - 5% (feb 2024). - -https://www.rvo.nl/onderwerpen/elektrisch-vervoer/stand-van-zaken ]]> - 50208.976 - - false - true - true - - - - false - - - - - 1726584205595 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205600 - - - 50230 - - false - true - true - - - - false - - - - - 1726584205598 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205603 - - 4kWp]]> - 50250 - - false - true - true - - - - false - - - - - 1726584205601 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205606 - - - 570220 - - false - true - true - - - - false - - - - - 1726584205604 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205609 - - - 570150 - - false - true - true - - - - false - - - - - 1726584205607 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205612 - - - 570240 - - false - true - true - - - - false - - - - - 1726584205610 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205615 - - - 570260 - - false - true - true - - - - false - - - - - 1726584205613 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205618 - - - 570170 - - false - true - true - - - - false - - - - - 1726584205616 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205621 - - - 570190 - - false - true - true - - - - false - - - - - 1726584205619 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205624 - - Tesla model 3: 15.1 kWh per 100 km --> 0.151 kWh/km ---> Kia niro: 17.1 kWh per 100 km --> 0.171 kWh/km ---> taking 0.16 kWh/km as the average]]> - 570290 - - false - true - true - - - - false - - - - - 1726584205622 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205627 - - - 570310 - - false - true - true - - - - false - - - - - 1726584205625 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205630 - - pak gemiddelde: 1.3]]> - 570330 - - false - true - true - - - - false - - - - - 1726584205628 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205633 - - - 1070230 - - false - true - true - - - - false - - - - - 1726584205631 - - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205636 - - - 1590160 - - false - true - true - - - - false - - - - - 1726584205634 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205639 - - - 1590210 - - false - true - true - - - - false - - - - - 1726584205637 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205642 - - - 1590230 - - false - true - true - - - - false - - - - - 1726584205640 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205645 - - 1.008*2/16 = 0.126. -0.126 g waterstof per g water conversie. -1-0.126 = 0.874 g zuurstof per gram water conversie. - ---> 1/0.126 =7.9365 gram zuurstof productie per gram waterstof productie.]]> - 1590260 - - false - true - true - - - - false - - - - - 1726584205643 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205648 - - 33.6]]> - 1590180 - - false - true - true - - - - false - - - - - 1726584205646 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205651 - - - 1070250 - - false - true - true - - - - false - - - - - 1726584205649 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205654 - - - 570400 - - false - true - true - - - - false - - - - - 1726584205652 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205657 - - - 570420 - - false - true - true - - - - false - - - - - 1726584205655 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205660 - - - 1070270 - - false - true - true - - - - false - - - - - 1726584205658 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205663 - - 570450 - - false - true - true - - - - false - - - - - 1726584205661 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205666 - - 570470 - - false - true - true - - - - false - - - - - 1726584205664 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205669 - - - 570510 - - false - true - true - - - - false - - - - - 1726584205667 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205672 - - 570530 - - false - true - true - - - - false - - - - - 1726584205670 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205675 - - 25 - 30 - 40 liter per 100 km. = 4 - 3.33 - 2.5 km per l -Heavely dependend on load, city/highway, etc. -For now: Picking 3.33 km per l]]> - 570560 - - false - true - true - - - - false - - - - - 1726584205673 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205678 - - 570580 - - false - true - true - - - - false - - - - - 1726584205676 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205681 - - - 70520 - - false - true - true - - - - false - - - - - 1726584205679 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205684 - - - 50350 - - false - true - true - - - - false - - - - - 1726584205682 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205687 - - 'volgens cbs nog geen half procent.']]> - 50370 - - false - true - true - - - - false - - - - - 1726584205685 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205690 - - Should definatly be still the case in 2024]]> - 50390 - - false - true - true - - - - false - - - - - 1726584205688 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205693 - - 177 W/m2 -https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 -https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2]]> - 50910 - - false - true - true - - - - false - - - - - 1726584205691 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205696 - - If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2.]]> - 501030 - - false - true - true - - - - false - - - - - 1726584205694 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205699 - - avg: 29 kWh per 100 km --> 0.29 kWh/km -]]> - 570640 - - false - true - true - - - - false - - - - - 1726584205697 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205702 - - 1.4 kg Waterstof per 100 km = 0.014 kg/km ---> 0.014 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 0.47 kWh/kg]]> - 570660 - - false - true - true - - - - false - - - - - 1726584205700 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205705 - - 6.6 kg Waterstof per 100 km = 0.066 kg/km ---> 0.066 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 2.22 kWh/kg]]> - 570680 - - false - true - true - - - - false - - - - - 1726584205703 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205708 - - - 50930 - - false - true - true - - - - false - - - - - 1726584205706 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205711 - - - 70540 - - false - true - true - - - - false - - - - - 1726584205709 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205714 - - - 70560 - - false - true - true - - - - false - - - - - 1726584205712 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205717 - - SOURCE?]]> - 70610 - - false - true - true - - - - false - - - - - 1726584205715 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205720 - - Source?]]> - 70630 - - false - true - true - - - - false - - - - - 1726584205718 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205723 - - - 70680 - - false - true - true - - - - false - - - - - 1726584205721 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205726 - - Source?]]> - 70700 - - false - true - true - - - - false - - - - - 1726584205724 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726746753360 - - 501080 - - false - true - true - - - - false - - - - - 1726746753358 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728032263201 - - - 570770 - - false - true - true - - - - false - - - - - 1728032263199 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728032304301 - - 570750 - - false - true - true - - - - false - - 1728032304299 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728032305440 - - 570790 - - false - true - true - - - - false - - 1728032305438 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728034204646 - - - 50950 - - false - true - true - - - - false - - - - - 1728034204644 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728390983761 - - 188 kWh/m2 for offices in NL]]> - 50410 - - false - true - true - - - - false - - - - - 1728390983759 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728391035656 - - page 28 - -9 m3 p m2 for label A -12 m3 p m2 for label B -to 18 m3 p m2 for label G - ---> take 7 for now.]]> - 50430 - - false - true - true - - - - false - - - - - 1728391035654 - TEXT_BOX - - - NO_DELIMETER - - - - - 1728394646404 - - estimated benchmark 100 kWh/m2]]> - 50450 - - false - true - true - - - - false - - - - - 1728394646402 - TEXT_BOX - - - NO_DELIMETER - - - - - 1733155392379 - - - 50970 - - false - true - true - - - - false - - - - - 1733155392377 - TEXT_BOX - - - NO_DELIMETER - - - - - 1745316053417 - - blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf]]> - 70750 - - false - true - true - - - - false - - - - - 1745316053415 - TEXT_BOX - - - NO_DELIMETER - - - - - 1745316110677 - - blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf]]> - 70770 - - false - true - true - - - - false - - - - - 1745316110675 - TEXT_BOX - - - NO_DELIMETER - - - - - 1745326622582 - - Source?]]> - 70790 - - false - true - true - - - - false - - - - - 1745326622580 - TEXT_BOX - - - NO_DELIMETER - - - - - 1747314895126 - - - 70840 - - false - true - true - - - - false - - - - - 1747314895124 - TEXT_BOX - - - NO_DELIMETER - - - - - 1747314895129 - - https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet]]> - 70860 - - false - true - true - - - - false - - - - - 1747314895127 - TEXT_BOX - - - NO_DELIMETER - - - - - 1749653366667 - - - 570125 - - false - true - true - - - - false - - - - - 1749653366665 - TEXT_BOX - - - NO_DELIMETER - - - - - 1750246849611 - - - 570105 - - false - true - true - - - - false - - - - - 1750246849609 - TEXT_BOX - - - NO_DELIMETER - - - - - 1750341289733 - - - 570840 - - false - true - true - - - - false - - - - - 1750341289731 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751893521012 - - 530930 - - false - true - true - - - - false - - - - - 1751893521010 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751893540583 - - 25 liter per kW warmtepomp vermogen = 0.025 m3/kW]]> - 5301060 - - false - true - true - - - - false - - - - - 1751893540581 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751893810778 - - 50 liter per m2 zonnecollector = 0.050 m3/m2]]> - 5301040 - - false - true - true - - - - false - - - - - 1751893810776 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751896032002 - - 4185 J/kg K bij 20 *C - --> Verschilt eigenlijk met temperatuur, weer net iets lager bij 40 graden (4180), weer 4185 bij 60*C en net iets hoger bij 80 graden. (4197 bij 80 *C). - -Voor nu gekozen voor 4185. -]]> - 1070290 - - false - true - true - - - - false - - - - - 1751896032000 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751905820546 - - 998 kg/m3]]> - 1070310 - - false - true - true - - - - false - - - - - 1751905820544 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751906112800 - - - 530990 - - false - true - true - - - - false - - - - - 1751906112798 - TEXT_BOX - - - NO_DELIMETER - - - - - 1751906126857 - - 5301010 - - false - true - true - - - - false - - - - - 1751906126855 - TEXT_BOX - - - NO_DELIMETER - - - - - - - VOID - - 1726584205530 - - 3050 - - false - true - true - - - - - - 1726584205728 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1726584830548 - - 50-100 - - false - true - true - - - - - - - - - - 1726584205534 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1726584205536 - - 958.8160 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 958.0782918149466 - 1100 - 0.0 - -1 - null - - - 1726584205538 - - 0.7370 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 958.0782918149466 - 1100 - 0.0 - -1 - null - - - 1726584205540 - - 40100 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205542 - - 40280 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205544 - - 56075 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205546 - - 144040 - - false - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - 1726584205548 - - 1060200 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205550 - - 48040 - - false - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - 1726584205552 - - 1560100 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16711681 - null - SOLID - 340 - 200 - 0.0 - -1 - null - - - 1726584205554 - - 1580120 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205556 - - 560360 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205558 - - 40470 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205560 - - 40880 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205562 - - 401005 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205564 - - 560610 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205566 - - 60490 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205568 - - 60580 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205570 - - 60650 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205572 - - 1010 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -65536 - null - SOLID - 170 - 60 - 0.0 - -1 - null - - - 1726584205574 - - 2020 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205576 - - 1060120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726743791200 - - 401050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1728032240347 - - 560700 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1745316061345 - - 60720 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1747314897311 - - 60810 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1751906160194 - - 520960 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1751906173848 - - 520900 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - - - - - - - - 1709049506453 - - false - - 1709049506461 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089980 - true - 1709107200000 - - - - - - - - - - - 1709049506456 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049506460 - 1709049506454 - - - 1709049506454 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - - 1709049506460 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - - - - - 1722253463895 - - - - - - - false - - 1722253463901 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089979 - true - 1722326400000 - - - - - - - - - - - 1722253463898 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722253463902 - 1722253463896 - - - 1722256365490 - - 740915 - - false - true - true - - - - - - 1722256365499 - - 740855 - - false - true - true - - - - - - 1722256365507 - - 740875 - - false - true - true - - - - - - 1722256365515 - - 740895 - - false - true - true - - - - - - - - - - - VOID - - 1722256335789 - - - 1100700 - - false - true - true - - - - - 0 ){ - GCGridBattery GC = findFirst(zero_Interface.energyModel.GridBatteries, GB -> GB.p_isSliderGC); - if(GC == null){ - traceln("WARNING: no specified slider grid battery in the model: random grid battery selected"); - GC = zero_Interface.energyModel.GridBatteries.get(0); - } - - if (!GC.v_isActive) { - GC.f_setActive(true); - } - GC.p_batteryAsset.setStorageCapacity_kWh(1000*capacity_MWh); - double capacityElectric_kW = 1000*capacity_MWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - GC.p_batteryAsset.setCapacityElectric_kW(capacityElectric_kW); - GC.v_liveConnectionMetaData.physicalCapacity_kW = capacityElectric_kW; - GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacityElectric_kW; - GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacityElectric_kW; -} -else { - throw new IllegalStateException("Model does not contain any GCGridBattery agent"); -}]]> - - - VOID - - 1722256365452 - - - 740790 - - false - true - true - - - - - - - - - - - - VOID - - 1722256365459 - - - 740700 - - false - true - true - - - - - - - - - - - - RETURNS_VALUE - - 1722256365466 - - - 740760 - - false - true - true - - - - - - - - - gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 1: // Feed In - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 2: // Both - for (int i = 0; i < 24; i++) { - weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; - weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; - } - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - - maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - default: - throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); -}]]> - - - RETURNS_VALUE - - 1722256365474 - - - 740730 - - false - true - true - - - - VOID - - 1722256365483 - - - 740820 - - false - true - true - - - - VOID - - 1722256998182 - - - 480710 - - false - true - true - - - - - - - - - - 1722253463896 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1722253479511 - - 50-100 - - false - true - true - - - - - - - 1722253479513 - - 150-100 - - false - true - true - - - - - - - - - - 1722253463902 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1722344806530 - - 450650 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 200 - 100 - 0.0 - -1 - null - - - 1722344586686 - - 700650 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16711936 - null - SOLID - 300 - 300 - 0.0 - -1 - null - - - 1722253487925 - - 00 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1722253487927 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -3736634 - null - - - false - 1722253487935 - - 26033 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - x.p_chargingAttitudeVehicles = OL_ChargingAttitude.MAX_SPREAD); -} else { - for(GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()){ - if(GC instanceof GCPublicCharger){ - //Leave it on basic setting (MAX_SPREAD) - } - else{ - GC.p_chargingAttitudeVehicles = OL_ChargingAttitude.SIMPLE; - } - } - -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - - - false - - - - 1722253487937 - - 220100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1722253487939 - - 1540 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722253487941 - - 25595 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722253487943 - - 1515 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253487945 - - 15100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722253487947 - - 2607 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 0){ - UI_company companyUI = zero_Interface.c_companyUIs.get(GC.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == GC) { // should also check the setting of selected GC - companyUI.cb_curtailmentCompany.setSelected(true, false); - } - } - } -} -else { - for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { - GC.v_enableCurtailment = false; - - if (zero_Interface.c_companyUIs.size()>0){ - UI_company companyUI = zero_Interface.c_companyUIs.get(GC.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == GC) { // should also check the setting of selected GC - companyUI.cb_curtailmentCompany.setSelected(false, false); - } - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - - - false - - - - false - 1722253487949 - - 15130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - true - - - - - - - - - - false - 1722253487951 - - 185130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - true - - - - - - - - - false - 1725277950476 - - 26059 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - x.p_chargingAttitudeVehicles = OL_ChargingAttitude.MAX_POWER); -} else { - for(GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()){ - if(GC instanceof GCPublicCharger){ - //Leave it on basic setting (MAX_SPREAD) - } - else{ - GC.p_chargingAttitudeVehicles = OL_ChargingAttitude.SIMPLE; - } - } - //zero_Interface.energyModel.f_getGridConnections().forEach(x -> x.p_chargingAttitudeVehicles = OL_ChargingAttitude.SIMPLE); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - - - false - - - - 1725277950478 - - 1566 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1736425642857 - - 20170 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - false - (zero_Interface.c_selectedObjects); -ArrayList buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); -zero_Interface.c_selectedGridConnections.clear(); -zero_Interface.c_selectedObjects.clear(); - -//Deselect previous selection -if( zero_Interface.v_previousClickedObjectType != null){ - zero_Interface.f_deselectPreviousSelect(); -} - -//Still no clicked object? :select basic region -zero_Interface.v_clickedObjectType = OL_GISObjectType.REGION; -zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); - - -if (cb_EHubSelect.isSelected()) { - zero_Interface.cb_showFilterInterface.setSelected(true); -} - -/* -if (!cb_EHubSelect.isSelected()) { - zero_Interface.b_EHubSelect = false; - zero_Interface.uI_Results.b_EHubConfiguration = false; - zero_Interface.v_clickedObjectText = "None"; - - // Reset the list of selected GCs and the individual AreaCollections in the ResultsUI - zero_Interface.c_selectedGridConnections.clear(); - zero_Interface.uI_Results.c_individualGridConnections = new ArrayList(); - - // Reset the building colors - for (GridConnection GC: zero_Interface.energyModel.f_getGridConnections()) { - for (GIS_Object GB : GC.c_connectedGISObjects) { - zero_Interface.f_styleAreas(GB); - } - } - - // Reset the shown charts - zero_Interface.uI_Results.f_updateUIresultsMainArea(); - zero_Interface.uI_Results.v_selectedObjectType = OL_GISObjectType.REGION; - zero_Interface.uI_Results.f_showCorrectChart(); - - //Reset the KPI summary button - zero_Interface.uI_Results.getCheckbox_KPISummary().setEnabled(true); - - // Reset the groupATO Capacities - zero_Interface.v_groupATODeliveryCapacity_kW = 0; - zero_Interface.v_groupATOFeedInCapacity_kW = 0; - - // disable the WKK button - //cb_wkk.setSelected(false, true); - //cb_wkk.setEnabled(false); -} -else{ - - // we create areacollection(s) for the currently selected GC(s) (could be multiple if the user was using multiselect before checking this box) - zero_Interface.uI_Results.f_fillAreaCollectionsOfIndividualGCs(zero_Interface.c_selectedGridConnections); - - zero_Interface.b_EHubSelect = true; - zero_Interface.uI_Results.b_EHubConfiguration = true; - zero_Interface.v_clickedObjectText = "Selecteer een bedrijf om toe te voegen aan de E-Hub"; - - //Make the companyUI button invisible - zero_Interface.getButton_goToUI().setVisible(false); - - //Disable the KPI summary (button) - zero_Interface.uI_Results.getCheckbox_KPISummary().setSelected(false, true); - zero_Interface.uI_Results.getCheckbox_KPISummary().setEnabled(false); -} - - -// Energy-Hub Group connection capacity calculation -zero_Interface.f_calculateGroupATOConnectionCapacity(zero_Interface.c_selectedGridConnections); -zero_Interface.uI_Results.f_EHubCapacityDataSets(zero_Interface.c_selectedGridConnections); - -zero_Interface.uI_Results.f_showCorrectChart(); - -*/]]> - - - - - false - - - - 1736425642864 - - 30210 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1736425642870 - - 30250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1736425642875 - - 30270 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1736425642881 - - 30230 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - - - - 1722253509588 - - 0410 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1722253509590 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -3736634 - null - - - 1722253509592 - - 2520 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253509594 - - 2550 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722253509596 - - 125180 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1722253509598 - - 2575 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - true - b_nfatoWeekendDistinction - - - - false - 1722253509600 - - 125210 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1722253509602 - - 125245 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1722253509604 - - 45285 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - false - 1722253509606 - - 275285 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1722253509608 - - 20185 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253509610 - - 20215 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253509612 - - 10250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253509614 - - 155155 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253509616 - - 265155 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722253509618 - - 247180 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1722253509620 - - 247210 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1722253509622 - - 247245 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - false - 1725970287541 - - 25105 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - VERTICAL - - - - false - - - - - - - 1722256365442 - - 850655 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 18 - - - CENTER - - - 1722344870135 - - 480660 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1722344920583 - - 1050650 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744320 - null - SOLID - 300 - 100 - 0.0 - -1 - null - - - 1722344920585 - - 1200655 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 18 - - - CENTER - - - 1736429614133 - - true - 500-80 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1736429614135 - - 0-52.294 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1736429614137 - - -65.109-52.294 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - CENTER - - - 1736429614139 - - -91.153-39.221 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - - null - SOLID - 58.598 - 26.147 - 0.0 - -1 - null - 10 - - - 1736429614141 - - -104.1746.537 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - false - 1736429614143 - - true - -114.17445.758 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - gc.p_gridConnectionID.equals("GCECS2")); -if (GCECS == null) { - throw new RuntimeException("Error: Could not find WKK"); -} -if (cb_wkk.isSelected()) { - // First we find the ring of the currently selected E-Hub - if ( zero_Interface.c_selectedGridConnections.size() == 0 ) { - throw new RuntimeException("Stel eerst je E-Hub samen door op een bedrijf te klikken."); - } - GridConnection GC = zero_Interface.c_selectedGridConnections.get(0); - GridNode ringNode; - if (GC.l_parentNodeElectric.getConnectedAgent().p_description.toLowerCase().contains("klantstation")) { - ringNode = findFirst(zero_Interface.energyModel.pop_gridNodes, gn -> gn.p_gridNodeID.equals( GC.l_parentNodeElectric.getConnectedAgent().p_parentNodeID) ); - } - else { - ringNode = GC.l_parentNodeElectric.getConnectedAgent(); - } - - // Remove from old gridnode - GCECS.l_parentNodeElectric.getConnectedAgent().f_getConnectedGridConnections().remove(GCECS); - GCECS.l_parentNodeElectric.disconnect(); - - // Add to new gridnode - GCECS.p_parentNodeElectricID = ringNode.p_gridNodeID; - GCECS.l_parentNodeElectric.connectTo(ringNode); - ringNode.f_getConnectedGridConnections().add(GCECS); - - // Add WKK to the selectedgridconnections in interface - zero_Interface.c_selectedGridConnections.add(GCECS); - zero_Interface.f_fillAreaCollectionsOfIndividualGCs(); - - // Activate GC - GCECS.f_setActive(true); - -} -else { - // Remove WKK from the selectedgridconnections in interface - zero_Interface.c_selectedGridConnections.remove(GCECS); - zero_Interface.f_fillAreaCollectionsOfIndividualGCs(); - - GCECS.f_setActive(false); -} - -zero_Interface.uI_Results.f_showCorrectChart(); -zero_Interface.f_resetSettings();]]> - - - - - false - - - - 1736429614145 - - -104.174-78.442 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1736429614149 - - -61.854-30.069 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - CENTER - - - 1736429614151 - - 6.511-39.221 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - - null - SOLID - 58.598 - 26.147 - 0.0 - -1 - null - 10 - - - 1736429614153 - - 32.555-32.684 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - CENTER - - - - - - - - - - - - - 1722247653561 - - - - - - - - false - - 1722247653567 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089978 - true - 1722326400000 - - - - - - - - - - - 1722247653564 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722247653568 - 1722247653562 - - - 1745483322704 - - 501140 - - false - true - true - - - - false - - - - - 1745483322702 - TEXT_BOX - - - NO_DELIMETER - - - - - 1745483371462 - - 501160 - - false - true - true - - - - false - - - - - 1745483371460 - TEXT_BOX - - - NO_DELIMETER - - - - - - - VOID - - 1722256117103 - - - 70880 - - false - true - true - - - - - - - - VOID - - 1722256142375 - - - 70850 - - false - true - true - - - ]]> - - - - - - houses = new ArrayList(zero_Interface.c_orderedPVSystemsHouses.stream().filter(gcList::contains).toList()); -int nbHouses = houses.size(); -int nbHousesWithPV = count(houses, x -> x.v_liveAssetsMetaData.hasPV == true); -int nbHousesWithPVGoal = roundToInt(PV_pct / 100.0 * nbHouses); - -while ( nbHousesWithPVGoal < nbHousesWithPV ) { // remove excess PV systems - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.hasPV == true); - J_EA pvAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (pvAsset != null) { - pvAsset.removeEnergyAsset(); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV --; - } - else { - traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); - } -} - -while ( nbHousesWithPVGoal > nbHousesWithPV ) { - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.hasPV == false); - if (house == null){ - traceln("No gridconnection without PV panels found! Current PVsystems count: %s", nbHousesWithPV); - break; - } - else { - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double installedPVCapacity_kW = roundToDecimal(uniform(3,6),2); - - J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV ++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1722256248965 - - - 801010 - - false - true - true - - - - - - - - VOID - - 1722335253834 - - - 60600 - - false - true - true - - - ]]> - - - - - - 0){ - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.sl_electricityDemandCompanyReduction.setValue(demandReduction_pct, false); - } - } -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1745483988251 - - 301120 - - false - true - true - - - - RETURNS_VALUE - ]]> - 1747294812333 - - - 90820 - - false - true - true - - - ]]> - - - - - VOID - - 1747297871195 - - - 70740 - - false - false - true - - - ]]> - - - - - - - - - - activeGCs = new ArrayList(zero_Interface.c_orderedPVSystemsCompanies.stream().filter(x -> x.v_isActive).filter(gcList::contains).toList()); -Pair pair = f_getPVSystemPercentage( new ArrayList(activeGCs) ); -double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; -if ( remaining_kWp > 0 ) { - // add more PV - for ( GCUtility company : new ArrayList(activeGCs) ) { - double remainingPotential_kWp = min( remaining_kWp, company.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - company.v_liveAssetsMetaData.totalInstalledPVPower_kW ); - - if ( remainingPotential_kWp > 0 ) { - remaining_kWp -= remainingPotential_kWp; - f_addPVSystem( company, remainingPotential_kWp ); - } - - if ( remaining_kWp <= 0 ) { - zero_Interface.f_resetSettings(); - return; - } - } -} -else { - // remove pv - for ( GCUtility company : new ArrayList(activeGCs) ) { - if ( company.v_liveAssetsMetaData.hasPV ) { - // find companyUI to check if the company already has PV on model startup - remaining_kWp += company.v_liveAssetsMetaData.totalInstalledPVPower_kW; - f_removePVSystem( company ); - double PVAtStartup_kWp = 0; - if (zero_Interface.c_companyUIs.size() > 0) { - PVAtStartup_kWp = zero_Interface.c_scenarioMap_Current.get(company).getCurrentPV_kW(); - } - if (PVAtStartup_kWp != 0) { - f_addPVSystem( company, PVAtStartup_kWp ); - remaining_kWp -= PVAtStartup_kWp; - } - } - if ( remaining_kWp >= 0 ) { - // removed slightly too much pv - f_addPVSystem( company, remaining_kWp ); - zero_Interface.f_resetSettings(); - return; - } - } - // All companies are at the starting PV amount. Set slider to corresponding value. - pair = f_getPVSystemPercentage( new ArrayList( activeGCs ) ); - int installed_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); - slider.setValue(installed_pct, false); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1747306690517 - - - 90780 - - false - true - true - - - - - - - - - p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); - if ( pvAsset == null ) { - throw new RuntimeException("Could not find photovoltaic asset in GridConnection: " + gc.p_ownerID + ", even though hasPV is True."); - } - capacity_kWp += pvAsset.getCapacityElectric_kW(); - pvAsset.setCapacityElectric_kW( capacity_kWp ); -} -else { - // Create a new asset - OL_EnergyAssetType assetType = OL_EnergyAssetType.PHOTOVOLTAIC; - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double outputTemperature_degC = 0.0; - - J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); -} - -// Update the ordered collection -if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); -} -else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); - // update company UI - if ( zero_Interface.c_companyUIs.size() > 0 ) { - if ( gc.p_owner != null ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != gc){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), gc); - companyUI.GCnr_selection.setValue(i, true); - } - companyUI.b_runningMainInterfaceSlider = false; - - companyUI.sl_rooftopPVCompany.setValue(roundToInt(capacity_kWp), false); - companyUI.v_defaultPVSlider = roundToInt(capacity_kWp); - } - } -} -else { - throw new RuntimeException("Unknown GridConnection type passed to f_addPVSystem."); -}]]> - - - VOID - - 1747306699629 - - 90800 - - false - true - true - - - - - p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); -if ( pvAsset != null ) { - pvAsset.removeEnergyAsset(); - - if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); - } - else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); - if ( zero_Interface.c_companyUIs.size() > 0 ) { - if ( gc.p_owner != null ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != gc){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), gc); - companyUI.GCnr_selection.setValue(i, true); - } - companyUI.b_runningMainInterfaceSlider = false; - - companyUI.sl_rooftopPVCompany.setValue(0, false); - companyUI.v_defaultPVSlider = roundToInt(0); - } - } - } -}]]> - - - VOID - - 1747825874398 - - - true - 70760 - - false - false - true - - - ]]> - - - - - - pair = f_getPVSystemPercentage( new ArrayList(gcList)); - -double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; - -if ( remaining_kWp > 0 ) { - // add more PV - for ( GCHouse house : new ArrayList(zero_Interface.c_orderedPVSystemsHouses) ) { - double remainingPotential_kWp = min( remaining_kWp, house.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - house.v_liveAssetsMetaData.totalInstalledPVPower_kW ); - if ( remainingPotential_kWp > 0 ) { - remaining_kWp -= remainingPotential_kWp; - f_addPVSystem( house, remainingPotential_kWp ); - } - - if ( remaining_kWp <= 0 ) { - zero_Interface.f_resetSettings(); - return; - } - } -} -else { - // remove pv - for ( GCHouse house : new ArrayList(zero_Interface.c_orderedPVSystemsHouses) ) { - if ( house.v_liveAssetsMetaData.hasPV ) { - remaining_kWp += house.v_liveAssetsMetaData.totalInstalledPVPower_kW; - f_removePVSystem( house ); - } - if ( remaining_kWp >= 0 ) { - // removed slightly too much pv - f_addPVSystem( house, remaining_kWp ); - zero_Interface.f_resetSettings(); - return; - } - } -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1750063382310 - - 890550 - - false - true - true - - - - - h.p_batteryAsset != null); //f_getEnergyAssets(), p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC && p.getParentAgent() instanceof GCHouse); -double nbHousesWithPV = count(zero_Interface.energyModel.Houses, x -> x.v_liveAssetsMetaData.hasPV == true); //count(energyModel.f_getGridConnections(), p->p instanceof GCHouse); -double nbHousesWithBatteryGoal = roundToInt(nbHousesWithPV * homeBatteries_pct / 100); - -if( nbHousesWithPV > 0 ){ - while ( nbHouseBatteries > nbHousesWithBatteryGoal ) { - GCHouse house = findFirst(zero_Interface.energyModel.Houses, p -> p.p_batteryAsset != null ); - house.p_batteryAsset.removeEnergyAsset(); - house.p_batteryAlgorithm = null; - nbHouseBatteries--; - } - while ( nbHouseBatteries < nbHousesWithBatteryGoal) { - GCHouse house = findFirst(zero_Interface.energyModel.Houses, p -> p.p_batteryAsset == null && p.v_liveAssetsMetaData.hasPV == true); - - double batteryStorageCapacity_kWh = 15; - double batteryCapacity_kW = batteryStorageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - double batteryStateOfCharge = 0.5; - - new J_EAStorageElectric(house, batteryCapacity_kW, batteryStorageCapacity_kWh, batteryStateOfCharge, zero_Interface.energyModel.p_timeStep_h ); - house.p_batteryAlgorithm = new J_BatteryManagementSelfConsumption( house ); - nbHouseBatteries++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1750063382312 - - 890570 - - false - true - true - - - - - - - - VOID - - 1750063382324 - - 890590 - - false - true - true - - - - - x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC).size(); -int nbHousesWithElectricCookingGoal = roundToInt(electricCookingGoal_pct / 100 * zero_Interface.energyModel.Houses.size()); - - -while ( nbHousesWithElectricCooking > nbHousesWithElectricCookingGoal ) { // remove excess cooking systems - GCHouse house = randomWhere(zero_Interface.energyModel.Houses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.GAS; - nbHousesWithElectricCooking --; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } -} - -while ( nbHousesWithElectricCooking < nbHousesWithElectricCookingGoal) { - GCHouse house = randomWhere(zero_Interface.energyModel.Houses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.GAS); - if (house == null){ - throw new RuntimeException("No gridconnection without GAS cooking asset found! Current electric cooking count: " + nbHousesWithElectricCooking); - } - else { - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.GAS_PIT ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; - nbHousesWithElectricCooking ++; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1750063382330 - - 890510 - - false - true - true - - - - - x.v_isActive); -int nbChargersGoal = roundToInt(publicChargers_pct / 100 * totalNbChargers) ; - -// TODO: for now we assume that a public charger supports two EVs. Just to implement the code that removes diesel vehicles. -// We will need to decide if we want to make this a fixed number, or have it depend on the number of chargers / diesel vehicles. -int amountOfVehiclesPerCharger = zero_Interface.energyModel.avgc_data.p_avgEVsPerPublicCharger; - -while ( currentNbChargers > nbChargersGoal ) { - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> x.v_isActive); - if (gc != null) { - gc.f_setActive(false); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers--; - - List cars = new ArrayList<>(zero_Interface.c_orderedNonActiveVehiclesPublicParking.subList(0, amountOfVehiclesPerCharger)); - for (J_EADieselVehicle car : cars) { - zero_Interface.c_orderedNonActiveVehiclesPublicParking.remove(car); - zero_Interface.c_orderedActiveVehiclesPublicParking.add(0, car); - car.reRegisterEnergyAsset(); - } - } - else { - throw new RuntimeException("Charger slider error: there are not sufficient chargers to remove"); - } -} -while ( currentNbChargers < nbChargersGoal){ - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> !x.v_isActive); - if (gc != null) { - gc.f_setActive(true); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers++; - - List cars = new ArrayList<>(zero_Interface.c_orderedActiveVehiclesPublicParking.subList(0, amountOfVehiclesPerCharger)); - for (J_EADieselVehicle car : cars) { - zero_Interface.c_orderedActiveVehiclesPublicParking.remove(car); - zero_Interface.c_orderedNonActiveVehiclesPublicParking.add(0, car); - car.removeEnergyAsset(); - } - } - else { - throw new RuntimeException("Charger slider error: there are no more chargers to add"); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings(); -]]> - - - VOID - - 1750259219309 - - 890470 - - false - true - true - - - - - x.V1GCapable); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> !x.V1GCapable); - j_ea.V1GCapable = true; - currentNbChargers++; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> x.V1GCapable); - j_ea.V1GCapable = false; - currentNbChargers--; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1750259468109 - - 890490 - - false - true - true - - - - - x.V2GCapable); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> !x.V2GCapable); - j_ea.V2GCapable = true; - currentNbChargers++; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> x.V2GCapable); - j_ea.V2GCapable = false; - currentNbChargers--; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1750326729005 - - 60620 - - false - true - true - - - ]]> - - - - - - - - - VOID - - 1750328750011 - - 890530 - - false - true - true - - - - - x.p_eigenOprit && x.p_householdEV != null); -int desiredNbOfHousesWithEV = roundToInt(privateParking_pct / 100 * zero_Interface.c_orderedVehiclesPrivateParking.size()); - -// we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car -double ratioEVToDieselConsumption = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm / zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; - -while ( nbHousesWithEV > desiredNbOfHousesWithEV){ - J_EAVehicle j_ea = findFirst( zero_Interface.c_orderedVehiclesPrivateParking, h -> h instanceof J_EAEV); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() / ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - J_EADieselVehicle dieselCar = new J_EADieselVehicle(j_ea.getParentAgent(), energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, 1, OL_EnergyAssetType.DIESEL_VEHICLE, triptracker); - zero_Interface.c_orderedVehiclesPrivateParking.add(dieselCar); - nbHousesWithEV --; -} -while ( nbHousesWithEV < desiredNbOfHousesWithEV){ - J_EAVehicle j_ea = findFirst( zero_Interface.c_orderedVehiclesPrivateParking, h -> h instanceof J_EADieselVehicle); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() * ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - double capacityElectricity_kW = randomTrue(0.6) ? randomTrue(0.4) ? 3.2 : 5.6 : 11.0; - double storageCapacity_kWh = uniform_discr(65,90); - J_EAEV ev = new J_EAEV(j_ea.getParentAgent(), capacityElectricity_kW, storageCapacity_kWh, 1, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, 1, OL_EnergyAssetType.ELECTRIC_VEHICLE, triptracker); - zero_Interface.c_orderedVehiclesPrivateParking.add(ev); - nbHousesWithEV++; -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - - - 1722247653562 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1744962391299 - - 50-100 - - false - true - true - - - - - - - 1744962391306 - - 150-100 - - false - true - true - - - - - - - - - - 1722247653568 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1722349953637 - - 10480 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -4144960 - null - SOLID - 370 - 620 - 0.0 - -1 - null - - - 1722328776701 - - 00 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1722328776703 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -32 - null - - - 1722328776711 - - 23020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1722328776713 - - 26015 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722328776715 - - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722328776717 - - 1555 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1722328776719 - - 23080 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1722328776721 - - 26075 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_rooftopPVCompanies_pct.getValue(), sl_rooftopPVCompanies_pct ); - -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}]]> - - - - HORIZONTAL - - - - false - - - - 1722328776723 - - 1580 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722328776725 - - 230110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1722328776727 - - 260105 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722328776729 - - 15110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722328776731 - - 15175 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - false - 1722328776737 - - 260200 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722328776739 - - 15205 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722328776741 - - 230205 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1722329161559 - - 230140 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1722329161561 - - 260135 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_rooftopPVHouses_pct.getValue() ); - -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}]]> - - - - HORIZONTAL - - - - false - - - - 1722329161563 - - 15140 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1746091167061 - - 160140 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091167075 - - 160110 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091167087 - - 16080 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091167099 - - 16020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091167111 - - 160205 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1722334503404 - - 40700 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -10496 - null - SOLID - 300 - 200 - 0.0 - -1 - null - - - 1722334611918 - - 190710 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1722334647855 - - 40950 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -14774017 - null - SOLID - 300 - 100 - 0.0 - -1 - null - - - 1722334664308 - - 190960 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1722335253828 - - 40550 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -8355840 - null - SOLID - 300 - 100 - 0.0 - -1 - null - - - 1722335253832 - - 190560 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1722349990233 - - 100500 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - LEFT - - - 1728384392418 - - 4000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1728384392420 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -32 - null - - - 1728384392422 - - 23020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1728384392424 - - 26015 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1728384392426 - - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1728384392428 - - 1555 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1728384392430 - - 23080 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1728384392432 - - 26075 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_rooftopPVCompanies_pct_Businesspark.getValue(), sl_rooftopPVCompanies_pct_Businesspark ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}]]> - - - - HORIZONTAL - - - - false - - - - 1728384392434 - - 1580 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1728384392436 - - 230110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1728384392438 - - 260105 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1728384392440 - - 15110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1728384392442 - - 15155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - false - 1728384392444 - - 260180 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1728384392446 - - 15185 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1728384392448 - - 230185 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1746091438812 - - 160110 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091438857 - - 16080 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091438909 - - 16020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746091438954 - - 160185 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1750063382217 - - 8000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1750063382219 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 5 - - null - SOLID - 370 - 350 - 0.0 - -32 - null - - - 1750063382221 - - 235145 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - 1750063382223 - - 23555 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - false - 1750063382225 - - 26550 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_householdPVResidentialArea_pct.getValue() ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -} - -// Also updates the home batteries -f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue() );]]> - - - - HORIZONTAL - - - - false - - - - 1750063382227 - - 2055 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1750063382229 - - 2020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 14 - - - LEFT - - - false - 1750063382231 - - 265207 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750063382233 - - 20212 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1750063382235 - - 245212 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - RIGHT - - - 1750063382237 - - 3085 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - false - 1750063382239 - - 26580 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750063382241 - - 23585 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - false - 1750063382243 - - 266310 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750063382245 - - 20316 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1750063382247 - - 236315 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - false - 1750063382249 - - 31239 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - HORIZONTAL - - - - false - - - - 1750063382251 - - 20145 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - false - 1750063382253 - - 265140 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - (findAll(zero_Interface.energyModel.Houses, x -> true)), sl_electricityDemandIncreaseResidentialArea_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - 1750063382255 - - 20115 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - false - 1750063382257 - - 265110 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750063382259 - - 235115 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - false - 1750063382261 - - 2380 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1750063382263 - - 20186 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - false - 1750063382265 - - 265180 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750063382267 - - 244186 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - RIGHT - - - 1750246031130 - - 10270 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1750246031132 - - 2564 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750246031134 - - 1010 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1750246031136 - - 2269 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - 1752232837047 - - 18010 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1750246032749 - - 10270 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1750246032751 - - 2564 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1750246032753 - - 1010 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1750246032755 - - 2269 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - 1752232831588 - - 18010 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1752232850349 - - 19055 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850368 - - 19085 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850385 - - 190115 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850402 - - 190145 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850420 - - 190185 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850437 - - 190210 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850455 - - 345245 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752232850473 - - 190315 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1750063382277 - - 12000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1750063382279 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 370 - 350 - 0.0 - -32 - null - - - 1750063382281 - - 1070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 11 - - - LEFT - - - false - 1750063382283 - - 2090 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - HORIZONTAL - - - - false - - - - 1750063382285 - - 20120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1750063382287 - - 170120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - RIGHT - - - 1750063382289 - - 95120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - CENTER - - - false - 1750063382291 - - 21094 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1750063382293 - - 20070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 11 - - - LEFT - - - false - 1750063382295 - - 215300 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - false - 1750063382297 - - 3502 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1750063382299 - - 35317 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -2894893 - null - SOLID - 1 - 0 - 1 - 0 - 12 - -12 - 0 - - - 1750063382301 - - 36517 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -2894893 - null - SOLID - 1 - 0 - 1 - 0 - -12 - -12 - 0 - - - 1750063382303 - - 2021 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 14 - - - LEFT - - - - - - - - - - - - - 1722253108625 - - - - - - - - false - - 1722253108631 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089977 - true - 1722326400000 - - - - - - - - - - - 1722253108628 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722253108632 - 1722253108626 - - - 1729262524509 - - 601020 - - false - true - true - - - - - - - - - 1729262555712 - - 601040 - - false - true - true - - - - - - - - - - - VOID - - 1722256102007 - - - 70790 - - false - false - true - - - ]]> - - - - - - - - - - 0){ - f_setHeatingSystemsWithCompanyUI(gcList, targetHeatPump_pct, sliderGasburner, sliderHeatpump); -} -else{ - ArrayList companies = new ArrayList(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).toList()); - double nbHeatPumps = count(gcList, gc -> gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); - int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - - while ( targetHeatPumpAmount < nbHeatPumps) { // remove excess heatpumps, replace with gasburners. - GCUtility company = findFirst(companies, x->x.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); - if (company != null) { - company.p_primaryHeatingAsset.removeEnergyAsset(); - nbHeatPumps--; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - new J_EAConversionGasBurner(company, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - company.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; - } - else { - throw new RuntimeException("Can't find Heatpump in company that should have heatpump in f_setHeatingSystemsCompanies."); - } - } - - while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - GCUtility company = findFirst(companies, x -> x.p_primaryHeatingAsset instanceof J_EAConversionGasBurner); - if (company != null) { - company.p_primaryHeatingAsset.removeEnergyAsset(); - nbHeatPumps++; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - new J_EAConversionHeatPump(company, peakHeatDemand_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, 60, zero_Interface.energyModel.v_currentAmbientTemperature_degC, 0, 1, OL_AmbientTempType.AMBIENT_AIR); - company.p_heatingType = OL_GridConnectionHeatingType.HEATPUMP_AIR; - } - else { - throw new RuntimeException("Can't find Gasburner in company that should have gasburner in f_setHeatingSystemsCompanies."); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1722256221655 - - - 70830 - - false - true - true - - - ]]> - - - - - - houses = new ArrayList(zero_Interface.c_orderedHeatingSystemsHouses.stream().filter(gcList::contains).toList()); -double nbHeatPumps = count(gcList, gc -> gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - -while ( nbHeatPumps > targetHeatPumpAmount) { // remove excess heatpumps, replace with gasburners. - GCHouse house = findFirst(houses, x->x.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); - if (house != null) { - house.p_primaryHeatingAsset.removeEnergyAsset(); - nbHeatPumps--; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - new J_EAConversionGasBurner(house, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - house.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; - } - else { - throw new RuntimeException("Can't find Heatpump in house that should have heatpump in f_setHeatingSystemsHouseholds."); - } -} - -while ( nbHeatPumps < targetHeatPumpAmount) { // remove gasburners, add heatpumps. - GCHouse house = findFirst(houses, x -> x.p_primaryHeatingAsset instanceof J_EAConversionGasBurner); - if (house != null) { - house.p_primaryHeatingAsset.removeEnergyAsset(); - nbHeatPumps++; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - new J_EAConversionHeatPump(house, peakHeatDemand_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, 60, zero_Interface.energyModel.v_currentAmbientTemperature_degC, 0, 1, OL_AmbientTempType.AMBIENT_AIR); - house.p_heatingType = OL_GridConnectionHeatingType.HEATPUMP_AIR; - } - else { - throw new RuntimeException("Can't find Gasburner in house that should have gasburner in f_setHeatingSystemsHouseholds."); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1722256269495 - - - 70770 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - VOID - - 1722335783993 - - - 70590 - - false - true - true - - - ]]> - - - - - - 0){ - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.sl_heatDemandCompanyReduction.setValue(demandReduction_pct, false); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1729259449060 - - 90810 - - false - true - true - - - ]]> - - - - - - - - - - - - - - companies = new ArrayList(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).filter(x -> x.v_isActive).toList()); -int nbActiveCompanies = companies.size(); -Pair pair = f_calculateNumberOfGhostHeatingSystems(companies); -traceln("ghost pair: " + pair); -int nbOfGhostHeatingSystems = pair.getFirst() + pair.getSecond(); // Both Electric and Hybrid heatpumps -int nbHeatPumps = count(companies, gc -> gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump) + nbOfGhostHeatingSystems; -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * nbActiveCompanies); - - -while ( targetHeatPumpAmount < nbHeatPumps){ // remove excess heatpumps of companies that didnt start with a heatpump, replace with gasburners. - GCUtility company = findFirst(companies, gc -> gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(0, true); // First option is gasburner - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps--; - } - else { //No more heating assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump) + nbOfGhostHeatingSystems; - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - sliderGasburner.setValue(100-min_pct_ElectricHeatpumpSlider, false); - return; - } -} - -while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - - GCUtility company = findFirst(companies, gc -> gc.p_primaryHeatingAsset instanceof J_EAConversionGasBurner); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(2, true); // Third option (index 2) is electric heatpump - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps++; - } - else { //No more gas burner assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump) + nbOfGhostHeatingSystems; - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - sliderGasburner.setValue(100-min_pct_ElectricHeatpumpSlider, false); - return; - } -}]]> - - - RETURNS_VALUE - ]]> - 1729262524479 - - 401000 - - false - true - true - - - ]]> - - - - - RETURNS_VALUE - - 1749116448649 - - 60890 - - false - true - true - - - - - - - - VOID - - 1749739532180 - - 540490 - - false - true - true - node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - - double outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double efficiency = 1.0; - - new J_EAConversionHeatDeliverySet(house, peakHeatDemand_kW, efficiency, zero_Interface.energyModel.p_timeStep_h, outputTemperature_degC); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749739532202 - - 540510 - - false - true - true - j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - J_EAConversionGasBurner gasBurner; - //if house has follows the general heat deamnd profile - if (heatDemandAsset != null) { - gasBurner = new J_EAConversionGasBurner(house, heatDemandAsset.yearlyDemand_kWh/8760*10, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - //if house has a thermalBuildingAsset - else if (house.p_BuildingThermalAsset != null){ - double gasBurnerCapacity_kW = 10; - gasBurner = new J_EAConversionGasBurner(house, gasBurnerCapacity_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - // Else house has a customprofiel - else { - J_EAProfile heatDemandProfile = (J_EAProfile)findFirst(house.c_profileAssets, x->x instanceof J_EAProfile && x.energyCarrier == OL_EnergyCarriers.HEAT); - double peakHeatDemand_kW = Arrays.stream(heatDemandProfile.a_energyProfile_kWh).max().orElseThrow(() -> new RuntimeException()); - gasBurner = new J_EAConversionGasBurner(house, peakHeatDemand_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749739532217 - - 540625 - - false - true - true - - - - - x.p_airco != null); -double nbHouses = zero_Interface.energyModel.Houses.size(); -traceln("Previous nb households with airco: " + nbHousesWithAirco); -while ( roundToInt(nbHouses * desiredShare) > nbHousesWithAirco ) { - GCHouse house = randomWhere(zero_Interface.energyModel.Houses, x -> x.p_airco == null); - double aircoPower_kW = roundToDecimal(uniform(3,6),1); - new J_EAAirco(house, aircoPower_kW, zero_Interface.energyModel.p_timeStep_h); - nbHousesWithAirco ++; -} -while ( roundToInt(nbHouses * desiredShare) < nbHousesWithAirco ) { - GCHouse house = randomWhere(zero_Interface.energyModel.Houses, x -> x.p_airco != null); - house.p_airco.removeEnergyAsset(); - nbHousesWithAirco --; -} - -traceln("New nb households with airco: " + nbHousesWithAirco); - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings(); -]]> - - - VOID - - 1749739532231 - - 540555 - - false - true - true - node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - house.p_heatingType = OL_GridConnectionHeatingType.LT_DISTRICTHEAT; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double heatpumpElectricCapacity_kW = min(peakHeatDemand_kW / 3, 1.0); - double efficiency_fr = 0.5; - double inputTemperature_degC = 15.0; // TODO: Look at these temperatures! - double outputTemperature_degC = 50.0; - double sourceAssetHeatPower_kW = 0.0; - double belowZeroHeatpumpEtaReductionFactor = 1.0; - J_EAConversionHeatPump heatpump = new J_EAConversionHeatPump(house, - heatpumpElectricCapacity_kW, - efficiency_fr, - zero_Interface.energyModel.p_timeStep_h, - outputTemperature_degC, - zero_Interface.energyModel.v_currentAmbientTemperature_degC, - sourceAssetHeatPower_kW, - belowZeroHeatpumpEtaReductionFactor, - OL_AmbientTempType.HEAT_GRID - ); - heatpump.updateParameters(inputTemperature_degC, outputTemperature_degC); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749739532244 - - 540575 - - false - true - true - - - - VOID - - 1752227724432 - - 540670 - - false - true - true - - - - - x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int nbHousesWithImprovedInsulation = count(zero_Interface.energyModel.Houses, x -> x.p_hasAdditionalInsulation && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int targetNbHousesWithImprovedInsulation = roundToInt(houses_pct / 100.0 * nbHouses); - -while (nbHousesWithImprovedInsulation < targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(zero_Interface.energyModel.Houses, x -> !x.p_hasAdditionalInsulation && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_hasAdditionalInsulation = true; - double lossFactor_WpK = house.p_BuildingThermalAsset.getLossFactor_WpK(); - house.p_BuildingThermalAsset.setLossFactor_WpK( 0.7 * lossFactor_WpK ); - nbHousesWithImprovedInsulation++; - } - else { - throw new RuntimeException("Unable to find house that does not yet have additional insulation"); - } -} -while (nbHousesWithImprovedInsulation > targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(zero_Interface.energyModel.Houses, x -> x.p_hasAdditionalInsulation && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_hasAdditionalInsulation = false; - double lossFactor_WpK = house.p_BuildingThermalAsset.getLossFactor_WpK(); - house.p_BuildingThermalAsset.setLossFactor_WpK( lossFactor_WpK / 0.7 ); - nbHousesWithImprovedInsulation--; - } - else { - throw new RuntimeException("Unable to find house that has additional insulation"); - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - - - 1722253108626 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1722253115477 - - 40-100 - - false - true - true - - - - - - - 1722253115479 - - 160-100 - - false - true - true - - - - - - - - - - 1722253108632 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1722350093699 - - 10460 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -4144960 - null - SOLID - 450 - 470 - 0.0 - -1 - null - - - 1722350093702 - - 100480 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - LEFT - - - 1722253128676 - - 00 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1722253128678 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -6943 - null - - - 1722253128680 - - 30240 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128682 - - true - 30290 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1722253128684 - - 30265 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128686 - - true - 30315 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128688 - - 235265 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128690 - - 235240 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128692 - - true - 235315 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128694 - - true - 235290 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 14 - - - CENTER - - - false - 1722253128696 - - true - 265310 - - true - true - false - SHAPE_DRAW_2D3D - - false - - false - - - - - HORIZONTAL - - - - false - - - - false - 1722253128698 - - 265235 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_electricHeatPumpHouseholds_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1722253128700 - - true - 265285 - - true - true - false - SHAPE_DRAW_2D3D - - false - - false - - - - - HORIZONTAL - - - - false - - - - false - 1722253128702 - - 265260 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_electricHeatPumpHouseholds_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1722253128704 - - 265200 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - (zero_Interface.energyModel.Houses.findAll( x -> true)), sl_heatDemandReductionHouseholds_pct.getValue() );]]> - - - - HORIZONTAL - - - - false - - - - 1722253128706 - - 235205 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128708 - - 30205 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128710 - - 20180 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - false - 1722253128712 - - 26535 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - (zero_Interface.energyModel.UtilityConnections.findAll( x -> true)), sl_heatDemandReductionCompanies_pct.getValue() );]]> - - - - HORIZONTAL - - - - false - - - - 1722253128714 - - 2540 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128716 - - 23540 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128718 - - 2575 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128720 - - true - 25125 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1722253128722 - - 25100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128724 - - true - 25150 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253128726 - - 235100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128728 - - 23575 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128730 - - true - 235150 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253128732 - - true - 235125 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 14 - - - CENTER - - - false - 1722253128734 - - true - 265145 - - true - true - false - SHAPE_DRAW_2D3D - - false - - true - - - - - HORIZONTAL - - - - false - - - - false - 1722253128736 - - 26570 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_gasBurnerCompanies_pct, sl_electricHeatPumpCompanies_pct ); - -zero_Interface.f_resetSettings();]]> - - - - HORIZONTAL - - - - false - - - - false - 1722253128738 - - true - 265120 - - true - true - false - SHAPE_DRAW_2D3D - - false - - true - - - - - HORIZONTAL - - - - false - - - - false - 1722253128740 - - 26595 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_gasBurnerCompanies_pct, sl_electricHeatPumpCompanies_pct); - -zero_Interface.f_resetSettings();]]> - - - - HORIZONTAL - - - - false - - - - 1722254471242 - - 2015 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1746091940464 - - 16040 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829752 - - 16075 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829788 - - 160100 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829826 - - true - 160125 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829863 - - true - 160150 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829905 - - 160265 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829948 - - 160205 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092829986 - - 160240 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092830024 - - true - 160315 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746092830063 - - true - 160290 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1722253134565 - - 4000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722253134567 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -6943 - null - - - 1722253134569 - - 20190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253134571 - - true - 20240 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1722253134573 - - 20215 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253134575 - - true - 20265 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253134577 - - 230215 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253134579 - - 230190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253134581 - - true - 230265 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -4144960 - - - - Dialog - 14 - - - CENTER - - - 1722253134583 - - true - 230240 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -4144960 - - - - SansSerif - 14 - - - CENTER - - - false - 1722253134585 - - true - 260260 - - true - true - false - SHAPE_DRAW_2D3D - - false - false - - - - - HORIZONTAL - - - - false - - - - false - 1722253134587 - - 260185 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_heatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1722253134589 - - true - 260235 - - true - true - false - SHAPE_DRAW_2D3D - - false - false - - - - - HORIZONTAL - - - - false - - - - false - 1722253134591 - - 260210 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_heatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1722253134593 - - true - 26080 - - true - true - false - SHAPE_DRAW_2D3D - - false - false - - - - - HORIZONTAL - - - - false - - - - 1722253134595 - - true - 23085 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722253134597 - - true - 2085 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722253134599 - - true - 2050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1722253134601 - - 20155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - - - - 1722326800106 - - 8000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722326800108 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -6943 - null - - - false - 1722326800142 - - 25550 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - (zero_Interface.energyModel.UtilityConnections.findAll( x -> true)), sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getValue());]]> - - - - HORIZONTAL - - - - false - - - - 1722326800144 - - 1555 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722326800146 - - 22555 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722326800148 - - 1590 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722326800150 - - 15140 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1722326800152 - - 15115 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722326800154 - - 15165 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722326800156 - - 225115 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722326800158 - - 22590 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722326800160 - - 225165 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722326800162 - - 225140 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - SansSerif - 14 - - - CENTER - - - false - 1722326800164 - - 255160 - - true - true - false - SHAPE_DRAW_2D3D - - false - - false - - - - - HORIZONTAL - - - - false - - - - false - 1722326800166 - - 25585 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct); - -zero_Interface.f_resetSettings();]]> - - - - HORIZONTAL - - - - false - - - - false - 1722326800168 - - 255135 - - true - true - false - SHAPE_DRAW_2D3D - - false - - false - - - - - HORIZONTAL - - - - false - - - - false - 1722326800170 - - 255110 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct); - -zero_Interface.f_resetSettings();]]> - - - - HORIZONTAL - - - - false - - - - 1722326800172 - - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1734371025574 - - 225190 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1734371025600 - - 255185 - - true - true - false - SHAPE_DRAW_2D3D - - false - - false - - - - - HORIZONTAL - - - - false - - - - 1734371025534 - - 15190 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1746093187570 - - 16055 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746093187613 - - 16090 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746093187656 - - 160115 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746093187698 - - 160140 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746093187741 - - 160165 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746093187784 - - 160190 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1722335783989 - - 40540 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -8355840 - null - SOLID - 390 - 150 - 0.0 - -1 - null - - - 1722335783991 - - 240550 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1722338183031 - - 40710 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -5952982 - null - SOLID - 400 - 150 - 0.0 - -1 - null - - - 1722338183033 - - 130720 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1749738869813 - - 4000 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1749738869815 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - - null - SOLID - 370 - 350 - 0.0 - -6943 - null - - - 1749738869817 - - 2065 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1749738869821 - - 2090 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1749738869823 - - 23090 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - 1749738869825 - - 23065 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - false - 1749738869829 - - 26060 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_householdElectricHeatPumpResidentialArea_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1749738869833 - - 26085 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - true), sl_householdElectricHeatPumpResidentialArea_pct.getValue() ); -]]> - - - - HORIZONTAL - - - - false - - - - false - 1749738869835 - - 260235 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1749738869837 - - 227240 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - Dialog - 12 - - - CENTER - - - 1749738869839 - - 20240 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - Dialog - 12 - - - LEFT - - - 1749738869841 - - 2030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 14 - - - LEFT - - - false - 1749738869843 - - 260206 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1749738869845 - - 20210 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1749738869847 - - 223210 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - - - SansSerif - 12 - - - LEFT - - - false - 1749738869849 - - 20120 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - false - - - - false - 1749738869851 - - 20155 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - false - - - - 1752231559962 - - 18065 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752231559982 - - 18090 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752231560000 - - 220125 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752231560019 - - 220160 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752231560038 - - 180210 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1752231560056 - - 180240 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - - - - - - - - 1722245324895 - - - - - - - - false - - 1722245324901 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089976 - true - 1722326400000 - - - - - - - - - - - 1722245324898 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722245324902 - 1722245324896 - - - 1729167973194 - - 401140 - - false - true - true - - - - - - - - - 1729168015819 - - 401120 - - false - true - true - - - - - - - - - 1729168016768 - - 401100 - - false - true - true - - - - - - - - - - - VOID - - 1722256088443 - - - 70740 - - false - true - true - - - - - - - - - - - - - - - - - - - - VOID - - 1722342449665 - - - 70600 - - false - true - true - - - ]]> - - - - - - 0) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null) { - //if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != gc){ - //int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), gc); - //companyUI.GCnr_selection.setValue(i, true); - //} - companyUI.sl_mobilityDemandCompanyReduction.setValue(demandReduction_pct, false); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - RETURNS_VALUE - ]]> - 1729168033110 - - 201080 - - false - true - true - - - ]]> - - 0) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - for(int i = 0; i < companyUI.c_ownedGridConnections.size(); i++){ - if(companyUI.c_ownedGridConnections.get(i).v_hasQuarterHourlyValues && companyUI.c_ownedGridConnections.get(i).v_isActive){ - numberOfGhostVehicle_Cars += companyUI.v_minEVCarSlider; - numberOfGhostVehicle_Vans += companyUI.v_minEVVanSlider; - numberOfGhostVehicle_Trucks += companyUI.v_minEVTruckSlider; - } - } - } -} - -return new Triple(numberOfGhostVehicle_Cars, numberOfGhostVehicle_Vans, numberOfGhostVehicle_Trucks);]]> - - - VOID - - 1746008458894 - - 70770 - - false - true - true - - - ]]> - - - - - - - - - - - - - - triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getFirst(); -int nbHydrogentrucksCurrent = triple.getSecond(); -int nbDieseltrucksCurrent = triple.getThird(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbDieselTrucksGoal = roundToInt(total_vehicles*pctDieselTrucksGoal/100.0); -boolean finishedLookingThroughElectricTrucks = false; - -if (nbDieseltrucksCurrent < nbDieselTrucksGoal) { - // Add Diesel Trucks - while ( nbDieseltrucksCurrent < nbDieselTrucksGoal ) { - if ( nbEtruckCurrent > numberOfGhostVehicle_Trucks && !finishedLookingThroughElectricTrucks ) { - // replace electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - finishedLookingThroughElectricTrucks = true; - } - else { - nbDieseltrucksCurrent++; - nbEtruckCurrent--; - } - } - else{// ( nbHydrogentrucksCurrent > 0 ) { - // replace hydrogen truck with diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent++; - nbHydrogentrucksCurrent--; - } - /* - else { - throw new RuntimeException("Can not add another diesel vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Diesel Trucks - while ( nbDieseltrucksCurrent > nbDieselTrucksGoal ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent--; - nbEtruckCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1746008458907 - - 70790 - - false - true - true - - - ]]> - - - - - - - - - - - - - - triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getFirst(); -int nbHydrogentrucksCurrent = triple.getSecond(); -int nbDieseltrucksCurrent = triple.getThird(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbHydrogenTrucksGoal = roundToInt(total_vehicles*pctHydrogenTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbHydrogentrucksCurrent < nbHydrogenTrucksGoal) { - // Add Hydrogen Trucks - while ( nbHydrogentrucksCurrent < nbHydrogenTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with a hydrogen truck - if (!f_dieselToHydrogenTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbHydrogentrucksCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// ( nbEtruckCurrent > v_totalNumberOfGhostVehicle_Trucks ) { - // replace an electric truck with a hydrogen truck - if (!f_electricToHydrogenTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent++; - nbEtruckCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - }*/ - } -} -else { - // Remove Hydrogen Trucks - while ( nbHydrogentrucksCurrent > nbHydrogenTrucksGoal ) { - // replace a hydrogen truck with a diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();]]> - - - VOID - - 1746008458917 - - 70810 - - false - true - true - - - ]]> - - - - - - - - - - - - - - triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getFirst(); -int nbHydrogentrucksCurrent = triple.getSecond(); -int nbDieseltrucksCurrent = triple.getThird(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbElectricTrucksGoal = roundToInt(total_vehicles*pctElectricTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbEtruckCurrent < nbElectricTrucksGoal) { - // Add Electric Trucks - while ( nbEtruckCurrent < nbElectricTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbEtruckCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// if ( nbHydrogentrucksCurrent > 0 ) { - // replace a hydrogen truck with an electric truck - if (!f_hydrogenToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent++; - nbHydrogentrucksCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Electric Trucks - while ( nbEtruckCurrent > nbElectricTrucksGoal ) { - // replace an electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - RETURNS_VALUE - - 1746008458938 - - 360720 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - dieselTruck = (J_EADieselVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbDieselTrucks--; - companyUI.sl_dieselTrucksCompany.setValue(companyUI.v_nbDieselTrucks, false); - companyUI.v_nbEVTrucks++; - companyUI.sl_electricTrucksCompany.setValue(companyUI.v_nbEVTrucks, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - if (foundAdditionalVehicle) { - companyUI.c_additionalVehicles.get(gc).remove(dieselTruck); - } - } - } - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(electricTruck); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1746008458950 - - 360740 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (hydrogenTruck!=null) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbHydrogenTrucks--; - companyUI.sl_hydrogenTrucksCompany.setValue(companyUI.v_nbHydrogenTrucks, false); - companyUI.v_nbEVTrucks++; - companyUI.sl_electricTrucksCompany.setValue(companyUI.v_nbEVTrucks, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(hydrogenTruck); - } - } - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(electricTruck); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1746008458960 - - 360780 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - electricTruck = (J_EAEV)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicle -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (electricTruck!=null) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbEVTrucks--; - companyUI.sl_electricTrucksCompany.setValue(companyUI.v_nbEVTrucks, false); - companyUI.v_nbHydrogenTrucks++; - companyUI.sl_hydrogenTrucksCompany.setValue(companyUI.v_nbHydrogenTrucks, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(electricTruck); - } - } - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1746008458968 - - 360800 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - dieselTruck = (J_EADieselVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbDieselTrucks--; - companyUI.sl_dieselTrucksCompany.setValue(companyUI.v_nbDieselTrucks, false); - companyUI.v_nbHydrogenTrucks++; - companyUI.sl_hydrogenTrucksCompany.setValue(companyUI.v_nbHydrogenTrucks, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(dieselTruck); - } - } - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = true; - available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1746008458977 - - 360840 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - electricTruck = (J_EAEV)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricTruck != null ) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - if (companyUI.v_minEVTruckSlider >= companyUI.v_nbEVTrucks) { - traceln("Removed already existing Electric Truck from GC: " + companyUI.p_companyName); - } - else { - companyUI.v_nbEVTrucks--; - companyUI.sl_electricTrucksCompany.setValue(companyUI.v_nbEVTrucks, false); - companyUI.v_nbDieselTrucks++; - companyUI.sl_dieselTrucksCompany.setValue(companyUI.v_nbDieselTrucks, false); - } - companyUI.rb_scenariosPrivateUI.setValue(2, false); - - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(electricTruck); - } - } - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1746008458987 - - 360860 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( hydrogenTruck != null ) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbHydrogenTrucks--; - companyUI.sl_hydrogenTrucksCompany.setValue(companyUI.v_nbHydrogenTrucks, false); - companyUI.v_nbDieselTrucks++; - companyUI.sl_dieselTrucksCompany.setValue(companyUI.v_nbDieselTrucks, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(hydrogenTruck); - } - } - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;]]> - - - VOID - - 1746018501114 - - 3601040 - - false - true - true - - - ]]> - - - - - - - - - - - - - - vehicles = new ArrayList(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getThird(); - -int nbElectricTrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Trucks; -int nbDieseltrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); -int nbHydrogentrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - -int totalVehicles = nbElectricTrucksCurrent + nbDieseltrucksCurrent + nbHydrogentrucksCurrent; - - - -int pct_electricTruckSlider = roundToInt(100.0*nbElectricTrucksCurrent/totalVehicles); -int pct_hydrogenTruckSlider = roundToInt(100.0*nbHydrogentrucksCurrent/totalVehicles); -int pct_dieselTruckSlider = roundToInt(100.0*nbDieseltrucksCurrent/totalVehicles); - -sliderElectricTrucks.setValue(pct_electricTruckSlider, false); -if ( sliderHydrogenTrucks != null ) { - sliderHydrogenTrucks.setValue(pct_hydrogenTruckSlider, false); -} -else if ( sliderHydrogenTrucks == null && pct_hydrogenTruckSlider != 0 ) { - throw new RuntimeException("Hydrogen trucks found but no hydrogen slider passed to f_setTruckSlidersToCurrentEngineState"); -}sliderFossilFuelTrucks.setValue(pct_dieselTruckSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - RETURNS_VALUE - ]]> - 1749134655530 - - 201040 - - false - true - true - - - ]]> - - - - - - p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && gc.v_isActive); - nbDieselTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); -} - -return new Triple(nbEtruckCurrent, nbHydrogenTrucksCurrent, nbDieselTrucksCurrent);]]> - - - RETURNS_VALUE - - 1749645625091 - - 590720 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - dieselVan = (J_EADieselVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); - if ( dieselVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselVan!=null) { - GridConnection gc = (GridConnection)dieselVan.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbDieselVans--; - companyUI.sl_dieselVansCompany.setValue(companyUI.v_nbDieselVans, false); - companyUI.v_nbEVVans++; - companyUI.sl_electricVansCompany.setValue(companyUI.v_nbEVVans, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - if (foundAdditionalVehicle) { - companyUI.c_additionalVehicles.get(gc).remove(dieselVan); - } - } - } - - J_ActivityTrackerTrips tripTracker = dieselVan.tripTracker; - boolean available = dieselVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVan); - dieselVan.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricVan = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VAN, tripTracker); - electricVan.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricVan); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(electricVan); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel van left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1749645629101 - - 590740 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - electricVan = (J_EAEV)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive); - if ( electricVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricVan = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricVan != null ) { - GridConnection gc = (GridConnection)electricVan.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - if (companyUI.v_minEVVanSlider >= companyUI.v_nbEVVans) { - traceln("Removed already existing Electric Van from GC: " + companyUI.p_companyName); - } - else { - companyUI.v_nbEVVans--; - companyUI.sl_electricVansCompany.setValue(companyUI.v_nbEVVans, false); - companyUI.v_nbDieselVans++; - companyUI.sl_dieselVansCompany.setValue(companyUI.v_nbDieselVans, false); - } - companyUI.rb_scenariosPrivateUI.setValue(2, false); - - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(electricVan); - } - } - - J_ActivityTrackerTrips tripTracker = electricVan.tripTracker; - boolean available = true; - available = electricVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricVan); - electricVan.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VAN, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric van left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1749646233660 - - 590780 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - dieselCar = (J_EADieselVehicle)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); - if ( dieselCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselCar!=null) { - GridConnection gc = (GridConnection)dieselCar.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - companyUI.v_nbDieselCars--; - companyUI.sl_dieselCarsCompany.setValue(companyUI.v_nbDieselCars, false); - companyUI.v_nbEVCars++; - companyUI.sl_electricCarsCompany.setValue(companyUI.v_nbEVCars, false); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - if (foundAdditionalVehicle) { - companyUI.c_additionalVehicles.get(gc).remove(dieselCar); - } - } - } - - J_ActivityTrackerTrips tripTracker = dieselCar.tripTracker; - boolean available = dieselCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselCar); - dieselCar.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricCar = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VEHICLE, tripTracker); - electricCar.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricCar); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(electricCar); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel car left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - - 1749646235580 - - 590800 - - false - true - true - - - ]]> - - 0 ) { - for (GridConnection gc : gcList ) { - UI_company companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - List totalList = new ArrayList(); - for (List list : companyUI.c_additionalVehicles.values() ) { - totalList.addAll(list); - } - electricCar = (J_EAEV)findFirst(totalList, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive); - if ( electricCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricCar = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricCar != null ) { - GridConnection gc = (GridConnection)electricCar.getParentAgent(); - - // update UI company - UI_company companyUI = null; - if (zero_Interface.c_companyUIs.size() > 0){ - companyUI = zero_Interface.c_companyUIs.get(gc.p_owner.p_connectionOwnerIndexNr); - if (companyUI != null && companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) == gc) { // should also check the setting of selected GC - if (companyUI.v_minEVCarSlider >= companyUI.v_nbEVCars) { - traceln("Removed already existing Electric Car from GC: " + companyUI.p_companyName); - } - else { - companyUI.v_nbEVCars--; - companyUI.sl_electricCarsCompany.setValue(companyUI.v_nbEVCars, false); - companyUI.v_nbDieselCars++; - companyUI.sl_dieselCarsCompany.setValue(companyUI.v_nbDieselCars, false); - } - companyUI.rb_scenariosPrivateUI.setValue(2, false); - - } - if(foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).remove(electricCar); - } - } - - J_ActivityTrackerTrips tripTracker = electricCar.tripTracker; - boolean available = true; - available = electricCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricCar); - electricCar.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VEHICLE, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(companyUI != null && foundAdditionalVehicle){ - companyUI.c_additionalVehicles.get(gc).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric car left, but could not find it."); -} - -return true;]]> - - - RETURNS_VALUE - ]]> - 1749655535164 - - 201020 - - false - true - true - - - ]]> - - - - - - p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN && gc.v_isActive); - nbDieselVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); -} - -return new Triple(nbEVansCurrent, nbHydrogenVansCurrent, nbDieselVansCurrent);]]> - - - RETURNS_VALUE - ]]> - 1749655667960 - - 201000 - - false - true - true - - - ]]> - - - - - - p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE && gc.v_isActive); - nbDieselCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); -} - -return new Triple(nbEVsCurrent, nbHydrogenCarsCurrent, nbDieselCarsCurrent);]]> - - - VOID - - 1749655752858 - - 70840 - - false - true - true - - - ]]> - - - - - - - - - - triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getFirst(); -int nbDieselvansCurrent = triple.getThird(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbDieselVansGoal = roundToInt(total_vehicles*pctDieselVansGoal/100.0); - -if (nbDieselvansCurrent < nbDieselVansGoal) { - // Add Diesel Vans - while ( nbDieselvansCurrent < nbDieselVansGoal ) { - if ( nbEvanCurrent > numberOfGhostVehicle_Vans ) { - // replace electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbDieselvansCurrent++; - nbEvanCurrent--; - } - } - } -} -else { - // Remove Diesel Vans - while ( nbDieselvansCurrent > nbDieselVansGoal ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbDieselvansCurrent--; - nbEvanCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749656346356 - - 70860 - - false - true - true - - - ]]> - - - - - - - - - - triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getFirst(); -int nbDieselvansCurrent = triple.getThird(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbElectricVansGoal = roundToInt(total_vehicles*pctElectricVansGoal/100.0); - -if (nbEvanCurrent < nbElectricVansGoal) { - // Add Electric Vans - while ( nbEvanCurrent < nbElectricVansGoal ) { - if ( nbDieselvansCurrent > 0 ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbEvanCurrent++; - nbDieselvansCurrent--; - } - } - } -} -else { - // Remove Electric Vans - while ( nbEvanCurrent > nbElectricVansGoal ) { - // replace an electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbEvanCurrent--; - nbDieselvansCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749717776391 - - 70890 - - false - true - true - - - ]]> - - - - - - - - - - triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getFirst(); -int nbDieselcarsCurrent = triple.getThird(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbDieselCarsGoal = roundToInt(total_vehicles*pctDieselCarsGoal/100.0); - -if (nbDieselcarsCurrent < nbDieselCarsGoal) { - // Add Diesel Cars - while ( nbDieselcarsCurrent < nbDieselCarsGoal ) { - if ( nbEcarCurrent > numberOfGhostVehicle_Cars ) { - // replace electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbDieselcarsCurrent++; - nbEcarCurrent--; - } - } - } -} -else { - // Remove Diesel Cars - while ( nbDieselcarsCurrent > nbDieselCarsGoal ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbDieselcarsCurrent--; - nbEcarCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749717779317 - - 70910 - - false - true - true - - - ]]> - - - - - - - - - - triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getFirst(); -int nbDieselcarsCurrent = triple.getThird(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbElectricCarsGoal = roundToInt(total_vehicles*pctElectricCarsGoal/100.0); - -if (nbEcarCurrent < nbElectricCarsGoal) { - // Add Electric Cars - while ( nbEcarCurrent < nbElectricCarsGoal ) { - if ( nbDieselcarsCurrent > 0 ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbEcarCurrent++; - nbDieselcarsCurrent--; - } - } - } -} -else { - // Remove Electric Cars - while ( nbEcarCurrent > nbElectricCarsGoal ) { - // replace an electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbEcarCurrent--; - nbDieselcarsCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749717909708 - - 3601020 - - false - true - true - - - ]]> - - - - - - - - - - - - - - vehicles = new ArrayList(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getThird(); - -int nbElectricVansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Vans; -int nbDieselvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); -int nbHydrogenvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); - -int totalVehicles = nbElectricVansCurrent + nbDieselvansCurrent + nbHydrogenvansCurrent; - - - -int pct_electricVanSlider = roundToInt(100.0*nbElectricVansCurrent/totalVehicles); -int pct_hydrogenVanSlider = roundToInt(100.0*nbHydrogenvansCurrent/totalVehicles); -int pct_dieselVanSlider = roundToInt(100.0*nbDieselvansCurrent/totalVehicles); - -sliderElectricVans.setValue(pct_electricVanSlider, false); -if ( sliderHydrogenVans != null ) { - sliderHydrogenVans.setValue(pct_hydrogenVanSlider, false); -} -else if ( sliderHydrogenVans == null && pct_hydrogenVanSlider != 0 ) { - throw new RuntimeException("Hydrogen vans found but no hydrogen slider passed to f_setVanSlidersToCurrentEngineState"); -} -sliderFossilFuelVans.setValue(pct_dieselVanSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - VOID - - 1749717987139 - - 3601000 - - false - true - true - - - ]]> - - - - - - - - - - - - - - vehicles = new ArrayList(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getThird(); - -int nbElectricCarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Cars; -int nbDieselcarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); -int nbHydrogencarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); - -int totalVehicles = nbElectricCarsCurrent + nbDieselcarsCurrent + nbHydrogencarsCurrent; - - - -int pct_electricCarSlider = roundToInt(100.0*nbElectricCarsCurrent/totalVehicles); -int pct_hydrogenCarSlider = roundToInt(100.0*nbHydrogencarsCurrent/totalVehicles); -int pct_dieselCarSlider = roundToInt(100.0*nbDieselcarsCurrent/totalVehicles); - -sliderElectricCars.setValue(pct_electricCarSlider, false); -if ( sliderHydrogenCars != null ) { - sliderHydrogenCars.setValue(pct_hydrogenCarSlider, false); -} -else if ( sliderHydrogenCars == null && pct_hydrogenCarSlider != 0 ) { - throw new RuntimeException("Hydrogen cars found but no hydrogen slider passed to f_setCarSlidersToCurrentEngineState"); -} -sliderFossilFuelCars.setValue(pct_dieselCarSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} -zero_Interface.f_resetSettings();]]> - - - - - 1722245324896 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1722245483166 - - 50-100 - - false - true - true - - - - - - - 1722252542608 - - 150-100 - - false - true - true - - - - - - - - - - 1722245324902 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1722350199532 - - 10470 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -4144960 - null - SOLID - 800 - 470 - 0.0 - -1 - null - - - 1722350199535 - - 100490 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - LEFT - - - 1722247567090 - - 00 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1722247567092 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DOTTED - 370 - 350 - 0.0 - -2625550 - null - - - false - 1722247567094 - - 260295 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - false - 1722247567096 - - 26085 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567098 - - 230300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567100 - - 20300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567102 - - 1590 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567104 - - 23090 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567106 - - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722247567108 - - 26015 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567110 - - 23020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1722247567112 - - 260110 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567114 - - 15115 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567116 - - 230115 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - false - 1722247567118 - - 260135 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567120 - - 15140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567122 - - 230140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567124 - - 1565 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722247567126 - - 260270 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567128 - - 20275 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567130 - - 230275 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567132 - - 15250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722247567134 - - 260215 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567136 - - 230220 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567138 - - 15220 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1722247567140 - - 260190 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1722247567142 - - 15195 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1722247567144 - - 230195 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1722247567146 - - 15170 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1746096199769 - - 16020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716217 - - 16090 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716230 - - 160115 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716242 - - 160140 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716255 - - 160195 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716267 - - 160220 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716280 - - 160275 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1746096716293 - - 160300 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1722342418259 - - 50550 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -8355840 - null - SOLID - 300 - 100 - 0.0 - -1 - null - - - 1722342418261 - - 200560 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - 1722342719680 - - 50690 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -5952982 - null - SOLID - 720 - 230 - 0.0 - -1 - null - - - 1722342719682 - - 140700 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - - - - - - - - 1709049456135 - - false - - 1709049456141 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089975 - true - 1709107200000 - - - - - - - - - - - 1709049456138 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049456142 - 1709049456136 - - - 1715597286082 - - -74070 - - false - true - true - - - - - - - - - 1715597307038 - - -74090 - - false - true - true - - - - - - - - - 1715597314638 - - -740110 - - false - true - true - - - - - - - - - 1715602425848 - - -730270 - - false - true - true - - - - - - - - - 1715607530949 - - -730290 - - false - true - true - - - - - - - - - 1715607536716 - - -730310 - - false - true - true - - - - - - - - - 1715607544383 - - -730330 - - false - true - true - - - - - - - - - 1715630743924 - - -730250 - - false - true - true - - - - - - 1724947743379 - - -310570 - - false - true - true - - - - - - - - - 1724947743386 - - -310210 - - false - true - true - - - - false - - 1724947743384 - TEXT_BOX - - - NO_DELIMETER - - - - - 1724947743389 - - -310230 - - false - true - true - - - - false - - 1724947743387 - TEXT_BOX - - - NO_DELIMETER - - - - - 1724947743355 - - -310140 - - false - true - true - - - - - - - - - 1724947743357 - - -310160 - - false - true - true - - - - - - - - - 1724947743359 - - -310180 - - false - true - true - - - - - - - - - 1724947743361 - - -310120 - - false - true - true - - - - - - - - - 1724947743365 - - -310300 - - false - true - true - - - - - - - - - - - VOID - - 1709553910991 - - -76050 - - false - true - true - - - VOID - - 1715591908888 - - -760210 - - false - true - true - - - - - - - - VOID - - 1715591980366 - - -740230 - - false - true - true - - - - - - - - VOID - - 1724947743369 - - -290490 - - false - true - true - - - - - - - - VOID - - 1724947743373 - - -310450 - - false - true - true - - - - - - - - VOID - - 1724947743375 - - -290470 - - false - true - true - - - - - - - - VOID - - 1724947743377 - - - -310400 - - false - true - true - - - - - - 1709049456136 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1709049456197 - - 50-100 - - false - true - true - - - - - - - - - - 1709049456142 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1725002991039 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 1920 - 980 - 0.0 - -1 - null - - - 1725002921481 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - - null - SOLID - 370 - 170 - 0.0 - -1 - - null - - - 1709582023151 - - 400280 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532165 - true - 1709625600000 - - - - - - - - - - false - 540 - 400 - - - - 50 - 30 - 460 - 310 - -1 - -16777216 - -12566464 - - - SOUTH - -16777216 - 30 - - - DEFAULT - DEFAULT - -12566464 - - true - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - - - AUTO - true - LINEAR - 100 - - false - MODEL_TIME_UNITS - - - 1715589407937 - - 0170 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - - null - SOLID - 370 - 810 - 0.0 - -1 - - null - - - 1715596728186 - - 70200 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1715597165299 - - 41211 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715596934178 - - -1-1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - null - SOLID - 20 - 40 - 0.0 - -6632142 - - null - - - 1715596882276 - - -10-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - SansSerif - 14 - - - LEFT - - - - - - 1715606650390 - - 190450 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715597606225 - - -170-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1715597606227 - - 62-15 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1715597606229 - - 40-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1715606688952 - - 190280 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715597606231 - - -170-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1715597606233 - - 62-20 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryPower.getValue()*1000; -} - -//Set the text accordingly -t_powerBattery.setText(sl_batteryPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2);]]> - - - - HORIZONTAL - - - - false - - - - 1715597606235 - - 35-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1715606719124 - - 100380 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1715598832030 - - -80-20 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - false - - - - 1715598901188 - - -80-40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - - - - 1715606808711 - - 190490 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715606808713 - - -170-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1715606808715 - - 62-15 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1715606808717 - - 50-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1724859658263 - - 120100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1724859658265 - - -100-60 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - - false - - - - 1724859658267 - - -100-80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 20 - - - LEFT - - - - - - 1724947743345 - - -320540 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724947743347 - - -320270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724947743349 - - -320370 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724947743351 - - -320420 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724947743353 - - -32090 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724948168075 - - 190320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724948168077 - - -170-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1724948168079 - - 62-20 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryCapacity.getValue()*1000; -} - -//Set the text accordingly -t_capacityBattery.setText(sl_batteryCapacity.getValue() + " MWh"); - - -//Set scenario to custom -f_setScenario(2);]]> - - - - HORIZONTAL - - - - false - - - - 1724948168081 - - 35-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1725003063740 - - 76080 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 72 - - - LEFT - - - - - - - - 1725002896440 - - 00 - - false - true - false - <![CDATA[Batter UI]]> - 1920 - 980 - - - - - - - 1708522361862 - - - - false - - 1708522361868 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089974 - true - 1708588800000 - - - - - - - - - - - 1708522361865 - - 10-210 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1708522361869 - 1708522361863 - - - 1708611471928 - - -43050 - - false - true - true - - - - - - - - - 1709554407054 - - -43090 - - false - true - true - - - - - - - - - 1713543883957 - - -430260 - - false - true - true - - - - - - - - - 1713957213075 - - -1060410 - - false - true - true - - - - - - - - - 1713957229701 - - -1060430 - - false - true - true - - - - - - - - - 1713957233827 - - -1060450 - - false - true - true - - - - - - - - - 1713971707023 - - -1060490 - - false - true - true - - - - - - - - - 1713971707027 - - -1060510 - - false - true - true - - - - - - - - - 1713971707029 - - -1060530 - - false - true - true - - - - - - - - - 1714139274247 - - -1050710 - - false - true - true - - - - - - - - - 1714139294087 - - -1050750 - - false - true - true - - - - - - - - - 1714139299844 - - -1050730 - - false - true - true - - - - - - - - - 1714139304156 - - -1050910 - - false - true - true - - - - - - - - - 1714139320416 - - -10501110 - - false - true - true - - - - - - - - - 1714139381294 - - -1050930 - - false - true - true - - - - - - - - - 1714139385293 - - -10501130 - - false - true - true - - - - - - - - - 1714139405729 - - -1050950 - - false - true - true - - - - - - - - - 1714139413565 - - -10501150 - - false - true - true - - - - - - - - - 1714139966993 - - -1050590 - - false - true - true - - - - - - - - - 1714139997786 - - -1050630 - - false - true - true - - - - - - - - - 1714140003906 - - -1050650 - - false - true - true - - - - - - - - - 1714140007855 - - -1050610 - - false - true - true - - - - - - - - - 1714140012482 - - -1050690 - - false - true - true - - - - - - - - - 1714140056511 - - -1050670 - - false - true - true - - - - - - - - - 1714141906262 - - -1050790 - - false - true - true - - - - - - - - - 1714141906264 - - -1050830 - - false - true - true - - - - - - - - - 1714141906266 - - -1050850 - - false - true - true - - - - - - - - - 1714141906268 - - -1050810 - - false - true - true - - - - - - - - - 1714141906270 - - -1050890 - - false - true - true - - - - - - - - - 1714141906272 - - -1050870 - - false - true - true - - - - - - - - - 1714142030261 - - -1050990 - - false - true - true - - - - - - - - - 1714142030263 - - -10501030 - - false - true - true - - - - - - - - - 1714142030265 - - -10501050 - - false - true - true - - - - - - - - - 1714142030267 - - -10501010 - - false - true - true - - - - - - - - - 1714142030269 - - -10501070 - - false - true - true - - - - - - - - - 1714142035660 - - -10501090 - - false - true - true - - - - - - - - - 1725364840518 - - -740130 - - false - true - true - - - - - - 1725373825534 - - -430130 - - false - true - true - - - - - - - - - 1725381531538 - - -430110 - - false - true - true - - - - - - - - - 1725381554846 - - -430150 - - false - true - true - - - - - - - - - 1725382988283 - - -43070 - - false - true - true - - - - - - - - - 1725609978738 - - -430180 - - false - true - true - - - - - - - - - 1725614630564 - - -1060250 - - false - true - true - - - - - - - - - 1725614630566 - - -1060270 - - false - true - true - - - - - - - - - 1725614630568 - - -1060290 - - false - true - true - - - - - - - - - 1725625091022 - - -410700 - - false - true - true - - - - - - - - - 1727798399505 - - -1060330 - - false - true - true - - - - - - - - - 1727798399507 - - -1060350 - - false - true - true - - - - - - - - - 1727798399509 - - -1060370 - - false - true - true - - - - - - - - - 1727872520826 - - -1060230 - - false - true - true - - - - - - 1727883544535 - - -440805 - - false - true - true - - - - - - 1727883574908 - - -440825 - - false - true - true - - - - - - 1727941212434 - - -440785 - - false - true - true - - - - - - 1729686904963 - - -410720 - - false - true - true - - - - - - - - - 1708522385741 - - -74070 - - false - true - true - - - - false - - 1708522385739 - TEXT_BOX - - - NO_DELIMETER - - - - - 1708522412931 - - -74090 - - false - true - true - - - - false - - 1708522412929 - TEXT_BOX - - - NO_DELIMETER - - - - - 1708522430401 - - -740110 - - false - true - true - - - - false - - 1708522430399 - TEXT_BOX - - - NO_DELIMETER - - - - - 1714641936747 - - -74050 - - false - true - true - - - - false - - 1714641936745 - TEXT_BOX - - - NO_DELIMETER - - - - - 1715181661645 - - - -10601170 - - false - true - true - - - - false - - - - - 1715181661643 - TEXT_BOX - - - NO_DELIMETER - - - - - 1709571634348 - - -740210 - - false - true - true - - - - - - - - - 1709571643590 - - -740230 - - false - true - true - - - - - - - - - 1711722238158 - - -740250 - - false - true - true - - - - - - - - - 1713945394048 - - -740310 - - false - true - true - - - - - - - - - 1713947318059 - - -740330 - - false - true - true - - - - - - - - - 1727953980115 - - -10601190 - - false - true - true - - - - ]]> - - - - - - - VOID - - 1713445281785 - - -410410 - - false - true - true - - - - - - - - VOID - - 1713447383903 - - -430370 - - false - true - true - - - - - 0; i-- ){ - GCnr_selection.setValue(i-1, true); - f_setScenarioCurrent(c_ownedGridConnections.get(v_currentSelectedGCnr)); - } - GCnr_selection.setValue(currentSelectedGCnr_local, true); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Current"); - } - break; - - case 1: // Future - for (int i = c_ownedGridConnections.size(); i > 0; i-- ){ - GCnr_selection.setValue(i-1, true); - f_setScenarioFuture(c_ownedGridConnections.get(v_currentSelectedGCnr)); - } - GCnr_selection.setValue(currentSelectedGCnr_local, true); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Future"); - } - break; - - case 2: // Custom - - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - - if(!b_runningMainInterfaceSlider){ - traceln("Selected scenario: Custom"); - } - break; - - default: - -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false;]]> - - - VOID - - 1713447428490 - - -410390 - - false - true - true - - - - - - - - VOID - - 1713537591106 - - -430490 - - false - true - true - - - - - - - - - j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - -//Check heating demand asset is null (shouldnt be possible) -if (heatDemandAsset != null){ - capacityThermal_kW = heatDemandAsset.yearlyDemand_kWh/8760*10; // --> average hourly consumption * 10 --> to always have enough capacity -} -else{ - //Select profile heat demand asset - J_EAProfile heatDemandAsset_Profile = findFirst(GC.c_profileAssets, j_ea->j_ea.energyCarrier == OL_EnergyCarriers.HEAT); - - if(heatDemandAsset_Profile != null){ - capacityThermal_kW = max(heatDemandAsset_Profile.a_energyProfile_kWh)*4; - } - else{ - traceln("No heating demand asset found for GC:" + GC.p_gridConnectionID); - traceln("--> No heating asset created"); - return; - } - -} - - -//Algemeen -double timestep_h = zero_Interface.energyModel.p_timeStep_h; -double efficiency; -double outputTemperature_degC; - -//Heatpump specifieke parameters -double baseTemperature_degC = zero_Interface.energyModel.v_currentAmbientTemperature_degC; -double capacityElectric_kW; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; - - - -//Create selected heating type -switch (selectedHeatingType){ - case GASBURNER: - - //Add primary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW / 3; //-- /3, want is hybride, dus kleiner - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - GC.p_secondaryHeatingAsset = gasBurnerHybrid; - - break; - - case ELECTRIC_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW; - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - - //Add secondary heating asset (if needed??) //E-boiler!!?? - break; - - case HYDROGENBURNER: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHydrogenBurner; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHydrogenBurner_degC; - - //Add primary heating asset (hydrogenburner) - new J_EAConversionHydrogenBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case DISTRICTHEAT: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - - new J_EAConversionHeatDeliverySet(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - //Add GC to heat grid if it exists, else create new one - GC.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(GC.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - GC.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); - } - GC.p_parentNodeHeatID = GC.p_parentNodeHeat.p_gridNodeID; - break; - - case GASFIRED_CHPPEAK: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr + zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureCHP_degC; - double outputCapacityElectric_kW = (capacityThermal_kW/zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr) * zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(GC, outputCapacityElectric_kW, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC ); - - break; -} - -if(!b_runningMainInterfaceSlider){ - zero_Interface.f_updateMainInterfaceSliders(); -}]]> - - - VOID - - 1713537591117 - - -430510 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1713537591121 - - -430570 - - false - true - true - - - - - - - - - p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); - -if (batteryAsset == null && setBatteryCapacity_kWh == 0) { - return; -} -else if (batteryAsset == null) { - GridConnection gc = p_company.f_getOwnedGridConnections().get(v_currentSelectedGCnr); - batteryAsset = new J_EAStorageElectric(gc, 0, 0, 0, zero_Interface.energyModel.p_timeStep_h); -} -double existing_batterypower_capacity_ratio = zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - -if(((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW() != 0){ - existing_batterypower_capacity_ratio = ((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW()/((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh(); -} - -((J_EAStorageElectric)batteryAsset).setCapacityElectric_kW(setBatteryCapacity_kWh*existing_batterypower_capacity_ratio); //Set Power -((J_EAStorageElectric)batteryAsset).setStorageCapacity_kWh(setBatteryCapacity_kWh); //Set storage capacity - -//Add battery algorithm if it is not present -if(GC.p_batteryAlgorithm == null){ - GC.p_batteryAlgorithm = new J_BatteryManagementSelfConsumption(GC); -} -]]> - - - VOID - - 1713954180112 - - -430530 - - false - true - true - - - - - - - - - p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (v_rooftopPV_kWp == 0) { - pvAsset.removeEnergyAsset();; - } - else { - pvAsset.setCapacityElectric_kW(v_rooftopPV_kWp); - } -} -else{ - if (v_rooftopPV_kWp != 0) { - f_addPVAsset(GC, OL_EnergyAssetType.PHOTOVOLTAIC, v_rooftopPV_kWp); - } -} - -if(!b_runningMainInterfaceSlider){ - zero_Interface.f_updateMainInterfaceSliders(); -}]]> - - - VOID - - 1713956765904 - - - -1090170 - - false - true - true - - - - VOID - - 1713961813474 - - -107060 - - false - true - true - - - - VOID - - 1714139629738 - - -1070390 - - false - true - true - - - - VOID - - 1714139648227 - - -1070470 - - false - true - true - - - - VOID - - 1714139684603 - - -1070550 - - false - true - true - - - - VOID - - 1714140108358 - - -1060570 - - false - true - true - Cant filter --> cant get less EV than atm. -v_maxDieselCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; -v_maxHydrogenCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; - -//Set default values -v_nbEVCars = default_nbEVCars; -v_nbDieselCars = default_nbDieselCars; -v_nbHydrogenCars = default_nbHydrogenCars; - -//Set slider knobs -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); -]]> - - - VOID - - 1714140134819 - - -1060770 - - false - true - true - Cant filter --> cant get less EV than atm. -v_maxDieselVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; -v_maxHydrogenVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; - -//Set default values -v_nbEVVans = default_nbEVVans; -v_nbDieselVans = default_nbDieselVans; -v_nbHydrogenVans = default_nbHydrogenVans; - -//Set slider knob -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); -]]> - - - VOID - - 1714140156233 - - -1060970 - - false - true - true - Cant filter --> cant get less EV than atm. -v_maxDieselTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; -v_maxHydrogenTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; - -//Set default values -v_nbEVTrucks = default_nbEVTrucks; -v_nbDieselTrucks = default_nbDieselTrucks; -v_nbHydrogenTrucks = default_nbHydrogenTrucks; - -//Set slider knob -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); -]]> - - - VOID - - 1714410040303 - - -410650 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - VOID - - 1714411599586 - - -430590 - - false - true - true - - - - - - - - - - - - - local_EV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_hydrogen).size(); - while(setAmountOfVehicles > local_EV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - - while ( setAmountOfVehicles > local_EV_nb && local_DieselV_nb > 0) { - - // Find a Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_DieselV_nb--; - } - while (setAmountOfVehicles > local_EV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_EV_nb){ //If still not enough EV: - - // Create additional vehicles - f_createVehicle(GC, vehicleType, null, true, true); - - //Update variables - local_EV_nb++; - } - -} -else if(setAmountOfVehicles < local_EV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList additionalVehicles = new ArrayList(findAll(c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_EV_nb && additionalVehicles.size() > 0){ //If there are additional EV, remove them first - - //Find additional created vehicle - J_EAEV ev = (J_EAEV)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove electric vehicle - additionalVehicles.remove(ev); - c_additionalVehicles.get(GC).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Update variable - local_EV_nb--; - } - while ( setAmountOfVehicles < local_EV_nb && local_DieselV_nb < max_amount_diesel_vehicles) { - - //Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - // Create diesel vehicle - f_createVehicle(GC, vehicleType_diesel, tripTracker, available, false); - - local_EV_nb--; - local_DieselV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case ELECTRIC_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case ELECTRIC_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case ELECTRIC_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - -if(!b_runningMainInterfaceSlider){ - zero_Interface.f_updateMainInterfaceSliders(); -}]]> - - - VOID - - 1714471183392 - - -430630 - - false - true - true - - - - - - - - - - - - - local_DieselV_nb){ // Slider has increased the amount of selected vehicles - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_hydrogen || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_DieselV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_electric); - - if(ev != null){ - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_DieselV_nb && local_EV_nb > min_amount_EV) { - - // Find an EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove one EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - - local_DieselV_nb++; - } -} -else if(setAmountOfVehicles < local_DieselV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList additionalVehicles = new ArrayList(findAll(c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_DieselV_nb && additionalVehicles.size() > 0){ //Remove additional Diesel vehicles first - - //Find additional created vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove diesel vehicle - additionalVehicles.remove(dieselVehicle); - c_additionalVehicles.get(GC).remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Update variable - local_DieselV_nb--; - } - while ( setAmountOfVehicles < local_DieselV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_DieselV_nb--; - local_EV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case DIESEL_VEHICLE: - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - break; - - case DIESEL_VAN: - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - break; - - case DIESEL_TRUCK: - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - break; -} - -if(!b_runningMainInterfaceSlider){ - zero_Interface.f_updateMainInterfaceSliders(); -}]]> - - - VOID - - 1714474430338 - - -430610 - - false - true - true - - - - - - - - - - - - - local_HydrogenV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_HydrogenV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(c_additionalVehicles.get(GC), p -> p.energyAssetType == vehicleType_electric); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - c_additionalVehicles.get(GC).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_HydrogenV_nb && local_DieselV_nb > 0) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - //Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_DieselV_nb--; - - } - while (setAmountOfVehicles > local_HydrogenV_nb && local_EV_nb > min_amount_EV){ - - // Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_HydrogenV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - local_HydrogenV_nb++; - } - - -} -else if(setAmountOfVehicles < local_HydrogenV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList additionalVehicles = new ArrayList(findAll(c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_HydrogenV_nb && additionalVehicles.size() > 0){//Remove additional Hydrogen vehicles first - - //Find additional created vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove hydrogen vehicle - additionalVehicles.remove(hydrogenVehicle); - c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)).remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Update variable - local_HydrogenV_nb--; - } - while ( setAmountOfVehicles < local_HydrogenV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !c_additionalVehicles.get(c_ownedGridConnections.get(v_currentSelectedGCnr)).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV vehicle - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb--; - local_EV_nb++; - } -} - -//Update variables -switch (vehicleType){ - - case HYDROGEN_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case HYDROGEN_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case HYDROGEN_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - -if(!b_runningMainInterfaceSlider){ - zero_Interface.f_updateMainInterfaceSliders(); -}]]> - - - VOID - - 1714654645264 - - -107080 - - false - true - true - - - - VOID - - 1714655282643 - - -109040 - - false - true - true - - - - VOID - - 1714656835269 - - -10501350 - - false - true - true - - - - VOID - - 1715713362876 - - -1070190 - - false - true - true - - - - VOID - - 1715952034311 - - -410550 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1717576974529 - - - -430280 - - false - true - true - - - - VOID - - 1725439625846 - - -400300 - - false - true - true - consumptionAsset.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); -if (consumptionEAHEAT != null){ - currentHeatSavings = roundToInt((consumptionEAHEAT.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAHEAT = findFirst(c_ownedGridConnections.get(v_currentSelectedGCnr).c_profileAssets, profileAsset -> profileAsset.profileType == OL_ProfileAssetType.HEATDEMAND); - if (profileEAHEAT != null){ - currentHeatSavings = roundToInt((profileEAHEAT.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current electricity savings percentage -int currentElectricitySavings = 0; - -J_EAConsumption consumptionEAELECTRIC = findFirst(c_ownedGridConnections.get(v_currentSelectedGCnr).c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND); -if (consumptionEAELECTRIC != null){ - currentElectricitySavings = roundToInt((consumptionEAELECTRIC.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAELECTRIC = findFirst(c_ownedGridConnections.get(v_currentSelectedGCnr).c_profileAssets, profileAsset -> profileAsset.profileType == OL_ProfileAssetType.ELECTRICITYBASELOAD); - if (profileEAELECTRIC != null){ - currentElectricitySavings = roundToInt((profileEAELECTRIC.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current Connection capacity (delivery) -int GCContractCapacityCurrent_Delivery = roundToInt(c_ownedGridConnections.get(v_currentSelectedGCnr).v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - -//Find the current Connection capacity (feedin) -int GCContractCapacityCurrent_Feedin = roundToInt(c_ownedGridConnections.get(v_currentSelectedGCnr).v_liveConnectionMetaData.contractedFeedinCapacity_kW); - -//Set the nfato values -f_getNFATOValues(); - -//Find the current battery capacity -int BatteryCapacityCurrent = 0; -J_EAStorage batteryAsset = findFirst(c_ownedGridConnections.get(v_currentSelectedGCnr).c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); -if (batteryAsset != null){ - BatteryCapacityCurrent = roundToInt(((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh()); -} - -//Find the current PV capacity -int PVCapacityCurrent = 0; -if (c_ownedGridConnections.get(v_currentSelectedGCnr).v_liveAssetsMetaData.hasPV){ - J_EAProduction pvAsset = findFirst(c_ownedGridConnections.get(v_currentSelectedGCnr).c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - PVCapacityCurrent = roundToInt(pvAsset.getCapacityElectric_kW()); -} - -//Find the current curtailment setting -boolean currentCurtailmentSetting = c_ownedGridConnections.get(v_currentSelectedGCnr).v_enableCurtailment; - -//Find the current transport savings -int currentTransportSavings = 0; -if (c_ownedGridConnections.get(v_currentSelectedGCnr).c_tripTrackers.size() > 0){ - currentTransportSavings = - roundToInt(c_ownedGridConnections.get(v_currentSelectedGCnr).c_tripTrackers.get(0).getDistanceScaling_fr()*100) + 100; -} - - -//Find the current number of vehicles for each type -int nbEcarsCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); -int nbHydrogencarsCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); -int nbDieselcarsCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); - -int nbEvansCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); -int nbHydrogenvansCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); -int nbDieselvansCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); - -int nbEtrucksCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); -int nbHydrogentrucksCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); -int nbDieseltrucksCurrent = count(c_ownedGridConnections.get(v_currentSelectedGCnr).c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - -//Check on electric cars, cause for companies that have quarterlyhour electricity data, the initial ea for EV (and other electric appliances) are not made. -if (c_ownedGridConnections.get(v_currentSelectedGCnr).v_hasQuarterHourlyValues){ - - nbEcarsCurrent += v_minEVCarSlider; - nbEvansCurrent += v_minEVVanSlider; - nbEtrucksCurrent += v_minEVTruckSlider; -} - - -////Set slider knobs at the currently (!) correct points - -//heating -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, false); - -//Heat savings -sl_heatDemandCompanyReduction.setValue(currentHeatSavings, false); - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(currentElectricitySavings, false); - -//Contract connection capacity (delivery) -sl_GCCapacityCompany.setValue(GCContractCapacityCurrent_Delivery, false); -v_defaultGCCapacitySlider = GCContractCapacityCurrent_Delivery; - -//Contract connection capacity (feedin) -sl_GCCapacityCompany_Feedin.setValue(GCContractCapacityCurrent_Feedin, false); -v_defaultGCCapacitySlider_Feedin = GCContractCapacityCurrent_Feedin; - -//Battery capacity -sl_batteryCompany.setValue(BatteryCapacityCurrent, false); -v_defaultBatSlider = BatteryCapacityCurrent; - -//Solar panel power -sl_rooftopPVCompany.setValue(PVCapacityCurrent, false); -v_defaultPVSlider = PVCapacityCurrent; - -//Curtailment setting -cb_curtailmentCompany.setSelected(currentCurtailmentSetting, false); - - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(currentTransportSavings, false); - -//Cars -sl_electricCarsCompany.setValue(nbEcarsCurrent, false); -sl_hydrogenCarsCompany.setValue(nbHydrogencarsCurrent, false); -sl_dieselCarsCompany.setValue(nbDieselcarsCurrent, false); - -v_nbEVCars = nbEcarsCurrent; -v_nbHydrogenCars = nbHydrogencarsCurrent; -v_nbDieselCars = nbDieselcarsCurrent; - - -//Vans -sl_electricVansCompany.setValue(nbEvansCurrent, false); -sl_hydrogenVansCompany.setValue(nbHydrogenvansCurrent, false); -sl_dieselVansCompany.setValue(nbDieselvansCurrent, false); - -v_nbEVVans = nbEvansCurrent; -v_nbHydrogenVans = nbHydrogenvansCurrent; -v_nbDieselVans = nbDieselvansCurrent; - - -//Trucks -sl_electricTrucksCompany.setValue(nbEtrucksCurrent, false); -sl_hydrogenTrucksCompany.setValue(nbHydrogentrucksCurrent, false); -sl_dieselTrucksCompany.setValue(nbDieseltrucksCurrent, false); - -v_nbEVTrucks = nbEtrucksCurrent; -v_nbHydrogenTrucks = nbHydrogentrucksCurrent; -v_nbDieselTrucks = nbDieseltrucksCurrent; - -//Add nfato again -c_ownedGridConnections.get(v_currentSelectedGCnr).f_nfatoSetConnectionCapacity(false); - -]]> - - - VOID - - 1725439635605 - - -400320 - - false - true - true - - - - VOID - - 1725607045331 - - -430680 - - false - true - true - - - - VOID - - 1725614403909 - - -1070210 - - false - true - true - - - - VOID - - 1727712593952 - - -1070100 - - false - true - true - 24){ - while(24+i != nameLength){ - - t_companyName.setScale(0.9); - i++; - } -} -//Works for now: Possible to make it more accurate using getFontMetrics package and comparing width of text with the name text box width. -//--> Not done for now, as it feels unnecessary.]]> - - - VOID - - 1727798399503 - - -1070310 - - false - true - true - - - - VOID - - 1727884380899 - - -440765 - - false - true - true - 0){ - t_GCCapacityCompany_delivery_nfato.setColor(green); -} -else if(v_NFATO_kW_delivery < 0){ - t_GCCapacityCompany_delivery_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_delivery_nfato.setColor(black); -} - -if(v_NFATO_kW_feedin > 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(green); -} -else if(v_NFATO_kW_feedin < 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_Feedin_nfato.setColor(black); -} -]]> - - - VOID - - 1729515671654 - - -1070120 - - false - true - true - - - - - - - - VOID - - 1747316158336 - - 55401110 - - false - true - true - - - - - p = zero_Interface.v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true);]]> - - - - - 1708522361863 - - true - 20-160 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1708522362017 - - 20-120 - - false - true - true - - - - - - - - - 1714652079023 - - -10501330 - - false - true - true - 1714652081119 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089973 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - - - 1708522361869 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1708612468547 - - -1160-400 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 4560 - 1800 - 0.0 - -1 - null - - - 1708522459040 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 1920 - 980 - 0.0 - -1 - - null - - - 1713446065829 - - 0140 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 360 - 840 - 0.0 - -1 - - null - - - 1708611929678 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 360 - 140 - 0.0 - -1 - - null - - - 1708611713278 - - -44020 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1708611755978 - - -75020 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1709571615104 - - -750180 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - false - 1711555257574 - - 180-80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1713447348497 - - 140100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1713447230459 - - -100-60 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 0 && c_scenarioSettings_Future.size() > 0){ - f_setScenario(rb_scenariosPrivateUI.getValue()); -} - -// Simulate Year button on Interface -zero_Interface.f_resetSettings();]]> - - - - - VERTICAL - - - - false - - - - 1713447252716 - - -100-80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 20 - - - LEFT - - - - - - 1713537625797 - - -440340 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1713957149840 - - -1100140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1713957196998 - - -440460 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - false - 1714641703973 - - 360-80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - false - 1714641782724 - - 0-80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1714655090415 - - -110010 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1714660279044 - - -10601300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1715626747942 - - 310445 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1713446221121 - - -240-270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1713446658919 - - -856 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446658921 - - -581 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1713446658933 - - -2906 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446065831 - - -120-106 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1713446065865 - - 62-130 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1713446065869 - - -170-125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446065871 - - 35-125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - - - - 1713446065985 - - -240-68 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1713446438059 - - -240166 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1713446065961 - - -85-24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446065963 - - -58-29 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1713446065965 - - -290-24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713447888398 - - -120360 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1713446839189 - - 62-3 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbEVVans - - - - 1713446839191 - - -1700 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446839193 - - 350 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446839195 - - 6222 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbHydrogenVans - - - - 1713446839197 - - -17025 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446839199 - - 3525 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446839201 - - 6247 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbDieselVans - - - - 1713446839203 - - -17050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446839205 - - 3550 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713446839207 - - -170-25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446857516 - - 35145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713446857518 - - 35120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713446857520 - - -170120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446857522 - - -170145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446857524 - - -17095 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446857528 - - -17070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1713446857530 - - 62117 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbHydrogenTrucks - - - - 1713446857532 - - 3595 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446857534 - - 6292 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbEVTrucks - - - - false - 1713446857526 - - 62142 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbDieselTrucks - - - - false - 1713446065901 - - 62-103 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbEVCars - - - - 1713446065907 - - -170-100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446065909 - - 35-100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713446065917 - - -170-155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1713446065919 - - 62-160 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - tt.distanceScaling_fr = 1-sl_mobilityDemandCompanyReduction.getValue()/100); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen();]]> - - - - HORIZONTAL - - - - false - - - - 1713446065921 - - 35-155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446065923 - - 62-78 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbHydrogenCars - - - - 1713446065925 - - -170-75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446065927 - - 35-75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1713446065933 - - 62-54 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - v_nbDieselCars - - - - 1713446065935 - - -170-50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1713446065937 - - 35-50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713446065939 - - -170-125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - - - - 1713547081193 - - -60-290 - - true - true - false - SHAPE_DRAW_2D3D - 1 && c_ownedGridConnections.get(0).v_isActive && c_ownedGridConnections.get(1).v_isActive]]> - false - 0 - 0.0 - - - - false - 1713544148158 - - 50-10 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - 1){ - f_setSelectedGC(); -}]]> - - - - false - - - true - v_currentSelectedGCnr - - - - 1713547027389 - - -119-8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - - - - false - 1713963799790 - - -5861 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1713963799825 - - -8566 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - 1713963799827 - - -29066 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1715084970828 - - 280-100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715084970830 - - -56042 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715084970832 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1715084970834 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - 1715084970836 - - -560-160 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715084970838 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1715084970840 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - 1715084970842 - - -560276 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1715084970844 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1715084970846 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - - - - false - 1715093089631 - - -290-206 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - - - - false - - - - 1725618990626 - - -8596 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1725618990628 - - -5891 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1725618990630 - - -29096 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - 1727796446739 - - -8536 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - RIGHT - - - false - 1727796446741 - - -5831 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1727796446743 - - -29036 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - - - - false - 1708523022017 - - 167020 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1717514421993 - - -440230 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1725365029204 - - 114080 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725366551214 - - -298-59.512 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 596 - 119.024 - 0.0 - -1 - null - 10 - - - 1708611721668 - - 0-46.34 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 48 - - - CENTER - - - 1708611716618 - - 023.17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 20 - - - CENTER - - - - - - 1714652081119 - - 380220 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - 1725381132369 - - 37060 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 470 - 110 - 0.0 - -1 - null - - - 1725381214835 - - 845270 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 2495 - 700 - 0.0 - -1 - null - - - 1725382426671 - - 610200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725381345763 - - -230-30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 460 - 50 - 0.0 - -1 - - null - - - 1725382366046 - - 0-20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - - - - 1725382459577 - - 1140200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725382459579 - - -230-30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 460 - 50 - 0.0 - -1 - - null - - - 1725382459581 - - 0-20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - - - - 1725382464651 - - 1670200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725382464653 - - -230-30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 460 - 50 - 0.0 - -1 - - null - - - 1725382464655 - - 0-20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - - - - 1725606178083 - - 1375540 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725608394737 - - true - -995-320 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 2 - - -369756683 - - null - SOLID - 530 - 45 - 0.0 - -369756683 - - null - - - 1725606178085 - - -535-320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -6943 - - null - SOLID - 1060 - 750 - 0.0 - -1 - - null - - - 1725606178087 - - -3540 - - true - true - false - SHAPE_DRAW_2D3D - { - zero_Interface.energyModel.f_runRapidSimulation(); - zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); - f_setSelectedGCGraphs(); - gr_loadIcon.setVisible(false); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Update results up to date boolean - uI_Results.f_enableNonLivePlotRadioButtons(true); - zero_Interface.b_resultsUpToDate = true; - zero_Interface.gr_simulateYearScreenSmall.setVisible(false); - zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); - -}).start(); - - - -]]> - false - 0 - 0.0 - - - - 1725606178089 - - -140-40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 28 - - - CENTER - - - 1725606178091 - - -420-70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - - - - - false - - - - - - - - - 1725606178111 - - 2360280 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725606813428 - - true - -1980-60 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 2 - - -369756683 - - null - SOLID - 530 - 45 - 0.0 - -369756683 - - null - - - 1725606178113 - - -1520-60.969 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -369756683 - - null - SOLID - 1060 - 750.969 - 0.0 - -369756683 - - null - - - 1729516584700 - - -1980-60 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 2 - - -6943 - - null - SOLID - 460 - 750 - 0.0 - -1 - - null - - - 1725606744485 - - -1220280 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1725606744487 - - -27.610999999999876-5.4780000000000655 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 61.016 - 60.969 - 0.0 - - - - - - - false - - - 1725606744489 - - 2.8969999999999345-55.96199999999999 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 28 - - - CENTER - - - - - - - - - 1727797637172 - - 20571 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1727797637174 - - 291564 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - false - - - - 1727883464770 - - -450740 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1727939194812 - - 56580 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1727939194814 - - -185-60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 380 - 120 - 0.0 - -1 - null - - - 1727939194816 - - -178-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - LEFT - - - 1727939194818 - - -175-17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1727939194820 - - -1758 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1727939194822 - - -17533 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1727939194824 - - 1528 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1727939194826 - - 15233 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1727939194828 - - 152-17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1727939194830 - - 41-60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1727939194832 - - 152-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - CENTER - - - 1727939194834 - - -185-25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - 380 - 0 - 0 - - - 1727939206993 - - 2250 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1727939206995 - - -30-60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 65 - 120 - 0.0 - -1 - null - - - 1727939206997 - - 3-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - CENTER - - - 1727939206999 - - 0.58 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1727939207001 - - 0.533 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1727939207003 - - 0.5-17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - CENTER - - - 1727939207005 - - -30-25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - 65 - 0 - 0 - - - - - - 1744645098225 - - 109-60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1744645140831 - - 75-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - CENTER - - - 1744645285983 - - 758 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1744645285985 - - 7533 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - 1744645285987 - - 75-17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Dialog - 14 - - - CENTER - - - - - - 1729511748859 - - true - 4480920 - - true - false - false - true - SHAPE_DRAW_2D3D - - - - false - 0 - 0.0 - - - - 1729511748861 - - -995-320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -369756683 - - null - SOLID - 530 - 740 - 0.0 - -369756683 - - null - - - 1729511748863 - - -535-320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - -6943 - - null - SOLID - 1060 - 740 - 0.0 - -1 - - null - - - 1729511748865 - - -3540 - - true - true - false - SHAPE_DRAW_2D3D - { - //Save previous totals - zero_Interface.f_updatePreviousTotalsGC(); - - zero_Interface.energyModel.f_runRapidSimulation(); - zero_Interface.f_updateUIresultsMainArea(); - f_setSelectedGCGraphs(); - gr_loadIcon.setVisible(false); - - //Update and show kpi summary chart after run - //uI_Results.chartKPISummary.f_setKPISummaryChart(); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - -}).start(); - - -//Update results up to date boolean -zero_Interface.b_resultsUpToDate = true; -]]> - false - 0 - 0.0 - - - - 1729511748867 - - -140-80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 28 - - - CENTER - - - 1729511748869 - - -420-70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - - - - - false - - - - - - 1729511999717 - - -235-230 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 72 - - - CENTER - - - - - - false - 1740047018374 - - 1450130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - false - - - - 1747234551900 - - 150350 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1747234424173 - - -140-15 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - - null - - - 1747234398590 - - -140-15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - -1 - - null - - - - - - 1747316158314 - - 6480600 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1747316158316 - - -960-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1747316158318 - - -960-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -2049715245 - - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - - null - - - 1747326072959 - - -270-120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1747316158322 - - 0-70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - 1747316158324 - - 050 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1747316158326 - - -60-20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1747316158328 - - 0-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - - - - - - - - - - - - 1708523262441 - - 00 - - false - true - false - <![CDATA[company UI]]> - 1920 - 980 - - - - - - - 1717506309790 - - false - - 1717506309785 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089972 - true - 1709107200000 - - - - - - - - - - - 1717506309786 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1717506309821 - 1717506309867 - - - 1717506309811 - - -930270 - - false - true - true - - - - - - - - - 1717506309813 - - -930290 - - false - true - true - - - - - - - - - 1717506309815 - - -930310 - - false - true - true - - - - - - - - - 1717506309817 - - -930330 - - false - true - true - - - - - - - - - 1717506309819 - - -930250 - - false - true - true - - - - - - 1724859028571 - - -94070 - - false - true - true - - - - - - - - - 1724859028735 - - -94090 - - false - true - true - - - - - - - - - 1724859028737 - - -940110 - - false - true - true - - - - - - - - - 1724860189446 - - -360510 - - false - true - true - - - - - - - - - 1724944015553 - - -360530 - - false - true - true - - - - - - - - - 1724944025798 - - -360550 - - false - true - true - - - - - - - - - 1724921941090 - - -360150 - - false - true - true - - - - false - - 1724921941088 - TEXT_BOX - - - NO_DELIMETER - - - - - 1724921946872 - - -360170 - - false - true - true - - - - false - - 1724921946870 - TEXT_BOX - - - NO_DELIMETER - - - - - 1724859404446 - - -36080 - - false - true - true - - - - - - - - - 1724859404449 - - -360100 - - false - true - true - - - - - - - - - 1724859404455 - - -360120 - - false - true - true - - - - - - - - - 1724943470087 - - -36060 - - false - true - true - - - - - - - - - 1724943620236 - - -360260 - - false - true - true - - - - - - - - - 1724943636670 - - -360240 - - false - true - true - - - - - - - - - 1724943685107 - - -360280 - - false - true - true - - - - - - - - - - - VOID - - 1717506309797 - - -96050 - - false - true - true - - - VOID - - 1717506309801 - - -960210 - - false - true - true - - - - - - - - VOID - - 1717506309803 - - -940230 - - false - true - true - - - - - - - - VOID - - 1724859526072 - - -340430 - - false - true - true - - - - - - - - VOID - - 1724859526076 - - -360390 - - false - true - true - - - - - - - - VOID - - 1724859526078 - - -340410 - - false - true - true - - - - - - - - VOID - - 1724859526080 - - - -360340 - - false - true - true - - - - - - 1717506309867 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1717506328385 - - 50-100 - - false - true - true - - - - - - - - - - 1717506309821 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1725003123558 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - - null - SOLID - 1920 - 980 - 0.0 - -1 - - null - - - 1724944453528 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - - null - SOLID - 370 - 170 - 0.0 - -1 - - null - - - 1717506309825 - - 400280 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532514 - true - 1709625600000 - - - - - - - - - - false - 540 - 400 - - - - 50 - 30 - 460 - 310 - -1 - -16777216 - -12566464 - - - SOUTH - -16777216 - 30 - - - DEFAULT - DEFAULT - -12566464 - - true - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - - - AUTO - true - LINEAR - 100 - - false - MODEL_TIME_UNITS - - - 1717506309827 - - 0170 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - - null - SOLID - 370 - 810 - 0.0 - -1 - - null - - - 1717506309829 - - 70200 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1717506309831 - - 41211 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1717506309833 - - -1-1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - null - SOLID - 20 - 40 - 0.0 - -14774017 - - null - - - 1717506309835 - - -10-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - SansSerif - 14 - - - LEFT - - - - - - 1717506309837 - - 190410 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1717506309839 - - -170-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1717506309841 - - 62-15 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1717506309843 - - 40-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1717506309845 - - 190280 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1717506309847 - - -170-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1717506309849 - - 62-20 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - 2000){ - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_electrolyserPower.getValue()*1000; -} - -//Set the text accordingly -t_powerElectrolyser.setText(sl_electrolyserPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2); -]]> - - - - HORIZONTAL - - - - false - - - - 1717506309851 - - 35-15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1717506309853 - - 100340 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1717506309855 - - -80-20 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - false - - - - 1717506309857 - - -80-40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - - - - 1717506309859 - - 190450 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1717506309861 - - -170-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - LEFT - - - false - 1717506309863 - - 62-15 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - - - - - HORIZONTAL - - - - false - - - - 1717506309865 - - 50-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Dialog - 14 - - - RIGHT - - - - - - 1724859404444 - - -37030 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724859526068 - - -370360 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724859526070 - - -370310 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724859673741 - - 130100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1724859673743 - - -100-60 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - - false - - - - 1724859673745 - - -100-80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 20 - - - LEFT - - - - - - 1724943713523 - - -370210 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1724944232372 - - 72513 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1724944232376 - - 43524 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724944232378 - - -1-1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - null - SOLID - 20 - 40 - 0.0 - -14774017 - - null - - - 1724944232380 - - -10-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - SansSerif - 14 - - - LEFT - - - - - - 1724944302875 - - 69739 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 22 - - - LEFT - - - 1724944302879 - - 40750 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724944302881 - - -1-1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - - null - SOLID - 20 - 40 - 0.0 - -14774017 - - null - - - 1724944302883 - - -10-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - SansSerif - 14 - - - LEFT - - - - - - 1724947265014 - - -370480 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1725003108502 - - 77070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - Calibri - 72 - - - LEFT - - - - - - - - 1725002833718 - - 00 - - false - true - false - <![CDATA[Hydrogen UI]]> - 1920 - 980 - - - - - - - 1722245292185 - - - false - - 1722245292191 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089971 - true - 1722326400000 - - - - - - - - - - - 1722245292188 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722245292192 - 1722245292186 - - - 1722245555993 - - 25040 - - false - true - true - - - - - - - - - 1746099651858 - - 250130 - - false - true - true - - - - - - - - - 1746099651890 - - 250150 - - false - true - true - - - - - - - - - - - VOID - - 1722245473562 - - 25070 - - false - true - true - - - - VOID - - 1722259092945 - - 250100 - - false - true - true - - - - - - - - - - 1722245292186 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1722252542602 - - 50-100 - - false - true - true - - - - - - - - - 1722245482640 - - 5080 - - false - true - true - 1744964660761 - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089970 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1722245482641 - - 5040 - - false - true - true - 1744964655611 - - - - - - - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089969 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1722253113248 - - 5060 - - false - true - true - 1744964658364 - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089968 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1722253478328 - - 50100 - - false - true - true - 1744964663750 - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089967 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - - - 1722245292192 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1722248369298 - - 200580 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1722248369300 - - -125-25 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722248369302 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1722248369304 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - 1722248369306 - - -40-25 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722248369308 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1722248369310 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - 1722248369312 - - 45-25 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722248369314 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1722248369316 - - -14-12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - - - - - false - - - - - - 1722248369318 - - 130-25 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1722248369320 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -3736634 - null - - - 1722248369322 - - -10-7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 20 - -2 - 0 - - - 1722248369324 - - -66 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 16 - -15 - 0 - - - 1722248369326 - - -10-4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 18 - 15 - 0 - - - 1722248369328 - - -11-6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369330 - - -88 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369332 - - 810 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - DOTTED - 1 - 0 - 1 - 0 - 1 - -17 - 0 - - - 1722248369334 - - 810 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369336 - - 10-9 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - - - - 1722248369338 - - -12510 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 12 - - - CENTER - - - 1722248369340 - - -4010 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 12 - - - CENTER - - - 1722248369342 - - 4510 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 12 - - - CENTER - - - 1722248369344 - - 13010 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 12 - - - CENTER - - - - - - 1744964727616 - - 15630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1744964655611 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - - 1744964732289 - - 15630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1744964658364 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - - 1744964737688 - - 15630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1744964663750 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - - 1744964742286 - - 15630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1744964660761 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - - - - - - - - - 1658477103140 - - - - false - - 1658477103138 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - GIS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - false - 1658477089966 - true - 1658563200000 - - - - - - - - - - - 1658477103136 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1658477103139 - 1658477103135 - - - 1663238634515 - - -240890 - - false - true - true - - - - - - - - - 1696837759932 - - 3951100 - - false - true - true - - - - - - - - - 1696837759935 - - 3951060 - - false - true - true - - - - - - - - - 1696837759938 - - 3951120 - - false - true - true - - - - - - - - - 1696837759945 - - true - 3951165 - - false - true - true - - - - - - - - - 1696837759948 - - true - 3951185 - - false - true - true - - - - - - - - - 1696837759950 - - true - 3951205 - - false - true - true - - - - - - - - - 1696837759953 - - true - 3951225 - - false - true - true - - - - - - - - - 1696837759955 - - true - 3951245 - - false - true - true - - - - - - - - - 1696837759958 - - true - 3951265 - - false - true - true - - - - - - - - - 1696837759961 - - true - 3951305 - - false - true - true - - - - - - - - - 1696837759963 - - true - 3951285 - - false - true - true - - - - - - - - - 1696837759966 - - 3951080 - - false - true - true - - - - - - - - - 1696863329269 - - 501520 - - false - true - true - - - - - - - - - 1701164360663 - - -240920 - - false - true - true - - - - - - 1701879001472 - - 501540 - - false - true - true - - - - - - - - - 1701879014361 - - 501560 - - false - true - true - - - - - - - - - 1702041370471 - - 13101230 - - false - true - true - - - - - - - - - 1702043349202 - - 6901060 - - false - true - true - - - - - - - - - 1702043408687 - - 6901110 - - false - true - true - - - - - - - - - 1702043479414 - - 6901160 - - false - true - true - - - - - - - - - 1702043554935 - - 6901210 - - false - true - true - - - - - - - - - 1702046920293 - - 501580 - - false - true - true - - - - - - - - - 1704450852556 - - 6901310 - - false - true - true - - - - - - - - - 1704463271534 - - 4101360 - - false - true - true - - - - - - - - - 1704463281781 - - 4101380 - - false - true - true - - - - - - - - - 1705663820237 - - 10301060 - - false - true - true - - - - - - - - - 1705663820239 - - 10301080 - - false - true - true - - - - - - - - - 1705664070254 - - 6901330 - - false - true - true - - - - - - - - - 1705664575869 - - 6901445 - - false - true - true - - - - - - - - - 1705664587285 - - 6901490 - - false - true - true - - - - - - - - - 1705668042403 - - 13101210 - - false - true - true - - - - - - - - - 1705668569794 - - 6901465 - - false - true - true - - - - - - - - - 1705668590932 - - 6901510 - - false - true - true - - - - - - - - - 1705673181898 - - 501420 - - false - true - true - - - - - - 1705673647104 - - 501390 - - false - true - true - - - - - - 1705673714784 - - 501440 - - false - true - true - - - - - - 1705967311665 - - 13101250 - - false - true - true - - - - - - - - - 1705967344378 - - true - 13101270 - - false - true - true - - - - - - - - - 1705967344381 - - true - 13101290 - - false - true - true - - - - - - - - - 1706003981173 - - 13121060 - - false - true - true - - - - - - - - - 1706003981175 - - 13121120 - - false - true - true - - - - - - - - - 1706892713276 - - -280250 - - false - true - true - - - - - - 1706990909665 - - 13121100 - - false - true - true - - - - - - - - - 1706990958029 - - 13121080 - - false - true - true - - - - - - - - - 1707918668189 - - 501370 - - false - true - true - - - - - - 1708597346305 - - 501340 - - false - true - true - - - - - - - - - 1709803708318 - - 4101400 - - false - true - true - - - - - - - - - 1710162245199 - - 6901400 - - false - true - true - - - - - - - - - 1710162245201 - - 6901420 - - false - true - true - - - - - - - - - 1710166484674 - - 6901355 - - false - true - true - - - - - - - - - 1710166484676 - - 6901375 - - false - true - true - - - - - - - - - 1714137967101 - - 10301220 - - false - true - true - - - - - - - - - 1714137970406 - - 10301240 - - false - true - true - - - - - - - - - 1714137978358 - - 10301415 - - false - true - true - - - - - - - - - 1714137980262 - - 10301435 - - false - true - true - - - - - - - - - 1714137982277 - - 10301460 - - false - true - true - - - - - - - - - 1714137984157 - - 10301480 - - false - true - true - - - - - - - - - 1718264413499 - - 3951145 - - false - true - true - - - - - - - - - 1718567214780 - - 10301600 - - false - true - true - - - - - - - - - 1719311576065 - - 6901580 - - false - true - true - - - - - - - - - 1719311576067 - - 6901600 - - false - true - true - - - - - - - - - 1719830571563 - - 1240-260 - - false - false - true - - - - - - 1719830581855 - - 1240-240 - - false - false - true - - - - - - 1719830591551 - - 1240-220 - - false - false - true - - - - - - 1720905248678 - - 940-130 - - false - true - true - - - - - - - - - 1720905365617 - - 940-110 - - false - true - true - - - - - - - - - 1721652532124 - - 6901080 - - false - true - true - - - - - - - - - 1721652543732 - - 6901130 - - false - true - true - - - - - - - - - 1721652554195 - - 6901180 - - false - true - true - - - - - - - - - 1721652564323 - - 6901230 - - false - true - true - - - - - - 1721729327873 - - 6901630 - - false - true - true - - - - - - - - - 1721729331151 - - 6901650 - - false - true - true - - - - - - - - - 1721996776514 - - 10301150 - - false - true - true - - - - - - - - - 1721996776516 - - 10301170 - - false - true - true - - - - - - - - - 1721998215865 - - 10301100 - - false - true - true - - - - - - - - - 1721998236233 - - 10301190 - - false - true - true - - - - - - - - - 1721998240384 - - 10301260 - - false - true - true - - - - - - - - - 1725018118872 - - 501620 - - false - true - true - - - - - - - - - 1726752465730 - - true - 6901530 - - false - true - true - - - - - - - - - 1726752465732 - - true - 6901550 - - false - true - true - - - - - - - - - 1728404379677 - - 6901280 - - false - true - true - - - - - - - - - 1731425176471 - - -670811 - - false - true - true - - - - - - - - - 1732027307811 - - -670791 - - false - true - true - - - - - - - - - 1734617425109 - - -630530 - - false - true - true - - - - - - - - - 1736425024539 - - true - 702180 - - false - true - true - - - - - - 1736425024541 - - true - 702200 - - false - true - true - - - - - - 1736425024543 - - - true - 802100 - - false - true - true - - ]]> - - ();]]> - - - - - 1739980192808 - - 501290 - - false - true - true - - - - - - 1742298194173 - - 140-860 - - false - true - true - - - - - - - - - 1743092928263 - - -1410480 - - false - true - true - - - - - - - - - 1743666440153 - - true - -1880150 - - false - true - true - - - - - - 1744205147072 - - -190080 - - false - true - true - - - - - - - - - 1750086295616 - - 6901760 - - false - true - true - - - - - - - - - 1750086307414 - - 6901780 - - false - true - true - - - - - - - - - 1750089169786 - - 6901720 - - false - true - true - - - - - - - - - 1750089169788 - - 6901740 - - false - true - true - - - - - - - - - 1750089171472 - - 6901680 - - false - true - true - - - - - - - - - 1750089171474 - - 6901700 - - false - true - true - - - - - - - - - 1750165528617 - - 13901520 - - false - true - true - - - - - - 1750777761770 - - 10301120 - - false - true - true - - - - - - - - - 1752836273466 - - 10301390 - - false - true - true - - - - - - - - - 1752836375624 - - 10301370 - - false - true - true - - - - - - - - - 1752837181466 - - 10301290 - - false - true - true - - - - - - - - - 1752837181468 - - 10301310 - - false - true - true - - - - - - - - - 1752837181470 - - 10301330 - - false - true - true - - - - - - - - - 1753105667219 - - 19201495 - - false - true - true - - - - - - 1753110308594 - - -630550 - - false - true - true - - - - - - - - - 1753115730758 - - 10301510 - - false - true - true - - - - - - - - - 1753115736678 - - 10301530 - - false - true - true - - - - - - - - - 1715858732720 - - -240950 - - false - true - true - - - - false - - 1715858732718 - TEXT_BOX - - - NO_DELIMETER - - - - - 1715867611441 - - -670100 - - false - true - true - - - - false - - 1715867611439 - TEXT_BOX - - - NO_DELIMETER - - - - - 1715867648777 - - -670120 - - false - true - true - - - - false - - 1715867648775 - TEXT_BOX - - - NO_DELIMETER - - - - - 1724757837316 - - -67080 - - false - true - true - - - - false - - 1724757837314 - TEXT_BOX - - - NO_DELIMETER - - - - - 1727251571552 - - -670160 - - false - false - true - - - - false - - 1727251571550 - - TEXT_BOX - - - NO_DELIMETER - - - - - 1728030131094 - - -670140 - - false - true - true - - - - false - - 1728030131092 - TEXT_BOX - - - NO_DELIMETER - - - - - 1746106585457 - - -1880170 - - false - true - true - - ]]> - - false - - ()]]> - - - 1746106585455 - TEXT_BOX - - - NO_DELIMETER - - - - - 1744987127500 - - -555-440 - - false - true - true - - - - false - - - - - 1744987127498 - TEXT_BOX - - - NO_DELIMETER - - - - - 1745937830300 - - -670890 - - false - true - true - - - - false - - - - - 1745937830298 - TEXT_BOX - - - NO_DELIMETER - - - - - 1707918668148 - - -280230 - - false - true - true - - - - - - - - - 1709552799968 - - -240480 - - false - true - true - - - - - - - - - 1713429665418 - - -280340 - - false - true - true - - - - - - - - - 1713874283959 - - -280320 - - false - true - true - - - - - - - - - 1715178022675 - - 68-530 - - false - true - true - - - - - - - - - 1715183417595 - - 68-505 - - false - true - true - - - - - - - - - 1715183423011 - - 68-580 - - false - true - true - - - - - - - - - 1719176257019 - - 68-485 - - false - true - true - - - - - - - - - 1720376141906 - - true - 70-320 - - false - true - true - - - - - - - - - 1720376165741 - - true - 70-300 - - false - true - true - - - - - - - - - 1720376624239 - - true - 70-340 - - false - true - true - - - - - - - - - 1722344496313 - - -280210 - - false - true - true - - - - - - - - - 1721302080638 - - 501260 - - false - true - true - - - - - - - - - 1725276677836 - - -280170 - - false - true - true - - - - - - - - - 1725276688077 - - -280190 - - false - true - true - - - - - - - - - 1734442668540 - - -143080 - - false - true - true - - - - - - - - - 1734512815255 - - 501490 - - false - true - true - - - - - - - - - 1734513139372 - - 501470 - - false - true - true - - - - - - - - - 1742226708562 - - -1410455 - - false - true - true - - - - - - - - - 1742226748068 - - -1410435 - - false - true - true - - - - - - - - - 1742376749972 - - -1410310 - - false - true - true - - - - - - - - - 1742376765347 - - -1410370 - - false - true - true - - - - - - - - - 1744886925970 - - - true - -1910210 - - false - true - true - - - - - - - - - 1749741070275 - - 70-380 - - false - true - true - - - - - - - - - 1747300275742 - - 68-555 - - false - true - true - - - - - - - - - 1750078746618 - - 13901480 - - false - true - true - - - - - - - - - 1750247117301 - - 70-280 - - false - true - true - - - - - - - - - 1750089494475 - - 13901500 - - false - true - true - - - - - - - - - 1750247117305 - - 70-260 - - false - true - true - - - - - - - - - 1750156136377 - - 13901460 - - false - true - true - - - - - - - - - 1750333596459 - - 70-440 - - false - true - true - - - - - - - - - 1750333624380 - - 70-420 - - false - true - true - - - - - - - - - 1750333680450 - - 70-400 - - false - true - true - - - - - - - - - 1750335318608 - - - 70-230 - - false - true - true - - - - - - - - - 1753087052979 - - 19201470 - - false - true - true - - - - - - - - - - - 1658497469833 - - - -240870 - - false - true - true - - - - - - - - - - 1658477089965 - true - 1658563200000 - - - - - - - - - - - 0 && c_selectedGridConnections.get(0).v_enableNFato){ - if(c_companyUIs.get(v_connectionOwnerIndexNr).v_NFATO_active){ - c_companyUIs.get(v_connectionOwnerIndexNr).f_getNFATOValues(); - } -} - -// Get the weather info -f_getWeatherInfo();]]> - - - 1743509682728 - - -670275 - - false - true - true - - - - - - - - - - 1658477089964 - true - 1743580800000 - - - - - - - - - - - - - - - - VOID - - 1696837759924 - - true - 19601890 - - false - true - true - - - - - - - - VOID - - 1696863329251 - - - 501060 - - false - true - true - - - - - - - - - (c_selectedObjects); -ArrayList buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Check if click was on Gridnode, if yes, select grid node -for ( GridNode GN : energyModel.pop_gridNodes ){ - if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ - f_selectGridNode(GN); - return; - } -} - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); - return; - } - } - } -} - -//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object -for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ - if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { - if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects - if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections - - // Find buildings powered by the same GC as the clicked object - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; - - //Find the (first) connected GC in the object - GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); - - //Set the selected GIS object type - v_clickedObjectType = GISobject.p_GISObjectType; - c_selectedObjects.add(GISobject); - - //Set the correct interface view for each object type - switch(v_clickedObjectType){ - - case CHARGER: - f_selectCharger((GCPublicCharger)selectedGC, GISobject ); - break; - - default: - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); - break; - } - return; - } - } - } -} - -//Still no clicked object? :select basic region -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - -//Enable kpi summary button -uI_Results.getCheckbox_KPISummary().setEnabled(true);]]> - - - VOID - - 1702045084338 - - -670371 - - false - true - true - - - - - - - - VOID - - 1702385530773 - - -670351 - - false - true - true - - - - - - - - VOID - - 1705499586056 - - -670391 - - false - true - true - - - - - - - - VOID - - 1705505495599 - - -650471 - - false - true - true - - - - - - - - VOID - - 1705505509120 - - -650411 - - false - true - true - - - - - - - - VOID - - 1705925024602 - - -670731 - - false - true - true - - - - VOID - - 1707918668161 - - 701100 - - false - true - true - - - - - gb.f_style(v_gridNodeFeedinColor, v_gridNodeFeedinColor, 2.0, null)); - } -} - -uI_Results.f_updateUIresultsGridNode(GN);]]> - - - VOID - - 1707918668163 - - 701120 - - false - true - true - - - - - - - ]]> - - (buildingsConnectedToSelectedGC_list); -v_clickedObjectType = b.p_GISObjectType; - -//Enable checkbox -uI_Results.getCheckbox_KPISummary().setEnabled(true); - -// Color all buildings of the GridConnection associated with the selected building -if (!c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.equals("-") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("woonfunctie") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("Onbekend")){ - for (GIS_Object obj : c_selectedObjects) { //Buildings that are grouped, select as well. - obj.gisRegion.setFillColor(v_selectionColorAddBuildings); - } -} - -//Check the amount of GC in building -v_nbGridConnectionsInSelectedBuilding = b.c_containedGridConnections.size(); - -//Multiple GC in building: set additional adress in building info + buttons -if ( v_nbGridConnectionsInSelectedBuilding > 1 ){ - v_selectedGridConnectionIndex = 0; - v_clickedObjectText = "Pand met " + b.c_containedGridConnections.size() + " adressen: " + b.p_id; - gr_multipleBuildingInfo.setVisible(true); -} -else { - String text = ""; - if (p_selectedProjectType == OL_ProjectType.BUSINESSPARK) { - if (b instanceof GIS_Building) { - if(b.c_containedGridConnections.get(0).p_owner.p_detailedCompany){ - text = b.c_containedGridConnections.get(0).p_owner.p_actorID + ", "; - } - else if(((GIS_Building)b).p_annotation != null){ - text = ((GIS_Building)b).p_annotation + ", "; - } - } - else { - text = b.p_id + ", "; - } - } - - //Set adres text - if (c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address == null || c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress() == null) { - text = text + "Onbekend adres"; - } - else { - text = text + c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress(); - } - - v_clickedObjectText = text; - gr_multipleBuildingInfo.setVisible(false); -} - - - -//Update the resultsUI -f_updateUIResultsData(); - -//Set the button for going to the company UI (needs to be at the end of this function!) -f_setUIButton(); - -//alle panden met meerdere adressen hebben op dit moment (16-7-24) dezelfde functie(s) voor ieder adres, dus dit is op dit moment zinloos -//f_listFunctions(); -]]> - - - VOID - - 1707918668165 - - 701080 - - false - true - true - - - - VOID - - 1708595258540 - - - -260440 - - false - true - true - c_COCompanies = findAll(energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); - -// Give every connection owner an index nr, used to navigate to the correct private ui using the button. -while (i < c_COCompanies.size()){ - - ConnectionOwner CO = c_COCompanies.get(i); - - CO.p_connectionOwnerIndexNr = i; - i++; -} - -//Create the private ui for every connection owner -while (v_connectionOwnerIndexNr < c_COCompanies.size()){ - - UI_company companyUI = add_ui_companies(); - ConnectionOwner COC = findFirst(c_COCompanies, p -> p.p_connectionOwnerIndexNr == v_connectionOwnerIndexNr ); - - ////Set unique parameters for every company_ui - companyUI.p_company = COC; - companyUI.p_companyName = COC.p_actorID; - companyUI.p_amountOfGC = COC.f_getOwnedGridConnections().size(); - - - //Links with engine - companyUI.c_ownedGridConnections = COC.f_getOwnedGridConnections(); - - for (GridConnection GC : companyUI.c_ownedGridConnections) { - - //Get all buildings - companyUI.c_ownedBuildings.addAll(GC.c_connectedGISObjects); - - //Add connected trafos for each GC - companyUI.c_connectedTrafos.add(GC.p_parentNodeElectricID); - - //Add scenario settings for each GC - companyUI.c_scenarioSettings_Current.add(c_scenarioMap_Current.get(GC)); - companyUI.c_scenarioSettings_Future.add(c_scenarioMap_Future.get(GC)); - - //Initialize additional vehicles collection for each GC - companyUI.c_additionalVehicles.put(GC, new ArrayList()); - } - - companyUI.p_amountOfBuildings = companyUI.c_ownedBuildings.size(); - - //Initialize adress variable (changes with selected GC) - companyUI.v_adressGC = companyUI.c_ownedGridConnections.get(0).p_address.getAddress(); - - //Set annotation as company name, if its a generic company (otherwise potentially the addres_id name) - if(!COC.p_detailedCompany){ - if(companyUI.c_ownedBuildings.get(0).p_annotation != null){ - companyUI.p_companyName = companyUI.c_ownedBuildings.get(0).p_annotation; - } - } - - //Initialize the companyUI - companyUI.f_initializeCompanyUI(); - - //Add to the collection of companyUIs - c_companyUIs.add( companyUI ); - - //set boolean for has privateUI in owner: True - COC.b_hasPrivateUI = true; - - v_connectionOwnerIndexNr++; -} - -v_connectionOwnerIndexNr = 0; - -//Get the ghost vehicles for the transport slider tab -Triple triple = uI_Tabs.pop_tabMobility.get(0).f_calculateNumberOfGhostVehicles( new ArrayList(energyModel.UtilityConnections.findAll( x -> true)) ); -uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Cars = triple.getFirst(); -uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Vans = triple.getSecond(); -uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Trucks = triple.getThird(); -//Get the ghost heating systems -Pair pair = uI_Tabs.pop_tabHeating.get(0).f_calculateNumberOfGhostHeatingSystems( energyModel.UtilityConnections.findAll( x -> true) ); -uI_Tabs.pop_tabHeating.get(0).v_totalNumberOfGhostHeatingSystems_ElectricHeatpumps = pair.getFirst(); -uI_Tabs.pop_tabHeating.get(0).v_totalNumberOfGhostHeatingSystems_HybridHeatpumps = pair.getSecond(); -]]> - - - VOID - - 1709716821854 - - -670631 - - false - true - true - - - - VOID - - 1709718252272 - - 1600-280 - - false - true - true - - - - VOID - - 1714130288661 - - 85-680 - - false - true - true - houses = new ArrayList(energyModel.Houses.findAll( x -> true)); -List housesWithoutPV = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.hasPV ).collect(Collectors.toList()); -List housesWithPV = new ArrayList<>(houses); -housesWithPV.removeAll(housesWithoutPV); - -c_orderedPVSystemsHouses = new ArrayList<>(housesWithoutPV); -c_orderedPVSystemsHouses.addAll(housesWithPV); - - -List companies = new ArrayList(energyModel.UtilityConnections.findAll( x -> true)); -List companiesWithoutPV = companies.stream().filter( gc -> !gc.v_liveAssetsMetaData.hasPV ).collect(Collectors.toList()); -List companiesWithPV = companies.stream().filter( gc -> gc.v_liveAssetsMetaData.hasPV ).collect(Collectors.toList()); -List detailedCompaniesWithPV = companiesWithPV.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List genericCompaniesWithPV = new ArrayList<>(companiesWithPV); -genericCompaniesWithPV.removeAll(detailedCompaniesWithPV); - -c_orderedPVSystemsCompanies = new ArrayList<>(companiesWithoutPV); -c_orderedPVSystemsCompanies.addAll(genericCompaniesWithPV); -c_orderedPVSystemsCompanies.addAll(detailedCompaniesWithPV); - -]]> - - - VOID - - 1714130342440 - - 85-660 - - false - true - true - EAs = new ArrayList<>(findAll(energyModel.f_getEnergyAssets(), ea -> !(ea.getParentAgent() instanceof GCPublicCharger))); -EAs = EAs.stream().filter(ea -> ea instanceof J_EAVehicle).collect(Collectors.toList()); -// Find all the EVs at the start of the simulation -ArrayList otherEAs = EAs.stream().filter(ea -> !(ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); -// We make sure that the EVs at the start of the simulation are the last in the list - -//traceln("amount of EVs at start: " + EAEVs.size()); -//traceln("amount of other EAs at start: " + otherEAs.size()); - -if(c_companyUIs.size() == 0){ // Dont add the ev to the pool if there are companyUIs - ArrayList EAEVs = EAs.stream().filter(ea -> (ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); - otherEAs.addAll(EAEVs); -} - -c_orderedVehicles = otherEAs;]]> - - - VOID - - 1714131269202 - - 85-640 - - false - true - true - houses = new ArrayList(energyModel.Houses.findAll( x -> true)); -List housesWithoutHP = houses.stream().filter( gc -> gc.p_heatingType != OL_GridConnectionHeatingType.HEATPUMP_AIR ).collect(Collectors.toList()); -List housesWithHP = new ArrayList<>(houses); -housesWithHP.removeAll(housesWithoutHP); - -c_orderedHeatingSystemsHouses = new ArrayList<>(housesWithoutHP); -c_orderedHeatingSystemsHouses.addAll(housesWithHP); - - -List companies = new ArrayList(energyModel.UtilityConnections.findAll( gc -> gc.p_heatingType != OL_GridConnectionHeatingType.NONE)); -List companiesWithoutHP = companies.stream().filter( gc -> gc.p_heatingType != OL_GridConnectionHeatingType.HEATPUMP_AIR).collect(Collectors.toList()); -List companiesWithHP = companies.stream().filter( gc -> gc.p_heatingType == OL_GridConnectionHeatingType.HEATPUMP_AIR ).collect(Collectors.toList()); -List detailedCompaniesWithHP = companiesWithHP.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List genericCompaniesWithHP = new ArrayList<>(companiesWithHP); -genericCompaniesWithHP.removeAll(detailedCompaniesWithHP); - -c_orderedHeatingSystemsCompanies = new ArrayList<>(companiesWithoutHP); -c_orderedHeatingSystemsCompanies.addAll(genericCompaniesWithHP); -c_orderedHeatingSystemsCompanies.addAll(detailedCompaniesWithHP); - -]]> - - - VOID - - 1714135623471 - - 70-700 - - false - true - true - - - - VOID - - 1715116336665 - - 19601610 - - false - true - true - - - - - 0){ - - double yearlyEnergyConsumption = sum( gis_area.c_containedGridConnections, x -> x.v_rapidRunData.getTotalElectricityConsumed_MWh()); - - if ( yearlyEnergyConsumption < 10){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 50){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 150){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption > 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} -}]]> - - - VOID - - 1715118739710 - - 19601680 - - false - true - true - - - - - 0) { - if (gis_area.c_containedGridConnections.get(0).v_liveAssetsMetaData.hasPV) { - if (gis_area.c_containedGridConnections.get(0).c_productionAssets.get(0).getCapacityElectric_kW() < 100){ - gis_area.f_style(rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null); - } - else { - gis_area.f_style(rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null); - } - return; - } - gis_area.f_style(rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null); -}]]> - - - VOID - - 1715157302225 - - -670250 - - false - false - true - - - - VOID - - 1715859145993 - - -670210 - - false - true - true - - - - RETURNS_VALUE - - 1715868403475 - - - -28090 - - false - true - true - - - - - - - - VOID - - 1716419446045 - - -480-100 - - false - true - true - - - - - - - - RETURNS_VALUE - - 1716419448047 - - -480-120 - - false - true - true - - - - VOID - - 1718263685462 - - 19601630 - - false - true - true - - - - - 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} - -]]> - - - VOID - - 1718265697364 - - 19601700 - - false - true - true - - - - - 0) { - if (gis_area.c_containedGridConnections.get(0).v_liveAssetsMetaData.hasPV) { - if (gis_area.c_containedGridConnections.get(0).c_productionAssets.get(0).getCapacityElectric_kW() < 5){ - gis_area.f_style( rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null ); - } - else { - gis_area.f_style( rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null ); - } - return; - } -} -gis_area.f_style( rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null ); - -]]> - - - VOID - - 1718288402102 - - -670771 - - false - true - true - x.v_liveAssetsMetaData.hasPV == true && x.v_isActive); -//int PV_pct = roundToInt(100 * PVsystems / count(energyModel.UtilityConnections, x->x.v_isActive)); -Pair pair = uI_Tabs.pop_tabElectricity.get(0).f_getPVSystemPercentage( new ArrayList(findAll(energyModel.UtilityConnections, x -> x.v_isActive) ) ); -int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -uI_Tabs.pop_tabElectricity.get(0).getSliderRooftopPVCompanies_pct().setValue(PV_pct, false); - -// GAS_BURNER / HEATING SYSTEMS: // Still a slight error. GasBurners + HeatPumps != total, because some GC have primary heating asset null -int GasBurners = count(energyModel.UtilityConnections, gc->gc.p_primaryHeatingAsset instanceof J_EAConversionGasBurner && gc.v_isActive); -int GasBurners_pct = roundToInt(100.0 * GasBurners / (count(energyModel.UtilityConnections, x -> x.v_isActive && x.p_primaryHeatingAsset != null) + uI_Tabs.pop_tabHeating.get(0).v_totalNumberOfGhostHeatingSystems_ElectricHeatpumps + uI_Tabs.pop_tabHeating.get(0).v_totalNumberOfGhostHeatingSystems_HybridHeatpumps)); - -uI_Tabs.pop_tabHeating.get(0).getSliderGasBurnerCompanies_pct().setValue(GasBurners_pct, false); -uI_Tabs.pop_tabHeating.get(0).f_setHeatingSliders( 0, uI_Tabs.pop_tabHeating.get(0).getSliderGasBurnerCompanies_pct(), uI_Tabs.pop_tabHeating.get(0).getSliderElectricHeatPumpCompanies_pct(), null, null ); - -uI_Tabs.pop_tabHeating.get(0).getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct().setValue(GasBurners_pct, false); -uI_Tabs.pop_tabHeating.get(0).f_setHeatingSliders( 0, uI_Tabs.pop_tabHeating.get(0).getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct(), uI_Tabs.pop_tabHeating.get(0).getSliderHeatDemandSlidersCompaniesElectricHeatPumpCompanies_pct(), null, null ); - - -// HEAT_PUMP_AIR: -// int HeatPumps = count(energyModel.UtilityConnections, gc->gc.p_primaryHeatingAsset instanceof J_EAConversionHeatPump); -// int HeatPumps_pct = roundToInt(100 * HeatPumps / energyModel.UtilityConnections.size()); -// sl_electricHeatPumpCompanies.setValue(HeatPumps_pct, false); -// f_setHeatingSlidersCompanies(1); - -// TRUCKS: -int DieselTrucks = 0; -int ElectricTrucks = uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Trucks; -int HydrogenTrucks = 0; -for (GCUtility gc : energyModel.UtilityConnections) { - if(gc.v_isActive){ - for (J_EAVehicle vehicle : gc.c_vehicleAssets) { - if (vehicle instanceof J_EADieselVehicle && vehicle.getEAType() == OL_EnergyAssetType.DIESEL_TRUCK) { - DieselTrucks += 1; - } - else if (vehicle instanceof J_EAEV && vehicle.getEAType() == OL_EnergyAssetType.ELECTRIC_TRUCK) { - ElectricTrucks += 1; - } - else if (vehicle instanceof J_EAHydrogenVehicle && vehicle.getEAType() == OL_EnergyAssetType.HYDROGEN_TRUCK) { - HydrogenTrucks += 1; - } - } - } -} - -int totalTrucks = DieselTrucks + ElectricTrucks + HydrogenTrucks; -int DieselTrucks_pct = 100; -int ElectricTrucks_pct = 0; -int HydrogenTrucks_pct = 0; -if (totalTrucks != 0) { - DieselTrucks_pct = roundToInt(100.0 * DieselTrucks / totalTrucks); - ElectricTrucks_pct = roundToInt(100.0 * ElectricTrucks / totalTrucks); - HydrogenTrucks_pct = roundToInt(100.0 * HydrogenTrucks / totalTrucks); -} -uI_Tabs.pop_tabMobility.get(0).getSliderFossilFuelTrucks_pct().setValue(DieselTrucks_pct, false); -uI_Tabs.pop_tabMobility.get(0).getSliderElectricTrucks_pct().setValue(ElectricTrucks_pct, false); -uI_Tabs.pop_tabMobility.get(0).getSliderHydrogenTrucks_pct().setValue(HydrogenTrucks_pct, false); - -// VANS: -int DieselVans = 0; -int ElectricVans = uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Vans; -int HydrogenVans = 0; -for (GCUtility gc : energyModel.UtilityConnections) { - if(gc.v_isActive){ - for (J_EAVehicle vehicle : gc.c_vehicleAssets) { - if (vehicle instanceof J_EADieselVehicle && vehicle.getEAType() == OL_EnergyAssetType.DIESEL_VAN) { - DieselVans += 1; - } - else if (vehicle instanceof J_EAEV && vehicle.getEAType() == OL_EnergyAssetType.ELECTRIC_VAN) { - ElectricVans += 1; - } - else if (vehicle instanceof J_EAHydrogenVehicle && vehicle.getEAType() == OL_EnergyAssetType.HYDROGEN_VAN) { - HydrogenVans += 1; - } - } - } -} - -int totalVans = DieselVans + ElectricVans + HydrogenVans; -int DieselVans_pct = 100; -int ElectricVans_pct = 0; -int HydrogenVans_pct = 0; -if (totalVans != 0) { - DieselVans_pct = roundToInt(100.0 * DieselVans / totalVans); - ElectricVans_pct = roundToInt(100.0 * ElectricVans / totalVans); - HydrogenVans_pct = roundToInt(100.0 * HydrogenVans / totalVans); -} -uI_Tabs.pop_tabMobility.get(0).getSliderFossilFuelVans_pct().setValue(DieselVans_pct, false); -uI_Tabs.pop_tabMobility.get(0).getSliderElectricVans_pct().setValue(ElectricVans_pct, false); -//sl_hydrogenVans.setValue(HydrogenVans_pct, false); - -// DIESEL_VEHICLE: // Currently only for Company Cars not household Cars / EVs -int DieselCars = 0; -int ElectricCars = uI_Tabs.pop_tabMobility.get(0).v_totalNumberOfGhostVehicle_Cars; -int HydrogenCars = 0; -for (GCUtility gc : energyModel.UtilityConnections) { - if(gc.v_isActive){ - for (J_EAVehicle vehicle : gc.c_vehicleAssets) { - if (vehicle instanceof J_EADieselVehicle && vehicle.getEAType() == OL_EnergyAssetType.DIESEL_VEHICLE) { - DieselCars += 1; - } - else if (vehicle instanceof J_EAEV && vehicle.getEAType() == OL_EnergyAssetType.ELECTRIC_VEHICLE) { - ElectricCars += 1; - } - else if (vehicle instanceof J_EAHydrogenVehicle && vehicle.getEAType() == OL_EnergyAssetType.HYDROGEN_VEHICLE) { - HydrogenCars += 1; - } - } - } -} - -int totalCars = DieselCars + ElectricCars + HydrogenCars; -int DieselCars_pct = 100; -int ElectricCars_pct = 0; -int HydrogenCars_pct = 0; -if (totalCars != 0) { - DieselCars_pct = roundToInt((100.0 * DieselCars) / totalCars); - ElectricCars_pct = roundToInt((100.0 * ElectricCars) / totalCars); - HydrogenCars_pct = roundToInt((100.0 * HydrogenCars) / totalCars); -} -uI_Tabs.pop_tabMobility.get(0).getSliderFossilFuelCars_pct().setValue(DieselCars_pct, false); -uI_Tabs.pop_tabMobility.get(0).getSliderElectricCars_pct().setValue(ElectricCars_pct, false); -//sl_hydrogenCars.setValue(HydrogenCars_pct, false); -]]> - - - VOID - - 1718552624959 - - 701140 - - false - true - true - - - - - - - - - (Arrays.asList(charger)); -uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - -//Set the UI button -f_setUIButton();]]> - - - VOID - - 1718566260603 - - 19601750 - - false - true - true - - - - - 0) { - Color c = gis_area.c_containedGridConnections.get(0).p_parentNodeElectric.p_uniqueColor; - gis_area.f_style(c, black, 1.0, null); -}]]> - - - VOID - - 1719830600300 - - 1240-280 - - false - false - true - - - - VOID - - 1720793723819 - - 801160 - - false - true - true - 1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); -} -else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); -} -]]> - - - VOID - - 1721991420806 - - -650511 - - false - true - true - MVsubstations = findAll(energyModel.pop_gridNodes, GN -> GN.p_nodeType == OL_GridNodeType.SUBMV); - -if(MVsubstations != null || p_selectedProjectType == OL_ProjectType.RESIDENTIAL){ - b_gridLoopsAreDefined = true; -} - -v_amountOfDefinedGridLoops = 0; - -if(MVsubstations != null){ - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode MVsub : MVsubstations){ - - //Create a unique color from a spectrum and assign it to the subMV - MVsub.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, MVsubstations.size()); - - //Assign unique color to all underlying grid nodes - MVsub.f_getLowerLVLConnectedGridNodes().forEach(GN -> GN.p_uniqueColor = MVsub.p_uniqueColor); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -} -else if(p_selectedProjectType == OL_ProjectType.RESIDENTIAL){ - int totalNotToplevelGridNodes = energyModel.f_getGridNodesNotTopLevel().size(); - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode node : energyModel.f_getGridNodesNotTopLevel()){ - - //Create a unique color from a spectrum and assign it to the subMV - node.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, totalNotToplevelGridNodes); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -}]]> - - - VOID - - 1721991963719 - - -650451 - - false - true - true - - - - - - - - VOID - - 1721992103665 - - -650431 - - false - true - true - - - - - - - - VOID - - 1721049341787 - - 801180 - - false - true - true - 1){ - HashMap functionsList = new HashMap(); - - for (int i = 0; i < c_selectedObjects.get(0).c_containedGridConnections.size(); i++) { - //split functies als er meerdere zijn - String[] splitFunctions = c_selectedObjects.get(0).c_containedGridConnections.get(i).p_purposeBAG.split(","); - - for (int j = 0; j < splitFunctions.length; j++) { - // als de key al bestaat, itereer - if (functionsList.get(splitFunctions[j]) != null) { - functionsList.put(splitFunctions[j], functionsList.get(splitFunctions[j]) + 1); - } - // zo niet, voeg toe - else { - functionsList.put(splitFunctions[j],1); - } - } - } - - /* - for (String i : functionsList.keySet()) { - traceln(i + ": " + functionsList.get(i)); - } - */ -}]]> - - - VOID - - 1724857887019 - - -280420 - - false - true - true - - - - VOID - - 1724857983890 - - -260510 - - false - true - true - co.p_connectionOwnerType == OL_ConnectionOwnerType.ELECTROLYSER_OP)); - -//Fill the hydrogen GC collection (For now only searched for Electrolyser_OP, what about (the non existing) Fuelcell_OP -for(ConnectionOwner COHydrogen : hydrogenUI.c_connectionOwners_Hydrogen){ - hydrogenUI.c_gridConnections_Hydrogen.addAll(findAll( - COHydrogen.f_getOwnedGridConnections(), gc -> gc instanceof GCEnergyConversion && ( - gc.c_energyAssets.stream().anyMatch(asset -> asset instanceof J_EAConversionElectrolyser) || - gc.c_energyAssets.stream().anyMatch(asset -> asset instanceof J_EAConversionFuelCell) || - gc.c_energyAssets.stream().anyMatch(asset -> asset instanceof J_EAStorageGas) ))); -} - - -for (GridConnection GC : hydrogenUI.c_gridConnections_Hydrogen) { - - //Add all GIS objects - hydrogenUI.c_GISObjects_Hydrogen.addAll(GC.c_connectedGISObjects); - - //Add connected gridnodes for each GC - hydrogenUI.c_connectedGridNodes.add(GC.p_parentNodeElectricID); - - //Find all energy assets and add them to the correct collection - List electrolysers = findAll(GC.c_conversionAssets, asset -> asset instanceof J_EAConversionElectrolyser); - List storages = findAll(GC.c_storageAssets, asset -> asset instanceof J_EAStorageGas); - List fuelcells = findAll(GC.c_conversionAssets, asset -> asset instanceof J_EAConversionFuelCell); - - electrolysers.forEach(asset -> hydrogenUI.c_hydrogenElectrolysers.add((J_EAConversionElectrolyser)asset)); - storages.forEach(asset -> hydrogenUI.c_hydrogenStorages.add((J_EAStorageGas)asset)); - fuelcells.forEach(asset -> hydrogenUI.c_hydrogenFuelCells.add((J_EAConversionFuelCell)asset)); -} - - -//Totals -hydrogenUI.p_amountOfGC = hydrogenUI.c_gridConnections_Hydrogen.size(); -hydrogenUI.p_amountOfGISObjects = hydrogenUI.c_GISObjects_Hydrogen.size(); - - -//Initialize the UI - - - - -//Add to the collection of UIs ??? - - -]]> - - - VOID - - 1724858039724 - - -260560 - - false - true - true - co.p_connectionOwnerType == OL_ConnectionOwnerType.BATTERY_OP)); - -//Fill the hydrogen GC collection (For now only searched for Electrolyser_OP, what about (the non existing) Fuelcell_OP -for(ConnectionOwner COBattery : batteryUI.c_connectionOwners_Battery){ - batteryUI.c_gridConnections_Battery.addAll(findAll( - COBattery.f_getOwnedGridConnections(), gc -> gc instanceof GCGridBattery && - gc.c_storageAssets.stream().anyMatch(asset -> asset instanceof J_EAStorageElectric) )); -} - - -for (GridConnection GC : batteryUI.c_gridConnections_Battery) { - - //Add all GIS objects - batteryUI.c_GISObjects_Battery.addAll(GC.c_connectedGISObjects); - - //Add connected gridnodes for each GC - batteryUI.c_connectedGridNodes.add(GC.p_parentNodeElectricID); - - //Find all energy assets and add them to the correct collection - List batteries = findAll(GC.c_storageAssets, asset -> asset instanceof J_EAStorageElectric); - - batteries.forEach(asset -> batteryUI.c_gridBatteries.add((J_EAStorageElectric)asset)); -} - - -//Totals -batteryUI.p_amountOfGC = batteryUI.c_gridConnections_Battery.size(); -batteryUI.p_amountOfGISObjects = batteryUI.c_GISObjects_Battery.size(); - - -//Initialize the UI - - - - -//Add to the collection of UIs ???]]> - - - VOID - - 1725006890451 - - 801200 - - false - true - true - 1 || !c_selectedGridConnections.get(0).p_owner.b_hasPrivateUI || !c_selectedGridConnections.get(0).v_isActive){ - button_goToUI.setVisible(false); - } - else{ - // Index number of the connection owner used to change the button ' - v_connectionOwnerIndexNr = c_selectedGridConnections.get(0).p_owner.p_connectionOwnerIndexNr; - button_goToUI.setText("Ga naar het Bedrijfsportaal"); - button_goToUI.setVisible(true); - } - break; - -case ELECTROLYSER: - if(ui_Hydrogen.size() > 0){ - button_goToUI.setText("Ga naar het Waterstof Dashboard"); - button_goToUI.setVisible(true); - } - break; - -case BATTERY: - if(ui_Battery.size() > 0){ - button_goToUI.setText("Ga naar het Batterijen Dashboard"); - button_goToUI.setVisible(true); - } - break; - -case CHARGER: - button_goToUI.setVisible(false); - break; - -default: - button_goToUI.setVisible(false); - break; -} -]]> - - - RETURNS_VALUE - - 1725266804325 - - -280110 - - false - true - true - - - - - - - - - - - - VOID - - 1725968656820 - - 19601770 - - false - true - true - - - - - - - - VOID - - 1725977409304 - - -670751 - - false - false - true - - - - VOID - - 1726068314849 - - -670230 - - false - true - true - - - - VOID - - 1729685968993 - - 420-650 - - false - true - true - - - - VOID - - 1734442458629 - - -1455130 - - false - true - true - - - - - - - - - toBeFilteredGC = new ArrayList(); - -if(c_selectedFilterOptions.size()>1 && c_selectedGridConnections.size()> 0){ // Already filtering - toBeFilteredGC = new ArrayList(c_selectedGridConnections); -} -else{ // First filter - toBeFilteredGC = new ArrayList(energyModel.f_getActiveGridConnections()); -} - -//After a filter selecttion, reset previous clicked building/gridNode colors and text -v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList(c_selectedObjects); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Can filter return 0? (Only allowed for filters who are not inmediately active (gridLoops, nbh, etc.) -boolean filterCanReturnZero = false; - -switch(selectedFilter){ - case COMPANIES: - f_filterCompanies(toBeFilteredGC); - break; - - case HOUSES: - f_filterHouses(toBeFilteredGC); - break; - - case DETAILED: - f_filterDetailed(toBeFilteredGC); - break; - - case NONDETAILED: - f_filterEstimated(toBeFilteredGC); - break; - - case HASPV: - f_filterHasPV(toBeFilteredGC); - break; - - case HASTRANSPORT: - f_filterHasTransport(toBeFilteredGC); - break; - - case GRIDTOPOLOGY_SELECTEDLOOP: - if(!c_filterSelectedGridLoops.isEmpty()){ - f_filterGridLoops(toBeFilteredGC); - } - else{ - f_setForcedClickScreen(true, "Selecteer een lus"); - if(c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.GRID_NEIGHBOURS)){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.GRID_NEIGHBOURS),true); - } - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - - case SELECTED_NEIGHBORHOOD: - if(!c_filterSelectedNeighborhoods.isEmpty()){ - f_filterNeighborhoods(toBeFilteredGC); - } - else{ - f_setForcedClickScreen(true, "Selecteer een buurt"); - - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - case MANUAL_SELECTION: - if(c_manualFilterSelectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else if(c_selectedFilterOptions.size() > 1){ - if(c_manualFilterDeselectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else{ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - } - else{ - filterCanReturnZero = true; - } - - break; -} - -if(c_selectedGridConnections.size() == 0 && !filterCanReturnZero){ // Not allowed to return zero, while returning zero - f_removeFilter(selectedFilter, selectedFilterName); - - //Notify filter has not been applied, cause no results are given - f_setErrorScreen("Geselecteerde filter geeft geen resultaten. De filter is gedeactiveerd."); -} -else if(c_selectedGridConnections.size() == 0 && filterCanReturnZero){//Allowed to return zero filtered gc, while returning zero - //Do nothing -} -else{//Filtered GC returns GC - - //Set color of all gis objects of new filter selection - v_clickedObjectType = OL_GISObjectType.BUILDING; - - for (GridConnection GC: c_selectedGridConnections){ - for (GIS_Object objectGIS : GC.c_connectedGISObjects) { - objectGIS.gisRegion.setFillColor(v_selectionColorAddBuildings); - c_selectedObjects.add(objectGIS); - } - } - - //Set graphs - if(c_selectedGridConnections.size()>1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } -}]]> - - - VOID - - 1734442462084 - - -145560 - - false - true - true - - - - - - - - VOID - - 1734445008646 - - -1450505 - - false - true - true - - - - VOID - - 1734447122780 - - -1410290 - - false - true - true - - - - - - - - - 0 ) { // only allow buildings with gridconnections - GridConnection clickedGridConnection = b.c_containedGridConnections.get(0); // Find buildings powered by the same GC as the clicked building - GridNode clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - ArrayList allGridNodes = new ArrayList(energyModel.f_getGridNodesTopLevel()); - allGridNodes.addAll(energyModel.f_getGridNodesNotTopLevel()); - - while( clickedGridConnectionConnectedGridNode.p_parentNodeID != null && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.SUBMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.MVMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.HVMV - ){ - String parentNodeName = clickedGridConnectionConnectedGridNode.p_parentNodeID; - if(parentNodeName != null && !parentNodeName.equals("-") && !parentNodeName.equals("")){ - clickedGridConnectionConnectedGridNode = findFirst(allGridNodes, GN -> GN.p_gridNodeID.equals(parentNodeName)); - } - else{ // At top node --> select the directly attached grid node instead, and break out of while loop. - clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - break; - } - } - - //This deselect the previous selection of gridloops - f_setFilter("In de aangewezen 'lus'"); - - if(c_filterSelectedGridLoops.contains(clickedGridConnectionConnectedGridNode)){ - c_filterSelectedGridLoops.remove(clickedGridConnectionConnectedGridNode); - } - else{ - c_filterSelectedGridLoops.add(clickedGridConnectionConnectedGridNode); - } - - if(gr_forceMapSelection.isVisible()){ - f_setForcedClickScreen(false, ""); - } - - //This selects the new selection of gridloops - f_setFilter("In de aangewezen 'lus'"); - - return; - - } - } - } -} -]]> - - - VOID - - 1734448628428 - - -1430150 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> GC instanceof GCUtility)); - -]]> - - - VOID - - 1734448687355 - - -1430170 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> GC instanceof GCHouse)); - -]]> - - - VOID - - 1734448688472 - - -1430190 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> GC.p_owner.p_detailedCompany)); -]]> - - - VOID - - 1734448689519 - - -1430210 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> !GC.p_owner.p_detailedCompany)); -]]> - - - VOID - - 1734448690487 - - -1430230 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> GC.v_liveAssetsMetaData.hasPV)); -]]> - - - VOID - - 1734448691508 - - -1430250 - - false - true - true - - - ]]> - - (findAll(toBeFilteredGC, GC -> GC.c_vehicleAssets.size() > 0)); - -]]> - - - VOID - - 1734451505770 - - -1455105 - - false - true - true - - - - - - - - - toBeReappliedFilters = new ArrayList(c_selectedFilterOptions); -c_selectedFilterOptions.clear(); - -if(toBeReappliedFilters.size() > 0){ - for(OL_FilterOptionsGC filterOption : toBeReappliedFilters){ - f_applyFilter(filterOption, selectedFilterName); - } - String toBeAdjustedFilterText = t_activeFilters.getText(); - String newActiveFilterText = toBeAdjustedFilterText.replace(selectedFilterName + "\n", ""); - t_activeFilters.setText(newActiveFilterText); - - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); -} -else{ // All filters removed - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); - f_removeAllFilters(); -}]]> - - - VOID - - 1734517589341 - - -1430270 - - false - true - true - - - ]]> - - gridConnectionsOnLoop = new HashSet(); - -for(GridNode GridLoop : c_filterSelectedGridLoops) - if(b_gridLoopsAreDefined){ - OL_GridNodeType loopTopNodeType= GridLoop.p_nodeType; - switch(loopTopNodeType){ - case MVLV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - case SUBMV: - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - - case MVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - - break; - - case HVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - } - } - else{ - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - } - -c_selectedGridConnections = new ArrayList<>(gridConnectionsOnLoop);]]> - - - VOID - - 1736344958050 - - 34201040 - - false - true - true - - - - - p = v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true);]]> - - - VOID - - 1736425024531 - - - true - 502160 - - false - true - true - - - ]]> - - warnings = new ArrayList<>(); - -//TODO: First we check if all the gridconnections are on a single ring in the grid topology. If not we add a warning -HashSet parentNodes = new HashSet<>(); - -for (GridConnection gc : gcList) { - - // GridTopology Check - GridNode gn = gc.l_parentNodeElectric.getConnectedAgent(); - // TODO: Improve this so it uses an OptionList instead of string comparison - if ( gn.p_description.toLowerCase().contains("klantstation") ) { - GridNode parentNode = findFirst(energyModel.pop_gridNodes, p -> p.p_gridNodeID.equals(gn.p_parentNodeID)); - if (parentNode == null) { - traceln("Warning! Could not find parentnode of klantstation of GC: " + gc.p_ownerID); - } - else if (parentNode.p_nodeType != OL_GridNodeType.SUBMV) { - // add warning, gc has klantstation, but this one is not on a ring - traceln("Warning! GC: " + gc.p_ownerID + " is not connected to a ring in the grid topology."); - warnings.add(gc.p_ownerID + " is niet aangesloten op een ring"); - parentNodes.add(parentNode); - } - else { - parentNodes.add(parentNode); - } - } - else if ( gn.p_nodeType != OL_GridNodeType.SUBMV ) { - // add warning, this one is not on a ring - traceln("Warning! GC: " + gc.p_ownerID + " is not connected to a ring in the grid topology."); - warnings.add(gc.p_ownerID + " is niet aangesloten op een ring"); - parentNodes.add(gn); - } - else { - parentNodes.add(gn); - } - - // Adding up the GTO Connection Capacity contributions - traceln("gto capacities: " + Arrays.toString( v_GCGTOConnectionCapacities.get(gc))); - deliveryCapacity_kW += v_GCGTOConnectionCapacities.get(gc)[0]; - feedInCapacity_kW += v_GCGTOConnectionCapacities.get(gc)[1]; -} - -if ( parentNodes.size() > 1 ) { - // add warning - traceln("Warning! Selected GridConnections for E-Hub are not on a single ring."); - warnings.add("Let op! Er zijn bedrijven op verschillende ringen geselecteerd"); -} - -v_groupATODeliveryCapacity_kW = deliveryCapacity_kW; -v_groupATOFeedInCapacity_kW = feedInCapacity_kW; - - -f_EHubTabCapacityInformation(true, null); - -if (gcList.size() > 0) { - - // fix for the WKK - List gcListWithoutWKK = new ArrayList<>(gcList); - GridConnection GCWKK = findFirst(energyModel.EnergyConversionSites, gc -> gc.p_name.toLowerCase().contains("wkk")); - //if (GCWKK != null) { - gcListWithoutWKK.remove(GCWKK); - //} - - f_EHubTabCapacityInformation(false, "De ring van " + gcList.get(0).p_ownerID + " is geselecteerd. \n"); - - f_EHubTabCapacityInformation(false, - "De bedrijven hebben samen een leveringscapaciteit van " + - (int) sum(gcListWithoutWKK, gc -> gc.p_contractedDeliveryCapacity_kW) + - " kW. \nDe E-Hub zou een groepscontract kunnen krijgen van " + - (int) deliveryCapacity_kW + " kW. \n" - ); - if (warnings.size() > 0) { - f_EHubTabCapacityInformation(false, "Waarschuwingen: \n"); - for (String str : warnings) { - f_EHubTabCapacityInformation(false, str); - f_EHubTabCapacityInformation(false, "\n"); - } - } -} -else { - f_EHubTabCapacityInformation(false, "Nog geen E-Hub samengesteld"); -}]]> - - - VOID - - 1736425024533 - - 502260 - - false - true - true - - - - VOID - - 1736425024535 - - 502280 - - false - true - true - - - - - - - - - - - - VOID - - 1736425024537 - - - true - 602080 - - false - true - true - gcList = new ArrayList<>(); -gcList.addAll(energyModel.f_getGridConnections()); -//gcList.addAll(energyModel.f_getPausedGridConnections()); - -for (GridConnection gc : gcList) { - int amountOfDataPoints = gc.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW().length; - double[] quarterHourlyValues = Arrays.copyOf(gc.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(), amountOfDataPoints); - Arrays.sort(quarterHourlyValues); - double filteredMaximum_kW = min(gc.p_contractedDeliveryCapacity_kW , max(0, quarterHourlyValues[amountOfDataPoints - (int) (amountOfDataPoints*0.001) - 1])); - double filteredMinimum_kW = min(gc.p_contractedFeedinCapacity_kW, -min(0, quarterHourlyValues[(int)(amountOfDataPoints*0.001)])); - v_GCGTOConnectionCapacities.put(gc, new double[]{filteredMaximum_kW, filteredMinimum_kW}); -} - -// fix for the WKK -GridConnection GCWKK = findFirst(energyModel.EnergyConversionSites, gc -> gc.p_name.toLowerCase().contains("wkk")); -if (GCWKK != null) { - v_GCGTOConnectionCapacities.put(GCWKK, new double[]{0.0, 0.0}); -}]]> - - - VOID - - 1736442051389 - - -650651 - - false - true - true - - - - VOID - - 1737653178011 - - -1410350 - - false - true - true - - - - - - - - - - - - VOID - - 1737653178013 - - -1430330 - - false - true - true - - - ]]> - - gridConnectionsInNeighborhood = new ArrayList(); - -for(GridConnection GC : toBeFilteredGC){ - for(GIS_Object nbh : c_filterSelectedNeighborhoods) - if( nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude) ){ - gridConnectionsInNeighborhood.add(GC); - } -} - -c_selectedGridConnections = new ArrayList<>(gridConnectionsInNeighborhood);]]> - - - VOID - - 1740043548084 - - 1620-260 - - false - true - true - - - - - - - - VOID - - 1742226689515 - - -1430395 - - false - true - true - - - ]]> - - resultingGridConnectionSelection = new ArrayList(); - -if(c_selectedFilterOptions.size() > 1){ - resultingGridConnectionSelection.addAll(toBeFilteredGC); -} -else{//Manual selection is the only active filter -> Resulting grid connection selection should start empty -} - -for(GridConnection manualSelectedGC : c_manualFilterSelectedGC){ - if(!resultingGridConnectionSelection.contains(manualSelectedGC)){ - resultingGridConnectionSelection.add(manualSelectedGC); - } -} -for(GridConnection manualDeselectedGC : c_manualFilterDeselectedGC){ - if(resultingGridConnectionSelection.contains(manualDeselectedGC)){ - resultingGridConnectionSelection.remove(manualDeselectedGC); - } -} - - -c_selectedGridConnections = new ArrayList<>(resultingGridConnectionSelection);]]> - - - VOID - - 1742226787560 - - -1410415 - - false - true - true - - - - - - - - - 0 ){ - clickedObject = object; - break; - } - } - } -} - -//If click was not on a building, check if click was on an EA, if yes, select EA -if(clickedObject == null){ - for ( GIS_Object object : energyModel.pop_GIS_Objects ){//pop_GIS_Buildings - if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ - if (object.gisRegion.isVisible()) { //only allow us to click on visible objects - if (object.c_containedGridConnections.size() > 0 ){ - clickedObject = object; - break; - } - } - } - } -} - -//If a building or EA has been selected perform click functionality -if(clickedObject != null){ - boolean select = true; // Deselect == false; - boolean removedFromSelectedGC = false; - boolean removedFromDeselectedGC = false; - - ArrayList clickedGridConnections = new ArrayList(clickedObject.c_containedGridConnections); - - for (GridConnection clickedGC : clickedGridConnections){ - if(c_selectedGridConnections.contains(clickedGC)){ - c_selectedGridConnections.remove(clickedGC); - select = false; - } - - if(c_manualFilterSelectedGC.contains(clickedGC)){ - c_manualFilterSelectedGC.remove(clickedGC); - } - else if(c_manualFilterDeselectedGC.contains(clickedGC)){ - c_manualFilterDeselectedGC.remove(clickedGC); - } - } - - if(select){ - c_selectedGridConnections.addAll(clickedGridConnections); - c_manualFilterSelectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object toegevoegd aan selectie"); - } - else{ - c_manualFilterDeselectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object verwijderd van selectie"); - } - - - //Disable traceln - PrintStream originalPrintStream = f_disableTraceln(); - - //This deactivates the previous selection - f_setFilter("Handmatige selectie"); - - //This activates the new selection - f_setFilter("Handmatige selectie"); - - //Enable traceln - f_enableTraceln(originalPrintStream); - - return; -}]]> - - - VOID - - 1742300624199 - - 140-880 - - false - true - true - - - - - - - - - - - - VOID - - 1743509491686 - - -480-60 - - false - true - true - - - ]]> - - - - - VOID - - 1743518032245 - - -640295 - - false - true - true - gisObjects_for_mapViewBounds = new ArrayList(); - if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - gisObjects_for_mapViewBounds.addAll(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION)); - } - else{ - for (GIS_Object building : energyModel.pop_GIS_Buildings) { - if(building.gisRegion.isVisible()){ - gisObjects_for_mapViewBounds.add(building); - } - } - } - f_setMapViewBounds(gisObjects_for_mapViewBounds); -} - -if(map_scale != null){ - map.setMapScale(map_scale); -} - -va_Interface.navigateTo();]]> - - - VOID - - 1743665953113 - - -1900120 - - false - true - true - - - - - - - - - - - - - - - - - 0 && p_currentActiveInfoBubble.get(0) == infoBubble ) { - // If we click a second time on the same bubble it should close the window - p_currentActiveInfoBubble.clear(); - gr_infoText.setVisible(false); -} -else { - p_currentActiveInfoBubble.clear(); - p_currentActiveInfoBubble.add(infoBubble); - - int width_ch = 50; - // Set Text - Pair p = v_infoText.restrictWidth(descriptionText, width_ch); - t_infoTextDescription.setText(p.getFirst()); - - // Set Size - rect_infoText.setWidth(width_ch * 7.5); // about 7.5 px per char for sans serif 14 pt - rect_infoText.setHeight(50 + p.getSecond() * 20); // about 50 px for title and 20 px per line for sans serif 14 pt - - // Set Position - // The group position is on the top left, not the centre. - double margin_px = 15; - //double posX = f_getAbsolutePosition(infoBubble).getX(); - //double posY = f_getAbsolutePosition(infoBubble).getY(); - if (xPosition < (va_Interface.getX() + va_Interface.getWidth()/2) ) { - // bubble is on the left half, so text should appear to the right - gr_infoText.setX( xPosition + margin_px + infoBubble.getWidth()/2); - } - else { - // bubble is on the right half, so text should appear to the left - gr_infoText.setX( xPosition - margin_px + infoBubble.getWidth()/2 - rect_infoText.getWidth()); - } - - // In AnyLogic the Y-Axis is inverted - if (yPosition > (va_Interface.getY() + va_Interface.getHeight()/2) ) { - // bubble is on the bottom half, so text should appear above - gr_infoText.setY( yPosition - margin_px + infoBubble.getHeight()/2 - rect_infoText.getHeight()); - } - else { - // bubble is on the top half, so text should appear below - gr_infoText.setY( yPosition + margin_px + infoBubble.getHeight()/2); - } - - // Position of close button - gr_closeInfoText.setX( width_ch * 7.5 - 20 ); // 20 px offset from the right hand side - - gr_infoText.setVisible(true); -}]]> - - - RETURNS_VALUE - ]]> - 1744894817569 - - true - -1870265 - - false - true - true - - - ]]> - - - - - RETURNS_VALUE - - 1744894817571 - - true - -1890240 - - false - true - true - - - - - ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - traceln("point1: " + point); - - point.add( new Point(presentation.getX(), presentation.getY()) ); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - traceln("point2: " + point); - - point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); - - traceln("point3: " + point); - Pair pair = new Pair(presentation, point); - while ( pair.getFirst().getPresentable() != this ) { - pair = f_getPresentationPositionIteration(pair); - traceln("pair: " + pair); - traceln("point_i: " + pair.getSecond()); - } - point = pair.getSecond(); -} - -// Recursively add the group offsets. -ShapeGroup group = shape.getGroup(); -traceln("group x: " + group.getX()); -traceln("group y: " + group.getY()); -Pair pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); - traceln("point_j: " + pair.getSecond()); -} -return pair.getSecond(); - - - - - -/* -(main) tabs_presentation (tabs_presentation.getEmbeddedobject() = agent1) - (agent 1) tab_elec_presentation (tab_elec_presentation.getEmbeddedobject() = agent2) - (agent 2) shape (shape.getpresentable() = agent2) - - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable() ) => tab_elec_presentation - -tab_elec_presentation.getPresentable() => agent 1, so use this in the next iteration - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == tab_elec_presentation.getPresentable() ) => tabs_presentation - -*/ - - -/* - -double presentationOffsetX; -double presentationOffsetY; -if (shape.getPresentable() == this) { - // The shape is on this canvas, no additional offset - presentationOffsetX = 0.0; - presentationOffsetY = 0.0; -} -else { - traceln("getEmbeddedObject: " + c_presentations.get(0).getEmbeddedObject()); - traceln("getEmbeddedObject: " + c_presentations.get(1).getEmbeddedObject()); - traceln("shape.getPresentable()" + shape.getPresentable()); - traceln("agent presentable: " + agent.presentation); - traceln("this presentable: " + this.presentation); - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - presentationOffsetX = presentation.getX(); - presentationOffsetY = presentation.getY(); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - presentationOffsetX += presentation.getGroup().getX(); - presentationOffsetY += presentation.getGroup().getY(); - traceln("presentationOffsetX: " + presentationOffsetX); -} - -// Add the presentation offset to the shape position and then recursively add the group offsets. -Point point = new Point(shape.getX() + presentationOffsetX, shape.getY() + presentationOffsetY); -ShapeGroup group = shape.getGroup(); -Pair pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); -} -return pair.getSecond(); - -*/ -]]> - - - RETURNS_VALUE - ]]> - 1744894817573 - - true - -1870285 - - false - true - true - - - ]]> - - ap.getEmbeddedObject() == pair.getFirst().getPresentable()); -if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); -} -Point point = pair.getSecond(); -traceln("presentation agent: " + presentation.getEmbeddedObject()); -traceln("point in presentation iteration before: " + point); -point.add( new Point(presentation.getX(), presentation.getY()) ); -// It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. -traceln("point in presentation iteration middle: " + point); -point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); -traceln("point in presentation iteration after: " + point); - -return new Pair(presentation, point);]]> - - - VOID - - 1744624088848 - - -556-710 - - false - true - true - - - - VOID - - 1744624088850 - - -556-470 - - false - true - true - 1){ - excel_exportBalanceLoadData.setCellValue("Totale load [kWh]", "Electricity Load Balance", 1, columnIndex); - for (int i = 0; i < cumulativeLoadArray_kW.length ; i++) { - excel_exportBalanceLoadData.setCellValue( cumulativeLoadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); - } -} - -//Write the file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!");]]> - - - VOID - - 1744624088852 - - -556-590 - - false - true - true - - - - VOID - - 1744985599017 - - -556-410 - - false - true - true - - - - VOID - - 1744986150240 - - -556-390 - - false - true - true - - - - VOID - - 1745936595905 - - - -670870 - - false - true - true - - - - - - - - - (c_selectedObjects); -ArrayList buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Check if click was on Gridnode, if yes, select grid node -for ( GridNode GN : energyModel.pop_gridNodes ){ - if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ - if(GN.f_getAllLowerLVLConnectedGridConnections().size() >= p_minSelectedGCForPublicAggregation){ - f_selectGridNode(GN); - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } -} - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - if(b.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ - buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } - } - } -} - -//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object -for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ - if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { - if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects - if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections - if(GISobject.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ - // Find buildings powered by the same GC as the clicked object - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; - - //Find the (first) connected GC in the object - GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); - - //Set the selected GIS object type - v_clickedObjectType = GISobject.p_GISObjectType; - c_selectedObjects.add(GISobject); - - //Set the correct interface view for each object type - switch(v_clickedObjectType){ - - case CHARGER: - f_selectCharger((GCPublicCharger)selectedGC, GISobject ); - break; - - - default: - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); - break; - } - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } - } - } -} - -//Still no clicked object? :select basic region -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - -//Enable kpi summary button -uI_Results.getCheckbox_KPISummary().setEnabled(true);]]> - - - VOID - - 1746085650084 - - -670910 - - false - true - true - - - - VOID - - 1749741185117 - - 420-690 - - false - true - true - - - - VOID - - 1750247111856 - - 420-670 - - false - true - true - (); -c_orderedV2GChargers = new ArrayList(); -c_orderedPublicChargers = new ArrayList(); - -List c_inactiveV1GChargers = new ArrayList(); -List c_inactiveV2GChargers = new ArrayList(); - -for (GridConnection gc : energyModel.f_getActiveGridConnections()) { - for (J_EACharger charger : gc.c_chargers) { - if (charger.V1GCapable) { - c_orderedV1GChargers.add(0, charger); - } - else { - c_orderedV1GChargers.add(charger); - } - if (charger.V2GCapable) { - c_orderedV2GChargers.add(0, charger); - } - else { - c_orderedV2GChargers.add(charger); - } - } -} - -for (GridConnection gc : energyModel.f_getPausedGridConnections()) { - for (J_EACharger charger : gc.c_chargers) { - if (charger.V1GCapable) { - c_inactiveV1GChargers.add(0, charger); - } - else { - c_inactiveV1GChargers.add(charger); - } - if (charger.V2GCapable) { - c_inactiveV2GChargers.add(0, charger); - } - else { - c_inactiveV2GChargers.add(charger); - } - } -} - -c_orderedV1GChargers.addAll( c_inactiveV1GChargers ); -c_orderedV2GChargers.addAll( c_inactiveV2GChargers ); - -for (GCPublicCharger gc : energyModel.PublicChargers) { - if ( !gc.p_isChargingCentre ) { - c_orderedPublicChargers.add(gc); - } -} - -Collections.shuffle(c_orderedPublicChargers);]]> - - - VOID - - 1750078798174 - - 14101630 - - false - true - true - legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setParkingSpaceLegendItem(activeParkingSpaceType, legendShapes.getFirst(), legendShapes.getSecond()); - } - } - else{ - numberOfSpecialActiveGISObjectTypes ++; - Pair legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setSpecialGISObjectLegendItem(activeSpecialGISObjectType, legendShapes.getFirst(), legendShapes.getSecond()); - } -}]]> - - - VOID - - 1750261221085 - - 501660 - - false - true - true - - - - VOID - - 1750079113839 - - 14301670 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1750080865693 - - 13901550 - - false - true - true - - - - VOID - - 1750089851073 - - 14301690 - - false - true - true - - - - - - - - - - - - - - - - RETURNS_VALUE - ]]> - 1750092444018 - - 14301650 - - false - true - true - - - - - - - - VOID - - 1750162397332 - - 14101570 - - false - true - true - legendShapes = f_getNextDefaultLegendShapes(numberOfDefaultActiveGISObjectTypes); - f_setDefaultGISBuildingLegendItem(activeDefaultGISBuildingType, legendShapes.getFirst(), legendShapes.getSecond()); -}]]> - - - RETURNS_VALUE - ]]> - 1750162514744 - - 14301610 - - false - true - true - - - - - - - - VOID - - 1750165143690 - - 14301590 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1750333147816 - - 85-620 - - false - true - true - (); -c_orderedVehiclesPrivateParking = new ArrayList(); - -for (GCHouse house : energyModel.Houses) { - if (!house.p_eigenOprit) { - c_orderedActiveVehiclesPublicParking.addAll(house.c_dieselVehicles); - } - else { - c_orderedVehiclesPrivateParking.addAll(house.c_vehicleAssets); - } -} - -Collections.shuffle(c_orderedActiveVehiclesPublicParking); -Collections.shuffle(c_orderedVehiclesPrivateParking); -]]> - - - VOID - - 1750340574107 - - 400-340 - - false - true - true - x.v_liveAssetsMetaData.hasPV); -double pv_pct = 100.0 * nbHousesWithPV / nbHouses; -uI_Tabs.pop_tabElectricity.get(0).sl_householdPVResidentialArea_pct.setValue(pv_pct, false); - -if ( nbHousesWithPV != 0 ) { - int nbHousesWithHomeBattery = count(energyModel.Houses, x -> x.v_liveAssetsMetaData.hasPV && x.p_batteryAsset != null); - double battery_pct = 100.0 * nbHousesWithHomeBattery / nbHousesWithPV; - uI_Tabs.pop_tabElectricity.get(0).sl_householdBatteriesResidentialArea_pct.setValue(battery_pct, false); -} - -int nbHousesWithElectricCooking = count(energyModel.Houses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); -double cooking_pct = 100.0 * nbHousesWithElectricCooking / nbHouses; -uI_Tabs.pop_tabElectricity.get(0).sl_householdElectricCookingResidentialArea_pct.setValue(cooking_pct, false); - -if (c_orderedVehiclesPrivateParking.size() > 0) { - int nbPrivateEVs = count(c_orderedVehiclesPrivateParking, x -> x instanceof J_EAEV); - double privateEVs_pct = 100.0 * nbPrivateEVs / c_orderedVehiclesPrivateParking.size(); - uI_Tabs.pop_tabElectricity.get(0).sl_privateEVsResidentialArea_pct.setValue(privateEVs_pct, false); -} - -if (c_orderedPublicChargers.size() > 0) { - int nbPublicChargers = c_orderedPublicChargers.size(); - int nbActivePublicChargers = count(c_orderedPublicChargers, x -> x.v_isActive); - double activePublicChargers_pct = 100.0 * nbActivePublicChargers / c_orderedPublicChargers.size(); - uI_Tabs.pop_tabElectricity.get(0).sl_publicChargersResidentialArea_pct.setValue(activePublicChargers_pct, false); - if (c_orderedActiveVehiclesPublicParking.size() > 0) { - // Put some of the diesel cars into the non active vehicles - int nbCarsPerCharger = energyModel.avgc_data.p_avgEVsPerPublicCharger; - List cars = new ArrayList<>(c_orderedActiveVehiclesPublicParking.subList(0, nbActivePublicChargers * nbCarsPerCharger)); - for (J_EADieselVehicle car : cars) { - c_orderedActiveVehiclesPublicParking.remove(car); - c_orderedNonActiveVehiclesPublicParking.add(0, car); - car.removeEnergyAsset(); - } - } - int nbV1GChargers = count(c_orderedV1GChargers, x -> x.V1GCapable); - int nbV2GChargers =count(c_orderedV2GChargers, x -> x.V2GCapable); - double V1G_pct = 100.0 * nbV1GChargers / nbPublicChargers; - double V2G_pct = 100.0 * nbV2GChargers / nbPublicChargers; - uI_Tabs.pop_tabElectricity.get(0).sl_chargersThatSupportV1G_pct.setValue(V1G_pct, false); - uI_Tabs.pop_tabElectricity.get(0).sl_chargersThatSupportV2G_pct.setValue(V2G_pct, false); -} - - -double averageNeighbourhoodBatterySize_kWh = 0; -for (GCGridBattery gc : energyModel.GridBatteries) { - averageNeighbourhoodBatterySize_kWh += gc.p_batteryAsset.getStorageCapacity_kWh(); -} -averageNeighbourhoodBatterySize_kWh /= energyModel.GridBatteries.size(); -uI_Tabs.pop_tabElectricity.get(0).sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, false); -]]> - - - VOID - - 1752756002220 - - 19601820 - - false - true - true - - - - - 0) { - double maxLoad_fr_gis_object = 0; - boolean capacityKnown = false; - - for(GridConnection gc : gis_area.c_containedGridConnections){ - if(gc.v_rapidRunData != null){ - double maxLoad_fr_gc = 0; - double maxLoad_fr_gc_delivery = gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown ? gc.v_rapidRunData.getPeakDelivery_kW()/gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW : 0; - double maxLoad_fr_gc_feedin = gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown ? gc.v_rapidRunData.getPeakFeedin_kW()/gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr_gc = maxLoad_fr_gc_delivery; - - if(gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - break; - case 1: - maxLoad_fr_gc = maxLoad_fr_gc_feedin; - if(gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - case 2: - maxLoad_fr_gc = max(maxLoad_fr_gc_delivery, maxLoad_fr_gc_feedin); - if(maxLoad_fr_gc_delivery > maxLoad_fr_gc_feedin && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - else if(maxLoad_fr_gc_feedin > maxLoad_fr_gc_delivery && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - } - if(maxLoad_fr_gc > maxLoad_fr_gis_object){ - maxLoad_fr_gis_object = maxLoad_fr_gc; - } - } - } - - //Set colour based on found parameters - if(!capacityKnown && p_selectedProjectType != RESIDENTIAL){ - gis_area.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr_gis_object > 1) { - gis_area.gisRegion.setFillColor(v_gridNodeColorCongested); - gis_area.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr_gis_object > 0.7) { - gis_area.gisRegion.setFillColor(v_gridNodeColorStrained); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gis_area.gisRegion.setFillColor(v_gridNodeColorUncongested); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } -}]]> - - - VOID - - 1752756016324 - - 19601840 - - false - true - true - - - - - - - - - 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(0))/gn.p_capacity_kW : 0; - double maxLoad_fr_feedin = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(loadCurves.ds_loadDurationCurveTotal_kW.size()-1))/gn.p_capacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr = maxLoad_fr_delivery; - break; - case 1: - maxLoad_fr = maxLoad_fr_feedin; - break; - case 2: - maxLoad_fr = max(maxLoad_fr_delivery, maxLoad_fr_feedin); - break; - } - } - - if(!isLiveSim && !gn.p_realCapacityAvailable && p_selectedProjectType != RESIDENTIAL){ - gn.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gn.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr > 1) { - gn.gisRegion.setFillColor(v_gridNodeColorCongested); - gn.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr > 0.7) { - gn.gisRegion.setFillColor(v_gridNodeColorStrained); - gn.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gn.gisRegion.setFillColor(v_gridNodeColorUncongested); - gn.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } - - if( gn == v_clickedGridNode && gn != v_previousClickedGridNode){ // dit zorgt ervoor dat de kleuringfunctie correct werkt in zowel live stand als pauze stand - gn.gisRegion.setFillColor( v_selectionColor ); - gn.gisRegion.setLineColor( orange ); - } -}]]> - - - VOID - - 1752836715726 - - 501220 - - false - true - true - (c_selectedObjects); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); -]]> - - - VOID - - 1752837115143 - - -650490 - - false - true - true - - - - - - - - VOID - - 1753085860778 - - 19201450 - - false - true - true - 0){ - c_loadedMapOverlayTypes = new ArrayList(settings.activeMapOverlayTypes()); - if(!c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.DEFAULT)){ - c_loadedMapOverlayTypes.add(0, OL_MapOverlayTypes.DEFAULT); // Force default to be available - } -} -else{//Take the default - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.DEFAULT); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.ELECTRICITY_CONSUMPTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PV_PRODUCTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.GRID_NEIGHBOURS); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.CONGESTION); -} - - -//Adjust the visualisation of the radiobuttons -Presentable presentable = getExperimentHost().getPresentable(); -boolean ispublic = true; -double x = 756; -double y = 837; -double width = 130; -double height = 0;//Not needed, automatically adjust by adding options -Color textColor = Color.BLACK; -boolean enabled = true; -Font font = new Font("Dialog", Font.PLAIN, 11); -boolean vertical = true; - - -//Set words for the radiobutton options -List RadioButtonOptions_list = new ArrayList(); -for(OL_MapOverlayTypes mapOverlayType : c_loadedMapOverlayTypes){ - switch(mapOverlayType){ - case DEFAULT: - RadioButtonOptions_list.add("Standaard"); - break; - case ELECTRICITY_CONSUMPTION: - RadioButtonOptions_list.add("Elektriciteitsverbruik"); - break; - case PV_PRODUCTION: - RadioButtonOptions_list.add("PV Opwek"); - break; - case GRID_NEIGHBOURS: - RadioButtonOptions_list.add("Energie Buren"); - break; - case CONGESTION: - RadioButtonOptions_list.add("Netbelasting"); - break; - } -} - -String[] RadioButtonOptions = RadioButtonOptions_list.toArray(String[]::new); - -//Create the radiobutton and set the correct action. -rb_mapOverlay = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ - @Override - public void action() { - f_setMapOverlay(); - } -}; - -presentation.add(rb_mapOverlay);]]> - - - VOID - - 1753096794863 - - 19201540 - - false - true - true - - - - VOID - - 1753097345978 - - 19401590 - - false - true - true - - - - VOID - - 1753097409446 - - 19401660 - - false - true - true - - - - VOID - - 1753097484078 - - 19401730 - - false - true - true - - - - VOID - - 1753097518541 - - 19401800 - - false - true - true - - - - VOID - - 1753097561639 - - 19401565 - - false - true - true - - - - VOID - - 1753108764992 - - true - 19401870 - - false - true - true - - - - - - 1744624088854 - - -555-365 - - false - true - true - - - - - false - true - true - - - - - 1658477103135 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1708522361909 - - -240460 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089963 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1709049456144 - - -240580 - - false - true - true - - - - - - - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - - - - - - - - - - EMPTY - - 1658477089962 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1716193013122 - - -670611 - - false - true - true - 1716193014596 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - ARRAY_LIST_BASED - XYZ - - - - - - - - - - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089961 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1717506326727 - - -240530 - - false - true - true - - - - - - - - - - - - - - - - - - - - true - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - - - - - - - - - - EMPTY - - 1658477089960 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1722252541830 - - -670711 - - false - true - true - 1722252542596 - - - - - - - - - - - - - - false - - - - ARRAY_LIST_BASED - XYZ - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089959 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - - - 1658477103139 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1701947860073 - - -600-200 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 6000 - 2400 - 0.0 - -1 - null - - - 1701952231399 - - 40085 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 675 - 0.0 - -3092235 - - null - - - 1724074923402 - - 940-10 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074975224 - - 500-70 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 260 - 160 - 0.0 - 682673374 - - null - - - 1724074975226 - - 760-70 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 240 - 160 - 0.0 - 682673374 - - null - - - 1724074975228 - - 62520 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 130.345 - 60 - 0.0 - - - - - - - false - - - 1724074975230 - - 1000-70 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 200 - 160 - 0.0 - 682673374 - - null - - - 1724074980256 - - -1120-70 - - true - false - false - true - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 1620 - 160 - 0.0 - 682673374 - - null - - - 1724074980258 - - 400-70 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 360 - 160 - 0.0 - 682673374 - - null - - - 1724074980260 - - 760-70 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 240 - 160 - 0.0 - 682673374 - - null - - - 1724074980262 - - true - 1020-630 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 200 - 160 - 0.0 - 682673374 - - null - - - 1724074987235 - - 41020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 205.802 - 60 - 0.0 - - - - - - - - - - - false - - - - - - 1665052211228 - - -7000 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 680 - 970 - 0.0 - -1 - null - - - 1705481955546 - - -270820 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 250 - 150 - 0.0 - -1 - null - - - 1665052603927 - - -7000 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 169 - 40 - 0.0 - -1 - null - - - 1665052191319 - - -6405 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16744448 - - - SansSerif - 18 - - - LEFT - - - 1690205003572 - - -230850 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 170 - 0 - 0 - - - 1690205003577 - - -151830 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - CENTER - - - 1690975123923 - - 42054 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 16 - - - LEFT - - - 1696520897545 - - 18401080 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1696520897547 - - -100-30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 360 - 50 - 0.0 - -1 - - null - 10 - - - 1696520897549 - - -89-14 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1696520897551 - - 2205 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 20 - 20 - 270.0 - - - - - - - false - - - - - - 1696520897606 - - 1330680 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1696520897608 - - -2.5319999999999965-20.114000000000004 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.53 - 40 - -179.1999969482422 - 178.1999969482422 - -13882324 - null - - - 1696520897610 - - -2.4830000000000048.137 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.483 - 40 - 1.2000000476837158 - 178.1999969482422 - -13882324 - null - - - 1696520897612 - - -20-20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 35 - 28 - 0.0 - -13882324 - null - - - 1696520897614 - - -16-5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 1 - 0 - 1 - 0 - 27 - 0 - 0 - - - 1696520897616 - - -9-21 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - 0 - 0 - - - 1696520897618 - - -3-27 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 12 - 0 - - - 1696520897620 - - -108 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 15 - 0 - 0 - - - 1696520897622 - - -20-35 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - 1696520897624 - - -20-5 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - - - - 1696837759915 - - 3801020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1701951640330 - - 910880 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1701951640332 - - -510-100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 200 - 0.0 - -3092235 - - null - - - 1701951640336 - - -500-84 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - DOTTED - 1000 - 172 - 0.0 - -1 - null - - - 1701951640338 - - -470-100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - Calibri - 18 - - - LEFT - - - 1701951640396 - - -165-70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074247375 - - -10-70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074154126 - - -3405 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074154148 - - -60-79 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 16 - - - LEFT - - - 1724074154158 - - -120-59 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 271 - 0 - 0 - - - 1724074839746 - - -75-19 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074853961 - - -5540 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - - - null - - 000 - 10-140 - 2000 - 000 - - false - - - 1724074853963 - - -2525 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074853967 - - -55-7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - - - null - - 000 - 10-140 - 2000 - 000 - - false - - - 1724074853969 - - -25-21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074853971 - - -5515 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - - null - SOLID - 1 - 0 - 1 - 0 - - - null - - 000 - 10-140 - 2000 - 000 - - false - - - 1724074853973 - - -252 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - - - - 1724074839748 - - 755 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1724074864095 - - true - -1515 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074864097 - - true - -4025 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -16776961 - - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870571 - - -15-50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074870573 - - -15-25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074870575 - - -40-15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -6737204 - - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870577 - - -40-40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -12156236 - - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074875518 - - true - -15-2.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1724074875520 - - true - -355 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 5.75 - 40 - 0.0 - -1 - - null - - - - - - - - - 1724074493431 - - 8010 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074500599 - - 50-84 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 16 - - - LEFT - - - 1724074502826 - - 380-64 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - -458 - 0 - 0 - - - 1724074508882 - - -1800 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074508886 - - 4-71 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 11 - - - CENTER - - - - - - - - - - - - 1696863329245 - - 401020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1702552223737 - - -680321 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1704210756310 - - 370220 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1713259123999 - - 40-131 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 555 - 20 - 0.0 - -1250053 - null - - - 1701879145306 - - 321-130 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 12 - - - CENTER - - - - - - 1705663500141 - - 6801030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1705663820235 - - 10221030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1705664522164 - - 6801250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1705667994053 - - 13001180 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1706004011983 - - 13001030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - false - 1706892985870 - - 15301040 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - false - 1706991281439 - - 15301080 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - false - 1708522580070 - - 114087 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 1){ - GridConnection selectedGC = findFirst(companyUI.c_ownedGridConnections, GC -> GC == c_selectedGridConnections.get(0)); - companyUI.GCnr_selection.setValue(companyUI.c_ownedGridConnections.indexOf(selectedGC), true); - } - else{ - companyUI.uI_Results.f_setAllCharts(); - companyUI.f_getNFATOValues(); - } - - //This check should be done AFTER the uiResults has been copied. - if(!b_resultsUpToDate){ - companyUI.f_setSimulateYearScreen(); - } - else{ - companyUI.gr_simulateYearScreen.setVisible(false); - } - - //Go to the companyUI view - c_companyUIs.get(v_connectionOwnerIndexNr).va_companyUI.navigateTo(); - break; - - case ELECTROLYSER: - ui_Hydrogen.get(0).va_hydrogenUI.navigateTo(); - break; - - case BATTERY: - ui_Battery.get(0).va_batteryUI.navigateTo(); - break; - - case SOLARFARM: - case WINDFARM: - case CHARGER: - default: - break; -} -]]> - - - - - - - - 1708595212229 - - -290390 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1709718299887 - - -0.66798.667 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1644806 - null - DOTTED - 400 - 186 - 0.0 - -385875969 - null - - - false - 1709718299889 - - 19.333144.667 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - VERTICAL - - - - - - false - - - - 1709718299891 - - 19.333118.667 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 20 - - - LEFT - - - 1709718299897 - - 199.333374.667 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1709718299899 - - -200-80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1644806 - null - DOTTED - 400 - 160 - 0.0 - -385875969 - null - - - 1709718299901 - - 0.667-24.667 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 11 - - - CENTER - - - 1709718299903 - - 0-50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 16 - - - CENTER - - - - - - 1710174312959 - - -680581 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1713429772427 - - -290290 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1713431901010 - - -680180 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1715951689412 - - -68050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1716419413991 - - -520-160 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 260 - 120 - 0.0 - -1 - null - - - 1716419425042 - - -500-150 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - false - 1716988295617 - - -240760 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1719217632486 - - 50-720 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 220 - 0 - 0 - - - 1719217632488 - - 60-750 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - LEFT - - - 1719829894799 - - 123617 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - - - - Cambria - 10 - - - RIGHT - - - 1719829988146 - - 123642 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - - - - Cambria - 10 - - - RIGHT - - - 1719829993001 - - 123667 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - - - - Cambria - 10 - - - RIGHT - - - 1719847144211 - - 124512 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532916 - true - 1719907200000 - - - - - - - - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - - - FIXED - true - LINEAR - - <![CDATA[Title]]> - 1719847144208 - - -16776961 - - true - NONE - 1.0 - - 96 - - true - HH_mm - - - 1719848137592 - - 124538 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532918 - true - 1719907200000 - - - - - - - - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - - - FIXED - true - LINEAR - - <![CDATA[Title]]> - 1719848137589 - - -10496 - - true - NONE - 1.0 - - 96 - - true - HH_mm - - - 1720909739871 - - 104055 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - false - 1720904897811 - - -6532 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - (); - - if(v_customEnergyCoop != null){ - energyModel.f_removeEnergyCoop(v_customEnergyCoop); - v_customEnergyCoop = null; - } - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - /* - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - */ - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -}]]> - - - - - - - - false - 1720904921271 - - -6553 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 0]]> - 0){ - c_selectedGridConnections = new ArrayList<>(); - v_selectedGridConnectionIndex -= 1; - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -} - - -]]> - - - - - - - - 1720908988631 - - -36057 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - 0 && c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).p_owner.p_detailedCompany ? -"Je kijkt naar: " + c_selectedGridConnections.get(0).p_ownerID + ", " + c_selectedGridConnections.get(0).p_address.getAddress() -: -v_selectedGridConnectionIndex > 0 ? -"Je kijkt naar het " + (v_selectedGridConnectionIndex ) + "e adres in het geselecteerde pand" -: -"Je kijkt naar de som van alle " + v_nbGridConnectionsInSelectedBuilding + " addressen in dit pand"]]> - - SansSerif - 11 - - - CENTER - - - - - - 1721819768547 - - 18801400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -10496 - null - SOLID - 630 - 540 - 0.0 - -1 - null - - - 1721819794985 - - 19001410 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1722252542596 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.51902183517265 - 6.169494834925871 - - - 1696520906125 - - 1290-130 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1696520906127 - - -70-20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 200 - 30 - 0.0 - -1 - - null - 10 - - - 1696520906129 - - -59-14 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1696520906131 - - 95-15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1724419174775 - - -10600 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 299.107 - 330 - 0.0 - -1 - null - - - 1724419379552 - - -104020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - false - 1725017697644 - - 20460 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - true - b_showCables - - - - 1725020138710 - - 410130 - - true - true - false - true - SHAPE_DRAW_2D3D - 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -}]]> - false - 1000 - 620 - 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -}]]> - - - 52.539123187983904 - 6.173604854475837 - 25000 - -4144960 - -1 - true - ANYLOGIC - false - - WEB_SERVICE - CREATE_STRAIGHT_LINE - ANYLOGIC - CAR - FASTEST - DIJKSTRABI - false - - - - - true - 1000 - - - - - 1725456122345 - - -680681 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1725525689286 - - -29060 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1730113808401 - - 1440230 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1716193014596 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.52173648990926 - 6.109451573117503 - - - - - - 1709717180367 - - 2185175 - - true - false - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1709717180369 - - -230-90 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DASHED - 460 - 180 - 0.0 - -1 - - null - - - 1709717180371 - - 1050 - - true - true - false - SHAPE_DRAW_2D3D - { - //Run rapid run - energyModel.f_runRapidSimulation(); - - //After rapid run: remove loading screen - gr_loadIconSmall.setVisible(false); - - if (c_selectedGridConnections.size() == 0){//Update main area collection - uI_Results.f_updateResultsUI(energyModel); - } - else if (c_selectedGridConnections.size() == 1){//Update selected GC area collection - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else if(c_selectedGridConnections.size() > 1){//Update COOP area collection - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - - //Update and show kpi summary chart after run - if(settings.showKPISummary() != null && settings.showKPISummary() && v_clickedObjectType != OL_GISObjectType.GRIDNODE){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Enable radio buttons again - uI_Results.f_enableNonLivePlotRadioButtons(true); - c_companyUIs.forEach(companyUI -> companyUI.uI_Results.f_enableNonLivePlotRadioButtons(true)); - - b_resultsUpToDate = true; -}).start(); - - -]]> - false - 0 - 0.0 - - - - 1709717180373 - - 10-60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - CENTER - - - 1709717180375 - - -200-75 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - - - - - false - - - - - - - - - 1709717180404 - - 1659135 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1709717180406 - - -219-50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - - null - DASHED - 460 - 250 - 0.0 - -369756683 - null - - - 1709717180408 - - -3060 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - - - - - false - - - 1709717180410 - - 015 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - CENTER - - - - - - 1731938214224 - - 17205 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 190 - 70 - 0.0 - - - - - - - false - - - 1734442437753 - - -15000 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 540 - 0.0 - -1 - null - - - 1734443343976 - - 3901330 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1734443865835 - - -146020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - false - 1734444497900 - - 20480 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - true - - - - - - - false - - - - 1736425024523 - - 402120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1736425024525 - - 402220 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1736425024527 - - 402040 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1736425024529 - - 202020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 470 - 290 - 0.0 - -1 - null - - - 1736425024521 - - 1752020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 100 - 30 - 0.0 - -1 - null - - - 1736425024519 - - 1902020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 22 - - - LEFT - - - false - 1740670519131 - - -680920 - - false - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - false - - - - - - true - uI_Results.b_showGroupContractValues - - - - 1742296970246 - - 1080-1480 - - true - false - false - true - SHAPE_DRAW_2D3D - - - - false - 0 - 0.0 - - - - 1742297070582 - - -960-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 410 - 980 - 0.0 - 16777215 - null - - - 1742297242137 - - -550-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 1000 - 130 - 0.0 - 16777215 - null - - - 1742297244098 - - -550250 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 1000 - 230 - 0.0 - 16777215 - null - - - 1742297246008 - - 450-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 510 - 980 - 0.0 - 16777215 - null - - - 1742296784951 - - -960-620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 410 - 1200 - 0.0 - -1765752640 - - null - - - 1742296859875 - - -550-620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 250 - 0.0 - -1765752640 - - null - - - 1742296941081 - - -550250 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 330 - 0.0 - -1765752640 - - null - - - 1742296952388 - - 450-620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 510 - 1200 - 0.0 - -1765752640 - - null - - - 1742300401759 - - -550-480 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 1000 - 90 - 0.0 - -1 - null - 10 - - - 1742300418297 - - -50-465 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 48 - - - CENTER - - - false - 1743093754142 - - 230-470 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - - true - - - - - - - - - - - - - 1734444441402 - - -1350740 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1734443987142 - - -150-180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 350 - 350 - 0.0 - -1 - null - - - 1734443492902 - - -130-140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - false - 1734442617547 - - -10-140 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - - - - - - false - - - - - - - - - - false - - - - 1734443541801 - - -130-110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 12 - - - LEFT - - - 1734444104065 - - -130-90 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1734444671650 - - 25-170 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - CENTER - - - false - 1734446701124 - - 40130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1734524446136 - - -130140 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - 1 ? "Meerdere lussen geselecteerd." : "Geen lus geselecteerd."]]> - - SansSerif - 12 - - - LEFT - - - 1737640715642 - - -130117 - - true - true - false - SHAPE_DRAW_2D - - false - 0 - 0.0 - -16777216 - - 1 ? "Meerdere buurten geselecteerd." : "Geen buurt geselecteerd."]]> - - SansSerif - 12 - - - LEFT - - - false - 1742227694564 - - 4085 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - - false - 1743092954558 - - 4050 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - - - - - - 1736337963311 - - 4360520 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1736344526647 - - -960-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1736443451929 - - -960-500 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -2049715245 - - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - - null - - - 1747320252784 - - -270-120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1736337707551 - - 0-70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 24 - - - CENTER - - - 1736338014404 - - 050 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1736338014406 - - -60-20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1736338014408 - - 0-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - CENTER - - - - - - - - - 1742482935391 - - -440-1860 - - true - false - false - true - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1742482847835 - - -200-240 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - -1 - - null - - - 1742482890780 - - -200-240 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - 16777215 - null - - - - - - 1744624088806 - - -410-730 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1744624088808 - - -190-120 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 450 - 530 - 0.0 - -1 - null - - - false - 1744624088810 - - -156-30 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - - - - - <![CDATA[Klik om kwartierwaarden excel te downloaden (Totaal gebied)]]> - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088812 - - -156-70 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - - - - - 1744624088814 - - -150-100 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - false - 1744624088816 - - -156170 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 0 && c_selectedGridConnections.size()< p_maxNrSelectedGCForExport + 1]]> - - - - - - - - - false - 1744624088818 - - -156210 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - - - - - <![CDATA[Klik om kwartierwaarden excel te downloaden (Geselecteerde bedrijven)]]> - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088820 - - -15690 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - - - - - <![CDATA[Klik om kwartierwaarden excel te downloaden (Totaal geselecteerde COOP)]]> - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088822 - - -15650 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - 1 && v_customEnergyCoop != null]]> - - - - - - - - - - - - 1745935981029 - - -680840 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1746110300955 - - -19600 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 350 - 0.0 - -1 - null - - - 1746110305368 - - -193030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1746187848442 - - 460-2160 - - true - true - false - SHAPE_DRAW_2D3D - - - - false - 0 - 0.0 - - - - 1746027175818 - - -20-20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -65536 - - - SansSerif - 24 - - - CENTER - - - 1746187821228 - - 304-14 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - 1750078687228 - - 13601400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -65536 - null - SOLID - 470 - 310 - 0.0 - -1 - null - - - 1750078716831 - - 13801420 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 18 - - - LEFT - - - 1750161603547 - - 1350880 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1724074583633 - - -180-40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1724074583635 - - -150-40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750079302589 - - -180-20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079302591 - - -150-20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750079303790 - - -1800 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079303792 - - -1500 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750079304863 - - -18020 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079304865 - - -15020 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750079305949 - - -18040 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079305951 - - -15040 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750079521906 - - -18060 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079521908 - - -15060 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750092915668 - - 0-70 - - true - true - false - SHAPE_DRAW_2D - - - false - 0 - 0.0 - -14774017 - - - SansSerif - 10 - - - LEFT - - - 1750093126455 - - 140980 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1750093048056 - - -100-100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 200 - 200 - 0.0 - -1644806 - - null - - - 1750092986493 - - -115-84 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 205 - 172 - 0.0 - -1 - null - - - 1750093291589 - - -110-40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093291591 - - -80-40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093292693 - - -110-20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093292695 - - -80-20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093293851 - - -1100 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093293853 - - -800 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093295400 - - -11020 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093295402 - - -8020 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093296550 - - -11040 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093296552 - - -8040 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093324907 - - -11060 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093324909 - - -8060 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750093436378 - - -115-54 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 192 - 0 - 0 - - - - - - - - - 1753108914887 - - 26201720 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1724074678970 - - 180-10 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1724074678972 - - -60-52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1724074678974 - - -60-28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -32 - null - - - 1724074678976 - - -60-4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -263774 - null - - - 1724074678978 - - -6020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1063822 - null - - - 1724074678980 - - -6044 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -3318692 - null - - - 1724074678982 - - -20-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1724074678984 - - -20-28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1724074678986 - - -20-3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1724074678988 - - -2021 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1724074678990 - - -2045 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 500 MWh / jaar]]> - 6000 kWh / jaar" : "> 500 MWh / jaar"]]> - - SansSerif - 10 - - - LEFT - - - - - - 1715117660077 - - 1010 - - true - true - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1702041947455 - - -6010 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1702041947457 - - -39.5-47.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1702041947459 - - -39.527.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1702041947461 - - -6035 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1702041947463 - - -39.5-22.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1702041947465 - - -60-40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1702041947467 - - -39.52.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1702041947469 - - -60-15 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1750161778157 - - -39.5-72.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1750161778159 - - -60-65 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - - null - - - - - - 1724074510737 - - 3800 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1724074510739 - - -60-52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1724074510741 - - -60-28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -256 - null - - - 1724074510743 - - -60-4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -10496 - null - - - 1724074510745 - - -20-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1724074510747 - - -20-28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - SansSerif - 10 - - - LEFT - - - 1724074510749 - - -20-3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 100 MWh / jaar]]> - 5000 kWh / jaar" : "> 100 MWh / jaar"]]> - - SansSerif - 10 - - - LEFT - - - - - - 1753109295395 - - 6000 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1753109295397 - - -60-52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753109295399 - - -60-28 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16776961 - null - - - 1753109295401 - - -60-4 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -65536 - null - - - 1753109295403 - - -20-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753109295405 - - -20-28 - - true - true - false - SHAPE_DRAW_2D - 0]]> - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753109295407 - - -20-3 - - true - true - false - SHAPE_DRAW_2D - 1]]> - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753109542896 - - -6020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16711936 - null - - - 1753109545710 - - -2020 - - true - true - false - SHAPE_DRAW_2D - 2]]> - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753109615141 - - -1850 - - true - false - false - SHAPE_DRAW_2D - 4]]> - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - - - - 1752833007769 - - 8000 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - false - 1752831754623 - - -805 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - - - - - VERTICAL - - - - false - - - - 1752832963782 - - -80-10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 11 - - - LEFT - - - 1753112150775 - - -80-55 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753112150777 - - -40-55 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753189107075 - - 60-33 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - 1753189732312 - - -65-25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1753189579677 - - -15-7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -16744448 - null - - - 1753189590812 - - -7-7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 9 - 15 - 0.0 - -23296 - null - - - 1753189664328 - - 2-7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -65536 - null - - - - - - 1753189690263 - - -40-30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1753190036395 - - -5-12 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 20 - 20 - 0.0 - - - - - - - false - - - - - - - - - 1724074510751 - - true - 28001890 - - true - false - false - SHAPE_DRAW_2D3D - - - false - 0 - 0.0 - - - - 1724074510753 - - -60-52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - 1694498815 - null - - - 1724074510755 - - -60-28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - 1928724474 - null - - - 1724074510757 - - -60-4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - 1692204540 - null - - - 1724074510759 - - -6020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - 1637870836 - null - - - 1724074510761 - - -6044 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - 1766972398 - null - - - 1724074510763 - - -20-51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1724074510765 - - -20-28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1724074510767 - - -20-3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1724074510769 - - -2021 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 10 - - - LEFT - - - 1724074510771 - - -2045 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 6000 kWh / jaar]]> - - SansSerif - 10 - - - LEFT - - - - - - 1752231354833 - - -290140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1746110287596 - - -2150360 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1746110662246 - - 00 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 620 - 170 - 0.0 - -1 - null - 10 - - - 1746110287600 - - 60020 - - true - true - false - SHAPE_DRAW_2D3D - - false - 0 - 0.0 - - - - 1746110287602 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 12 - 40 - 0.0 - -12566464 - null - - - 1746110287604 - - -66 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - -12 - 0 - - - 1746110287606 - - 66 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - -12 - -12 - 0 - - - - - - 1746110287608 - - 2020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - Calibri - 18 - - - LEFT - - - 1746110287610 - - 2050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - - - - 1699290897134 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - - - 1696520909213 - - 00 - - false - true - false - <![CDATA[]]> - 1920 - 980 - - - - - - - 1726584205735 - - - false - - 1726584205730 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - GIS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - false - 1658477089958 - true - 1658563200000 - - - - - - - - - - - 1726584205731 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1726584205903 - 1726584206083 - - - 1726584205883 - - 1480170 - - false - true - true - - - - - - 1726584205885 - - 1480190 - - false - true - true - - - - - - - - - 1726584205887 - - true - 1480100 - - false - true - true - - - - - - - - - 1726584205889 - - 1480390 - - false - true - true - - - - - - 1726584205891 - - - 1481261 - - false - true - true - - - - - - 1726584205893 - - 1481241 - - false - true - true - - - - - - 1726584205895 - - 1481301 - - false - true - true - - - - - - 1726584205897 - - - 1481281 - - false - true - true - - - - - - - - - 1726584205899 - - 1481371 - - false - true - true - - - - - - 1727683925084 - - 1480420 - - false - true - true - - - - - - - - - 1733235094633 - - 1480220 - - false - true - true - - - - - - 1733389557748 - - - 1480119 - - false - true - true - - - - - - - - - 1733390702422 - - 1480138 - - false - true - true - - - - - - - - - 1736255870137 - - 1480350 - - false - true - true - - - - - - 1737972861302 - - -370395 - - false - true - true - - ]]> - - - - 1726584206064 - - 30920 - - false - true - true - - - - false - - 1726584206062 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584206070 - - -370280 - - false - true - true - - - - false - - 1726584206068 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584206073 - - - -370230 - - false - true - true - - - - false - - 1726584206071 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584206076 - - - -370250 - - false - true - true - - - - false - - 1726584206074 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584206079 - - -370210 - - false - false - true - - - - false - - 1726584206077 - TEXT_BOX - - - NO_DELIMETER - - - - - 1726584205737 - - 1480450 - - false - true - true - - - - - - - - - 1726584205739 - - -370415 - - false - true - true - - - - - - - - - 1726584205741 - - -370360 - - false - true - true - - - - - - - - - 1726584205743 - - -380910 - - false - true - true - - - - - - - - - 1726584205745 - - -370435 - - false - true - true - - - - - - - - - 1726584205747 - - -370482 - - false - true - true - - - - - - - - - 1726584205749 - - -370502 - - false - true - true - - - - - - - - - 1726584205751 - - -370521 - - false - true - true - - - - - - - - - 1726584205753 - - -370540 - - false - true - true - - - - - - - - - 1726584205755 - - -370650 - - false - true - true - - - - - - - - - 1726584205757 - - -370590 - - false - true - true - - - - - - - - - 1726584205759 - - -370455 - - false - true - true - - - - - - - - - 1726584205763 - - -370560 - - false - true - true - - - - - - - - - 1726584205765 - - -370630 - - false - true - true - - - - - - - - - 1737744140895 - - -380930 - - false - true - true - - - - - - - - - 1748944117397 - - -370300 - - false - true - true - - - - - - - - - 1749631164240 - - 1480490 - - false - true - true - - - - - - - - - 1749649688266 - - -370320 - - false - true - true - - - - - - - - - 1749738339329 - - -370610 - - false - true - true - - - - - - - - - - - VOID - - 1726584205769 - - - 806.739619 - - false - true - true - - - - VOID - - 1726584205771 - - 90220 - - false - true - true - - - - VOID - - 1726584205773 - - - 79161 - - false - true - true - - - - VOID - - 1726584205775 - - 50530 - - false - true - true - p.p_actorID.equals(project_data.grid_operator())) ; - -for (GridNode_data GN_data : c_gridNode_data) { - // if no scope selected, or if node has 'all scopes' in input file or if the node specific scope is selected (exists in the arrayList) - if( settings.subscopesToSimulate() == null || settings.subscopesToSimulate().isEmpty() || GN_data.subscope() == null || settings.subscopesToSimulate().indexOf(GN_data.subscope()) > -1 ){ - if (GN_data.status()) { - GridNode GN = energyModel.add_pop_gridNodes(); - GN.p_gridNodeID = GN_data.gridnode_id(); - c_gridNodeIDsInScope.add(GN.p_gridNodeID); - - // Check wether transformer capacity is known or estimated - GN.p_capacity_kW = GN_data.capacity_kw(); - GN.p_originalCapacity_kW = GN.p_capacity_kW; - GN.p_realCapacityAvailable = GN_data.is_capacity_available(); - - // Basic GN information - //GN.p_nodeStatus = GN_data.status(); - GN.p_description = GN_data.description(); - String nodeTypeString = GN_data.type(); - - // Connect - GN.p_parentNodeID = GN_data.parent_node_id(); // Needs to be manually defined in the excel file of the nodes! - GN.p_ownerGridOperator = Grid_Operator; - - //Define node type - switch (nodeTypeString) { - case "LVLV": - GN.p_nodeType = OL_GridNodeType.LVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "MVLV": - GN.p_nodeType = OL_GridNodeType.MVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "SUBMV": - GN.p_nodeType = OL_GridNodeType.SUBMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - zero_Interface.b_gridLoopsAreDefined = true; - break; - case "MVMV": - GN.p_nodeType = OL_GridNodeType.MVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "HVMV": - GN.p_nodeType = OL_GridNodeType.HVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - default: - traceln("There is a gridnode in your input file with an incorrect node type"); - break; - } - - //Define GN location - GN.p_latitude = GN_data.latitude(); - GN.p_longitude = GN_data.longitude(); - GN.setLatLon(GN.p_latitude, GN.p_longitude); - - //Create gis region - GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); - zero_Interface.f_styleGridNodes(GN); - - //Grid operator nodes - Grid_Operator.c_electricityGridNodes.add(GN); - - - //Gridnode service area - if (GN_data.service_area_polygon() != null){ - //Create service area gis object - //GIS_Object serviceArea = f_createGISObject(GN.p_gridNodeID + ": service area", GN.p_latitude, GN.p_longitude, GN_data.service_area_polygon()); - GISRegion serviceArea = zero_Interface.f_createGISObject(f_createGISObjectsTokens(GN_data.service_area_polygon(), OL_GISObjectType.GN_SERVICE_AREA)); - - //Add to hashmap - zero_Interface.c_GISNetplanes.add( serviceArea ); - } - - //Gridnode profile - if(GN_data.profile_data_kWh() != null){ - f_addGridNodeProfile(GN, GN_data.profile_data_kWh()); - } - } - } -} - -]]> - - - RETURNS_VALUE - - 1726584205777 - - 825.241700 - - false - true - true - - - - - - - - - - - - VOID - - 1726584205779 - - - -39090 - - false - true - true - databaseNames = project_data.databaseNames(); - - //Get the model database - ModelDatabase modelDB = getEngine().getModelDatabase(); - - //Loop over all databases - for(String[] databaseName : databaseNames){ - - //Create the file path string - String filePathString = "data_" + project_data.project_name() + "/" + databaseName[0] + "_" + project_data.project_name() + ".xlsx"; - - //If file exists, load it into the database - File f = new File(filePathString); - if(f.exists() && !f.isDirectory()) { - Database myFileDatabase = new Database(this, databaseName[1], filePathString); - modelDB.importFromExternalDB(myFileDatabase.getConnection(), databaseName[1], databaseName[1], true, false); - traceln("Database %s has been updated.", databaseName[1]); - } else { // if file does not exist, clear the database to make sure there are no wrong values in the simulation! - executeStatement("DELETE FROM " + databaseName[1] + " c"); - traceln("File not found, database %s has been cleared!", databaseName[1]); - } - } - - //Overwrite specific database values - f_overwriteSpecificDatabaseValues(); -}]]> - - - VOID - - 1726584205785 - - - 430.001710.001 - - false - true - true - existing_actors = new ArrayList(); -List existing_solarFields = new ArrayList(); - -for (Solarfarm_data dataSolarfarm : f_getSolarfarmsInSubScope(c_solarfarm_data)) { // MOET NOG CHECK OF ZONNEVELD ACTOR AL BESTAAT OP, zo ja --> Zonneveld koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - if (!existing_solarFields.contains( dataSolarfarm.gc_id() )) { - solarpark = energyModel.add_EnergyProductionSites(); - - solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); - solarpark.set_p_name( dataSolarfarm.gc_name() ); - - //Check wether it can be changed using sliders - solarpark.p_isSliderGC = dataSolarfarm.isSliderGC(); - - //Grid Capacity - solarpark.v_liveConnectionMetaData.physicalCapacity_kW = dataSolarfarm.connection_capacity_kw(); - if ( dataSolarfarm.connection_capacity_kw() > 0 ) { - solarpark.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataSolarfarm.contracted_feed_in_capacity_kw() != null) { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.contracted_feed_in_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.connection_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - solarpark.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - solarpark.set_p_ownerID( dataSolarfarm.owner_id() ); - solarpark.set_p_parentNodeElectricID( dataSolarfarm.gridnode_id() ); - - solarpark.v_isActive = dataSolarfarm.initially_active() ; - - //Add EA - f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); - - - if (!existing_actors.contains(solarpark.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( dataSolarfarm.owner_id()); - owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.SOLARFARM_OP ); - owner.b_dataSharingAgreed = true; - existing_actors.add(owner.p_actorID); - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataSolarfarm.owner_id())); - } - - solarpark.set_p_owner( owner ); - - existing_solarFields.add(solarpark.p_gridConnectionID); - } - else { // solarpark and its owner exist already, only create new gis building which is added to the park - solarpark = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataSolarfarm.gc_id()) ); - owner = solarpark.p_owner; - - } - - if (dataSolarfarm.polygon() != null) { - //Create GIS object for the solar park - GIS_Object area = f_createGISObject( dataSolarfarm.gc_name(), dataSolarfarm.latitude(), dataSolarfarm.longitude(), dataSolarfarm.polygon(), OL_GISObjectType.SOLARFARM); - - //Add to collections - area.c_containedGridConnections.add(solarpark); - solarpark.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_solarParkColor ); - area.set_p_defaultLineColor( zero_Interface.v_solarParkLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -} -]]> - - - VOID - - 1726584205787 - - - 430.001850 - - false - true - true - battery koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - ConnectionOwner owner = energyModel.add_pop_connectionOwners(); - GCGridBattery gridbattery = energyModel.add_GridBatteries(); - - //Owner parameters - owner.set_p_actorID( dataBattery.owner_id() ); - owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.BATTERY_OP ); - owner.b_dataSharingAgreed = true; - - //GC parameters - gridbattery.set_p_gridConnectionID( dataBattery.gc_id () ); - gridbattery.set_p_name( dataBattery.gc_name() ); - gridbattery.set_p_ownerID( dataBattery.owner_id() ); - gridbattery.set_p_owner( owner ); - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - - //Check wether it can be changed using sliders - gridbattery.p_isSliderGC = dataBattery.isSliderGC(); - - //Grid Capacity - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - if ( dataBattery.connection_capacity_kw() > 0 ) { - gridbattery.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataBattery.contracted_delivery_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.contracted_delivery_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataBattery.contracted_feed_in_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.contracted_feed_in_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - gridbattery.set_p_parentNodeElectricID( dataBattery.gridnode_id() ); - gridbattery.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - - switch (dataBattery.operation_mode()) { - case PRICE: - gridbattery.p_batteryAlgorithm = new J_BatteryManagementPrice(gridbattery); - break; - case PEAK_SHAVING_PARENT_NODE: - J_BatteryManagementPeakShaving batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals(gridbattery.p_parentNodeElectricID)); - if (gn == null) { - throw new RuntimeException("Could not find GridNode with ID: " + gridbattery.p_parentNodeElectricID + " for GCGridBattery"); - } - batteryAlgorithm.setTarget(gn); - gridbattery.p_batteryAlgorithm = batteryAlgorithm; - break; - case PEAK_SHAVING_COOP: - // target agent is still null, should be set at the moment of coop creation - batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - batteryAlgorithm.setTargetType( OL_ResultScope.ENERGYCOOP ); - gridbattery.p_batteryAlgorithm = batteryAlgorithm; - break; - default: - throw new RuntimeException("Battery Operation Mode: " + dataBattery.operation_mode() + " is not supported for GCGridBattery."); - } - - //Get initial state - gridbattery.v_isActive = dataBattery.initially_active(); - - if (dataBattery.polygon() != null) { - //Create gis object for the battery - GIS_Object area = f_createGISObject( dataBattery.gc_name(), dataBattery.latitude(), dataBattery.longitude(), dataBattery.polygon(), OL_GISObjectType.BATTERY); - - //Add to collections - gridbattery.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(gridbattery); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_batteryColor ); - area.set_p_defaultLineColor( zero_Interface.v_batteryLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - //Create energy asset for the battery - f_addStorage(gridbattery, dataBattery.capacity_electric_kw(), dataBattery.storage_capacity_kwh(), OL_EnergyAssetType.STORAGE_ELECTRIC ); - -}]]> - - - VOID - - 1726584205789 - - - 430830 - - false - true - true - existing_actors = new ArrayList(); - - -for (Electrolyser_data dataElectrolyser : f_getElectrolysersInSubScope(c_electrolyser_data)) { - GCEnergyConversion H2Electrolyser = energyModel.add_EnergyConversionSites(); - - H2Electrolyser.set_p_gridConnectionID( dataElectrolyser.gc_id() ); - H2Electrolyser.set_p_name( dataElectrolyser.gc_name() ); - H2Electrolyser.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - H2Electrolyser.set_p_ownerID( dataElectrolyser.owner_id() ); - H2Electrolyser.set_p_parentNodeElectricID( dataElectrolyser.gridnode_id() ); - - //Grid Capacity - H2Electrolyser.v_liveConnectionMetaData.physicalCapacity_kW = dataElectrolyser.connection_capacity_kw(); - if ( dataElectrolyser.connection_capacity_kw() > 0 ) { - H2Electrolyser.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataElectrolyser.contracted_delivery_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.contracted_delivery_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataElectrolyser.contracted_feed_in_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.contracted_feed_in_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - - H2Electrolyser.v_isActive = dataElectrolyser.initially_active(); - H2Electrolyser.p_minProductionRatio = dataElectrolyser.min_production_ratio(); - - //Electrolyser operation mode - H2Electrolyser.set_p_electrolyserOperationMode( dataElectrolyser.default_operation_mode()); - - //Create EA for the electrolyser GC - J_EAConversionElectrolyser h2ElectrolyserEA = new J_EAConversionElectrolyser(H2Electrolyser, dataElectrolyser.capacity_electric_kw(), dataElectrolyser.conversion_efficiency(), energyModel.p_timeStep_h, OL_ElectrolyserState.STANDBY, dataElectrolyser.load_change_time_s(), dataElectrolyser.start_up_time_shutdown_s(), dataElectrolyser.start_up_time_standby_s(), dataElectrolyser.start_up_time_idle_s()); - - if (!existing_actors.contains(H2Electrolyser.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( H2Electrolyser.p_ownerID ); - owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.ELECTROLYSER_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataElectrolyser.owner_id())); - } - - H2Electrolyser.set_p_owner( owner ); - - if (dataElectrolyser.polygon() != null) { - //Create GIS object for the electrolyser - GIS_Object area = f_createGISObject( dataElectrolyser.gc_name(), dataElectrolyser.latitude(), dataElectrolyser.longitude(), dataElectrolyser.polygon(), OL_GISObjectType.ELECTROLYSER); - - //Add to collections - area.c_containedGridConnections.add(H2Electrolyser); - H2Electrolyser.c_connectedGISObjects.add(area); - - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_electrolyserColor ); - area.set_p_defaultLineColor( zero_Interface.v_electrolyserLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}]]> - - - VOID - - 1726584205791 - - - 430.001730 - - false - true - true - existing_actors = new ArrayList(); -List existing_windFarms = new ArrayList(); - -for (Windfarm_data dataWindfarm : f_getWindfarmsInSubScope(c_windfarm_data)) { - if (!existing_windFarms.contains(dataWindfarm.gc_id())) { // Check if windfarm exists already, if not, create new windfarm GC + turbine - windfarm = energyModel.add_EnergyProductionSites(); - - windfarm.set_p_gridConnectionID( dataWindfarm.gc_id() ); - windfarm.set_p_name( dataWindfarm.gc_name() ); - - //Check wether it can be changed using sliders - windfarm.p_isSliderGC = dataWindfarm.isSliderGC(); - - //Grid capacity - windfarm.v_liveConnectionMetaData.physicalCapacity_kW = dataWindfarm.connection_capacity_kw(); - if ( dataWindfarm.connection_capacity_kw() > 0 ) { - windfarm.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataWindfarm.contracted_feed_in_capacity_kw() != null) { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.contracted_feed_in_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.connection_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - windfarm.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - windfarm.set_p_ownerID( dataWindfarm.owner_id() ); - windfarm.set_p_parentNodeElectricID( dataWindfarm.gridnode_id() ); - - //Get initial state - windfarm.v_isActive = dataWindfarm.initially_active(); - - //Create EA for the windturbine GC - f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); - - if (!existing_actors.contains(windfarm.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( windfarm.p_ownerID ); - owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.WINDFARM_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataWindfarm.owner_id())); - } - - windfarm.set_p_owner( owner ); - - existing_windFarms.add(windfarm.p_gridConnectionID); - } - else { // winfarm and its owner exist already, only create new gis building which is added to the farm - windfarm = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataWindfarm.gc_id()) ); - owner = windfarm.p_owner; - - } - - //Create GIS object for the windfarm - if (dataWindfarm.polygon() != null) { - GIS_Object area = f_createGISObject( dataWindfarm.gc_name(), dataWindfarm.latitude(), dataWindfarm.longitude(), dataWindfarm.polygon(), OL_GISObjectType.WINDFARM ); - - //Add to collections - area.c_containedGridConnections.add(windfarm); - windfarm.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_windFarmColor ); - area.set_p_defaultLineColor( zero_Interface.v_windFarmLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}]]> - - - RETURNS_VALUE - - 1726584205793 - - 70550 - - false - true - true - - - - - - //x = r * cos(t) + a - //y = r * sin(t) + b - //t is an angle between 0 and 2π (more steps is more circle points, about 10-12 should suffice. --> adjust nb_GISCoords accordingly - // r is the radius: 0.000009 degrees in latitude is about 1 meter - // a and b are latitude and longitude - break; - */ -} - -return GISCoords; - - - - - -]]> - - - VOID - - 1726584205795 - - - 60450 - - false - true - true - - - - VOID - - 1726584205799 - - - 430368 - - false - true - true - generic_company_GCs = new ArrayList(); -HashMap map_GC_to_installedBuildingPV = new HashMap(); - -//Get buildings in scope -List buildingDataGenericCompanies = f_getBuildingsInSubScope(c_companyBuilding_data); - -//Add generic companies to the legend if in model -if(buildingDataGenericCompanies.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DEFAULT_COMPANY); -} - -//Loop over the remaining buildings in c_CompanyBuilding_data (Survey buildings have been removed from this collection) -for (Building_data genericCompany : buildingDataGenericCompanies) { - - GCUtility companyGC = findFirst(generic_company_GCs, GC -> GC.p_gridConnectionID.equals(genericCompany.address_id())); - - if(companyGC == null){ - //Create new companyGC - companyGC = energyModel.add_UtilityConnections(); - - //Update counter and collections - v_numberOfCompaniesNoSurvey++; - generic_company_GCs.add(companyGC); - map_GC_to_installedBuildingPV.put(companyGC, 0.0); - - //Set parameters for the Grid Connection - companyGC.p_gridConnectionID = genericCompany.address_id(); - - // Check that is needed until connectioncapacity is no longer in 'Panden' excel - if (genericCompany.contracted_capacity_kw() == null || genericCompany.contracted_capacity_kw() <= 0) { - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = genericCompany.contracted_capacity_kw(); - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - } - - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - - - //set GC Adress - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(genericCompany.streetname()); - if (genericCompany.house_number() == null) { - companyGC.p_address.setHouseNumber(0); - } - else { - companyGC.p_address.setHouseNumber(genericCompany.house_number()); - } - companyGC.p_address.setHouseLetter(genericCompany.house_letter()); - companyGC.p_address.setHouseAddition(genericCompany.house_addition()); - companyGC.p_address.setPostalcode(genericCompany.postalcode()); - companyGC.p_address.setCity(genericCompany.city()); - - - //Set location of GC - companyGC.p_latitude = genericCompany.latitude(); - companyGC.p_longitude = genericCompany.longitude(); - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - - //Connect GC to grid node - companyGC.p_parentNodeElectricID = genericCompany.gridnode_id (); - - // Create new actor and assign GC to that - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = genericCompany.address_id(); - COC.p_actorType = OL_ActorType.CONNECTIONOWNER; - COC.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - companyGC.p_owner = COC; - companyGC.p_ownerID = COC.p_actorID; - } - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(genericCompany.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( genericCompany, companyGC ); - - companyGC.p_roofSurfaceArea_m2 += b.p_roofSurfaceArea_m2; - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + (genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0)); - - //Style building - b.p_defaultFillColor = zero_Interface.v_companyBuildingColor; - b.p_defaultLineColor = zero_Interface.v_companyBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - //Redistribute the PV installed - List currentConnectedGCWithBuilding_notDetailed = findAll(existingBuilding.c_containedGridConnections, gc -> !gc.p_owner.p_detailedCompany); - int currentAmountOfConnectedGCWithBuilding_notDetailed = currentConnectedGCWithBuilding_notDetailed.size(); - - double buildingPV = genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0; - double newPVDistributionForAllAttachedGC_kW = buildingPV/(currentAmountOfConnectedGCWithBuilding_notDetailed+1); - double deltaPV_earlierConnectedGC_kW = newPVDistributionForAllAttachedGC_kW - (buildingPV/currentAmountOfConnectedGCWithBuilding_notDetailed); - - for(GridConnection earlierConnectedGC : currentConnectedGCWithBuilding_notDetailed){ - map_GC_to_installedBuildingPV.put(earlierConnectedGC, map_GC_to_installedBuildingPV.get(earlierConnectedGC) + deltaPV_earlierConnectedGC_kW); - if(map_GC_to_installedBuildingPV.get(earlierConnectedGC) < 0){ - new RuntimeException("Negative installed PV for GC: " + earlierConnectedGC.p_gridConnectionID + " after redistribution of PV on the building. This should never be possible!"); - } - } - - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + newPVDistributionForAllAttachedGC_kW); - - //Connect to the existing building - f_connectGCToExistingBuilding(companyGC, existingBuilding, genericCompany); - } - - companyGC.p_floorSurfaceArea_m2 += genericCompany.address_floor_surface_m2(); - v_totalFloorAreaAnonymousCompanies_m2 += genericCompany.address_floor_surface_m2(); - -} - -//Amount of generic companies created -traceln("Number of companies created without survey: " + v_numberOfCompaniesNoSurvey); - -//Create EA after all buildings and connections have been made -> needed because total surfaces are unkown before that -for (GridConnection GCcompany : generic_company_GCs ) { - - //create the energy assets for each GC - f_iEAGenericCompanies(GCcompany, map_GC_to_installedBuildingPV.get(GCcompany)); -}]]> - - - RETURNS_VALUE - - 1726584205801 - - - 807.621580 - - false - true - true - - - - - - - - - 0) { // && - energyModel.c_GISBuildingClusters.add(b); - b.p_pandcluster_nr = buildingData.pandcluster_nr(); -} - -//Create gisregion -b.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(buildingData.polygon(), b.p_GISObjectType)); - -//Use the first point of the polygon as lat lon -double[] gisregion_points = b.gisRegion.getPoints(); // get all points of the gisArea of the building in the format lat1,lon1,lat2,lon2, etc. - -//position and coordinates -b.p_latitude = gisregion_points[0]; -b.p_longitude = gisregion_points[1]; - -//Set latlon -b.setLatLon(b.p_latitude, b.p_longitude); - - -//Define roof surface area (with Null checks and gisregion area as back up) -b.p_roofSurfaceArea_m2 = buildingData.polygon_area_m2() != null ? buildingData.polygon_area_m2() : b.gisRegion.area(); - -//Define floor surface area (with Null check, and make it 0 if unkown, else counting errors due to order of loadin of building data) -b.p_floorSurfaceArea_m2 = buildingData.address_floor_surface_m2() != null ? buildingData.address_floor_surface_m2() : 0; - -//Add to collections -b.c_containedGridConnections.add(parentGC); -parentGC.c_connectedGISObjects.add(b); - - -return b;]]> - - - VOID - - 1726584205803 - - 821111 - - false - true - true - - - - - - - - - - - - - - - - - - - - - yearlyElectricityFeedin_kWh_list = null; - List yearlyElectricityProduction_kWh_list = null; - - //Check for PV, and if so: check for additional quarterhourly values - if(pvPower_kW != null && pvPower_kW > 0){ - //Check for feedin values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityFeedin_kWh_list = selectValues(double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - - //Check for bruto production values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - } - - //Get the delivery values - List yearlyElectricityDelivery_kWh_list = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_elec_consumption;"); - - - //Convert lists into arrays - double[] yearlyElectricityDelivery_kWh_array = (yearlyElectricityDelivery_kWh_list != null) ? yearlyElectricityDelivery_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityFeedin_kWh_array = (yearlyElectricityFeedin_kWh_list != null) ? yearlyElectricityFeedin_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - - - //Preprocess and add the profiles - f_createPreprocessedElectricityProfile_PV(parentGC, yearlyElectricityDelivery_kWh_array, yearlyElectricityFeedin_kWh_array, yearlyElectricityProduction_kWh_array, pvPower_kW); - -} - -else { // Add regular electricity and consumption profiles - J_EAConsumption profile = new J_EAConsumption(parentGC, OL_EnergyAssetType.ELECTRICITY_DEMAND, profileName, yearlyElectricityDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); -}]]> - - - VOID - - 1726584205805 - - 821221 - - false - true - true - - - - - - - - - - - - - - - - - - - - - hourlyGasDemand_kWh = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_gas_consumption;"); - List hourlyHeatDemand_kWh = new ArrayList(); - - for (int i = 0; i < hourlyGasDemand_kWh.size(); i++) { - double gasHeatingValue_timestep_kWh = hourlyGasDemand_kWh.get(i) * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating; - yearlyDemandHeat_kWh += gasHeatingValue_timestep_kWh; - hourlyHeatDemand_kWh.add(i, gasHeatingValue_timestep_kWh); - - //Keep track of max value - if((gasHeatingValue_timestep_kWh/energyModel.p_timeStep_h) > maxHeatOutputPower_kW){ - maxHeatOutputPower_kW = gasHeatingValue_timestep_kWh/energyModel.p_timeStep_h; - } - } - profile.a_energyProfile_kWh = hourlyHeatDemand_kWh.stream().mapToDouble(d -> max(0,d)).toArray(); - - //Update v_remainingGasConsumption_m3 - v_remainingGasConsumption_m3 -= yearlyDemandHeat_kWh/(avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); -} -else{ - - - if (parentGC.p_heatingType == null || parentGC.p_heatingType == OL_GridConnectionHeatingType.NONE || parentGC.p_floorSurfaceArea_m2 == 0 ){ - //traceln("NO FLOOR SURFACE OR HEATING TYPE DETECTED"); - return; - } - - //Determine heatdemand - yearlyDemandHeat_kWh = yearlyGasDemand_m3 * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency; - - if (yearlyDemandHeat_kWh <= 0 ){// If heat demand = 0, make estimation based on floor surface area, average m3 gas consumption per m2 floor and gas burner efficiency - yearlyDemandHeat_kWh = avgc_data.p_avgCompanyGasConsumption_m3pm2*parentGC.p_floorSurfaceArea_m2 * avgc_data.p_gas_kWhpm3 * avgc_data.p_avgEfficiencyGasBurner_fr; - //traceln("NO HEAT DEMAND DETECTED: ESTIMATION MADE BASED ON FLOOR SURFACE AREA!"); - } - - //Determine heatdemand - heatDemand = new J_EAConsumption(parentGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyDemandHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); - - //Calculate required thermal power - maxHeatOutputPower_kW = yearlyDemandHeat_kWh*defaultProfiles_data.getDefaultBuildingHeatDemandProfileMaximum_fr(); -} - - -//Add heat demand asset -f_addHeatAsset(parentGC, parentGC.p_heatingType, maxHeatOutputPower_kW); - -]]> - - - VOID - - 1726584205807 - - - 807.621600 - - false - true - true - 0){ - zero_Interface.c_modelActiveSpecialGISObjects.add(OL_GISObjectType.PARCEL); -} - -for (Parcel_data dataParcel : c_parcel_data) { - - GIS_Parcel parcel = energyModel.add_pop_GIS_Parcels(); - - parcel.set_p_latitude( dataParcel.latitude() ); - parcel.set_p_longitude( dataParcel.longitude() ); - parcel.setLatLon(parcel.p_latitude, parcel.p_longitude); - parcel.set_p_id( dataParcel.parcel_id() ); - parcel.set_p_GISObjectType(OL_GISObjectType.PARCEL); - - //Building + styling the gisregion and putting it on the map - GISRegion gisregion = zero_Interface.f_createGISObject(f_createGISObjectsTokens( dataParcel.polygon(), parcel.p_GISObjectType)); - parcel.gisRegion = gisregion; - - parcel.set_p_defaultFillColor( zero_Interface.v_parcelColor ); - parcel.set_p_defaultLineColor( zero_Interface.v_parcelLineColor ); - parcel.set_p_defaultLineStyle( LineStyle.LINE_STYLE_DASHED ); - zero_Interface.f_styleAreas(parcel); -}]]> - - - VOID - - 1726584205809 - - 821291 - - false - true - true - - - - - - - - - - - - - - - - - - - - RETURNS_VALUE - - 1726584205811 - - - 807.621560 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - VOID - - 1726584205815 - - 429.001159 - - false - true - true - surveys = f_getSurveys(); -traceln("Size of survey List: %s", surveys.size()); - -//Get the building data -try{ - map_buildingData_Vallum = com.zenmo.vallum.PandKt.fetchBagPanden(surveys); -} -catch (Exception e){ //if api of bag is down, leave bag buildings empty and display error message - zero_Interface.f_setErrorScreen("BAG API is offline, het is mogelijk dat bepaalde panden niet zijn ingeladen!"); -} - - -traceln("Companies that filled in the survey:"); -for (var survey : surveys) { - - traceln(survey.getCompanyName()); - - //Create connection owner - ConnectionOwner survey_owner = energyModel.add_pop_connectionOwners(); - survey_owner.p_actorID = survey.getCompanyName(); - survey_owner.p_actorType = OL_ActorType.CONNECTIONOWNER; - survey_owner.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - survey_owner.p_detailedCompany = true; - survey_owner.b_dataSharingAgreed = survey.getDataSharingAgreed(); - - for (var address : survey.getAddresses()) { - - //Update number of survey companies (locations) - v_numberOfSurveyCompanies++; - - for (var gridConnection: address.getGridConnections()) { - - //Check if it has (or will have) a direct connection with the grid (either gas or electric), if not: skip this gc. - boolean hasNaturalGasConnection = (gridConnection.getNaturalGas().getHasConnection() != null)? gridConnection.getNaturalGas().getHasConnection() : false; - boolean hasExpansionRequest = (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null ) ? gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() : false; - - if (!gridConnection.getElectricity().getHasConnection() && !hasExpansionRequest && !hasNaturalGasConnection){ - traceln("surveyGC with sequence: " + gridConnection.getSequence() + " is not created, as it has no connection to the grid, future grid connection or current gas connection."); - continue; - } - - //Create GC - GCUtility companyGC = energyModel.add_UtilityConnections(); - - //Set parameters for the Grid Connection - companyGC.p_ownerID = survey.getCompanyName(); - companyGC.p_gridConnectionID = gridConnection.getSequence().toString() ; - - //Find actor and connect GC - companyGC.p_owner = survey_owner; - - //Adress data - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(address.getStreet().substring(0,1).toUpperCase() + address.getStreet().substring(1).toLowerCase()); - companyGC.p_address.setHouseNumber(address.getHouseNumber()); - companyGC.p_address.setHouseLetter(address.getHouseLetter().equals("") ? null : address.getHouseLetter()); - companyGC.p_address.setHouseAddition(address.getHouseNumberSuffix().equals("") ? null : address.getHouseNumberSuffix()); - companyGC.p_address.setPostalcode(address.getPostalCode().equals("") ? null : address.getPostalCode().toUpperCase().replaceAll("\\s","")); - companyGC.p_address.setCity(address.getCity().substring(0,1).toUpperCase() + address.getCity().substring(1).toLowerCase()); - - //Get attached building info - List buildings = f_getSurveyGCBuildingData(companyGC, gridConnection); - - //Total new additional floor/roof surface area - double totalNewFloorSurfaceAreaGC_m2 = 0; - double totalNewRoofSurfaceAreaGC_m2 = 0; - - //Create the GIS buildings - for (Building_data buildingData : buildings) { - GIS_Building gisBuilding = findFirst(energyModel.pop_GIS_Buildings, b -> b.p_id.equals(buildingData.building_id())); // Check if building already exists in engine - if (gisBuilding != null) { - // Connect GC to existing building in engine - f_connectGCToExistingBuilding(companyGC, gisBuilding, buildingData); - } - else{ - gisBuilding = f_createGISBuilding( buildingData, companyGC); - } - - //Set name of building - if(gisBuilding.p_annotation == null){ - gisBuilding.p_annotation = companyGC.p_ownerID; - } - - //Accumulate surface areas - totalNewFloorSurfaceAreaGC_m2 += buildingData.address_floor_surface_m2(); - totalNewRoofSurfaceAreaGC_m2 += gisBuilding.p_roofSurfaceArea_m2; - - //Set trafo ID - companyGC.p_parentNodeElectricID = buildingData.gridnode_id(); - - //Style building - gisBuilding.p_defaultFillColor = zero_Interface.v_detailedCompanyBuildingColor; - gisBuilding.p_defaultLineColor = zero_Interface.v_detailedCompanyBuildingLineColor; - zero_Interface.f_styleAreas(gisBuilding); - - } - - //Add (combined) building data to GC (latitude and longitude + area) - companyGC.p_floorSurfaceArea_m2 += totalNewFloorSurfaceAreaGC_m2; - companyGC.p_roofSurfaceArea_m2 += totalNewRoofSurfaceAreaGC_m2; - - - if(!companyGC.c_connectedGISObjects.isEmpty()){ - companyGC.p_longitude = companyGC.c_connectedGISObjects.get(0).p_longitude; // Get longitude of first building (only used to get nearest trafo) - companyGC.p_latitude = companyGC.c_connectedGISObjects.get(0).p_latitude; // Get latitude of first building (only used to get nearest trafo) - - if(buildings.isEmpty()){ //GC will not have gotten a gridnode assigned, - for (var PID : gridConnection.getPandIds() ) { - Building_data surveyBuildingData = findFirst(c_surveyCompanyBuilding_data, b -> b.building_id().equals(PID.getValue())); - if(surveyBuildingData != null){ - companyGC.p_parentNodeElectricID = surveyBuildingData.gridnode_id(); - break; - } - } - } - } - else{ - traceln("Gridconnection %s with owner %s has no buildings!!!", companyGC.p_gridConnectionID, companyGC.p_ownerID); - } - - //Set lat lon - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - //Energy asset initialization - f_iEASurveyCompanies_Zorm(companyGC, gridConnection); - } - } -} - -//If survey companies are present, add to the ui legend -if(v_numberOfSurveyCompanies>0){ - //Add to the legend - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DETAILED_COMPANY); - - //Pass the number of survey companies to interface for the dynamic legend - zero_Interface.v_numberOfSurveyCompanies = v_numberOfSurveyCompanies; -}]]> - - - RETURNS_VALUE - ]]> - 1726584205819 - - 449179 - - false - true - true - surveys = new ArrayList(); - - -String[] zorm_project_names; -if(project_data.zorm_project_names() != null){ - zorm_project_names = project_data.zorm_project_names(); -} -else{ - zorm_project_names = new String[]{project_data.project_name()}; -} - -surveys = vallum.getEnabledSurveysByProjectNames(zorm_project_names); - -//Clear user data -user = null; - -return surveys;]]> - - - VOID - - 1726584205821 - - 90201 - - false - true - true - - - - VOID - - 1726584205825 - - 460300 - - false - true - true - - - - - - - - - - - - - 0))) { - companyGC.c_heatingTypes.add(OL_GridConnectionHeatingType.GASBURNER); - if(companyGC.c_heatingTypes.size() == 1){ - companyGC.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; - } - traceln("Gas consumption detected for '" + companyGC.p_ownerID + "', setting heating type to GASBURNER"); - } -} - -//Set correct primary heating method (p_heatingType) (needed for now, till model can support multiple heating types) -if (companyGC.c_heatingTypes.size()>1){ - - if(companyGC.c_heatingTypes.contains(OL_GridConnectionHeatingType.HYBRID_HEATPUMP)){ - companyGC.p_heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - return; - } - else if(companyGC.c_heatingTypes.contains(OL_GridConnectionHeatingType.GASBURNER) && companyGC.c_heatingTypes.contains(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP)){ - companyGC.p_heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - return; - } - else if (companyGC.c_heatingTypes.contains(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP)){ - companyGC.p_heatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; - return; - } - else if(companyGC.c_heatingTypes.contains(OL_GridConnectionHeatingType.GASBURNER)){ - companyGC.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; - return; - } -} - -]]> - - - VOID - - 1726584205827 - - 821351 - - false - true - true - - - - - - - - - - - - - - - - - - - - - 1000){ - electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ - electricVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -} -]]> - - - VOID - - 1726584205829 - - 821371 - - false - true - true - - - - - - - - - - - - - - - - - 1000){ - dieselVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.DIESEL_VAN){ - dieselVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -}]]> - - - VOID - - 1726584205831 - - 821331 - - false - true - true - - - - - - - - - - - - - - - - - - double heatCapacity_JpK = storageCapacity_kWh*3.6e6 / (maxTemperature_degC - minTemperature_degC); - new J_EAStorageHeat(parentGC, storageType, storagePower_kw, lossFactor_WpK, energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.AMBIENT_AIR ); - - break; - - case STORAGE_GAS: - - break; - - default: - - return; -} -]]> - - - VOID - - 1726584205833 - - - 450388 - - false - true - true - - - - - - - - - 0){ - - if(v_remainingElectricityDelivery_kWh > 0){ - //Buidling Base electricity load - double Remaining_electricity_demand_kWh_p_m2_yr = v_remainingElectricityDelivery_kWh / v_totalFloorAreaAnonymousCompanies_m2; - double yearlyElectricityDemand_kWh = Remaining_electricity_demand_kWh_p_m2_yr * companyGC.p_floorSurfaceArea_m2; - - //Add base load profile - f_addElectricityDemandProfile(companyGC, yearlyElectricityDemand_kWh, null, false, "default_office_electricity_demand_fr"); - } - - if(v_remainingGasConsumption_m3 > 0){ - //Building Gas demand profile (purely heating) - double Remaining_gas_demand_m3_p_m2_yr = v_remainingGasConsumption_m3/v_totalFloorAreaAnonymousCompanies_m2; - double yearlyGasDemand_m3 = Remaining_gas_demand_m3_p_m2_yr*companyGC.p_floorSurfaceArea_m2; - double ratioGasUsedForHeating = 1; - - companyGC.p_heatingType = avgc_data.p_avgCompanyHeatingMethod; // Assuming all avg companies have GASBURNER. - //Add heat demand profile - f_addHeatDemandProfile(companyGC, yearlyGasDemand_m3, false, ratioGasUsedForHeating, "default_building_heat_demand_fr"); - } - //Set current scenario heating type - current_scenario_list.setCurrentHeatingType(companyGC.p_heatingType); - future_scenario_list.setPlannedHeatingType(companyGC.p_heatingType); -} - - -//Production asset (PV) ??????????????????????????????????????????? willen we die toevoegen aan generieke bedrijven? -if(pv_installed_kwp != null && pv_installed_kwp > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); -} - - -//Battery with capacity 0 (initialize the slider) -f_addStorage(companyGC, 0, 0, OL_EnergyAssetType.STORAGE_ELECTRIC); - -//add to scenario: current & future -current_scenario_list.setCurrentBatteryPower_kW(0f); -current_scenario_list.setCurrentBatteryCapacity_kWh(0f); -future_scenario_list.setPlannedBatteryPower_kW(0f); -future_scenario_list.setPlannedBatteryCapacity_kWh(0f); - - -//Transport (total remaining cars, vans and trucks (total as defined in project selection - survey company usage) - -//Vans -if(v_remainingNumberOfCars > 0){ - int nbCars = 0; - for (int k = 0; k< ceil((double)v_remainingNumberOfCars/(double)v_numberOfCompaniesNoSurvey); k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - v_remainingNumberOfCars--; - nbCars++; - } - - //Set current scenario cars - current_scenario_list.setCurrentDieselCars(nbCars); - //Set planned scenario cars - future_scenario_list.setPlannedEVCars(0); -} - -//Vans -if(v_remainingNumberOfVans > 0){ - int nbVans = 0; - for (int k = 0; k< ceil((double)v_remainingNumberOfVans/(double)v_numberOfCompaniesNoSurvey); k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, true, 0); - v_remainingNumberOfVans--; - nbVans++; - } - - //Set current scenario vans - current_scenario_list.setCurrentDieselVans(nbVans); - //Set planned scenario vans - future_scenario_list.setPlannedEVVans(0); -} - -//Trucks -if (v_remainingNumberOfTrucks > 0){ - int nbTrucks=0; - for (int k = 0; k< ceil((double)v_remainingNumberOfTrucks/(double)v_numberOfCompaniesNoSurvey); k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, true, 0); - v_remainingNumberOfTrucks--; - nbTrucks++; - } - - //Set current scenario trucks - current_scenario_list.setCurrentDieselTrucks(nbTrucks); - //Set planned scenario trucks - future_scenario_list.setPlannedEVTrucks(0); -}]]> - - - VOID - - 1726584205835 - - 806.739659 - - false - true - true - 0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.REMAINING); -} - -for (Building_data remainingBuilding_data : c_remainingBuilding_data) { - - GIS_Building building = energyModel.add_pop_GIS_Buildings(); - building.p_id = remainingBuilding_data.building_id(); - building.p_longitude = remainingBuilding_data.longitude(); - building.p_latitude = remainingBuilding_data.latitude(); - building.setLatLon(building.p_latitude, building.p_longitude); - building.p_GISObjectType = OL_GISObjectType.REMAINING_BUILDING; - - //Building + styling the gisregion and putting it on the map - building.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(remainingBuilding_data.polygon(), building.p_GISObjectType)); - - building.p_defaultFillColor = zero_Interface.v_restBuildingColor; - building.p_defaultLineColor = zero_Interface.v_restBuildingLineColor; - zero_Interface.f_styleAreas(building); -}]]> - - - VOID - - 1726584205837 - - 821391 - - false - true - true - - - - - - - - - - - - - - - - - 1000){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -}]]> - - - VOID - - 1726584205845 - - 821191 - - false - true - true - - - - - - - - - quarterlyEnergyDemand_kWh = selectValues(double.class, "SELECT " + profileName + " FROM charging_profiles;"); -profile.a_energyProfile_kWh = quarterlyEnergyDemand_kWh.stream().mapToDouble(d -> max(0,d)).map( d -> d / 4).toArray();]]> - - - RETURNS_VALUE - - 1726584205847 - - 807.621640 - - false - true - true - - - - - - - - - - - - VOID - - 1726584205849 - - 431751 - - false - true - true - chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW){ - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW; - } - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging centre - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List chargerProfile = f_getChargerProfile(); - boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EACharger(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable); - } - else{ - for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - if (dataChargingStation.polygon() != null) { - //Create EA GIS object (building) for the charging centre - GIS_Object area = f_createGISObject( dataChargingStation.gc_name(), dataChargingStation.latitude(), dataChargingStation.longitude(), dataChargingStation.polygon(), OL_GISObjectType.CHARGER ); - - //Set gis object type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - //Add to collections - area.c_containedGridConnections.add(chargingStation); - chargingStation.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - else{ - traceln("No gisobject created for charge centre: " + chargingStation.p_name); - } - } - else { - - if (chargingStation.p_ownerID == null){ - chargingStation.p_ownerID = "Publieke laadpaal " + laadpaal_nr; - laadpaal_nr++; - } - - //Set charging power - chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging station - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List chargerProfile = f_getChargerProfile(); - boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EACharger(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable); - } - else{ - for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - //Create GIS object for the chargingStation - GIS_Object area = energyModel.add_pop_GIS_Objects(); - - //position and coordinates - area.p_latitude = dataChargingStation.latitude(); - area.p_longitude = dataChargingStation.longitude(); - area.setLatLon(area.p_latitude, area.p_longitude); - - //Create gisregion - area.gisRegion = f_createGISRegionChargingStation( area.p_latitude, area.p_longitude ); - - //Set area type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - chargingStation.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(chargingStation); - if(chargingStation.v_isActive){ - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - } - else{ - area.set_p_defaultFillColor( zero_Interface.v_newChargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_newChargingStationLineColor ); - } - zero_Interface.f_styleAreas(area); - - zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); - } -} - -]]> - - - VOID - - 1726584205853 - - 30950 - - false - true - true - - - - VOID - - 1726584205859 - - 807.621680 - - false - true - true - - - - VOID - - 1726584205861 - - - 840131 - - false - true - true - - - - - - - - - - - - - - - - - - - - - 0) { // When only delivery, feedin profiles are available, in addition to PV power, make explicit consumption and production arrays using delivery profile and PV installed power [kW] - double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; - if (yearlyElectricityFeedin_kWh != null) { // Terugleveringsdata beschikbaar - //traceln("Estimating electricity consumption based on delivery and feedin profiles with pv power estimate for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - double pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - double estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - addedConsumption_kWh += max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } else { // Zonder terugleveringsdata, alleen afname - traceln("Estimating electricity consumption based on delivery profile and pv power for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double pvPowerEstimate_kW = 0; - double estimatedConsumption_kWh = 0; - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - - if (yearlyElectricityDelivery_kWh[i] != 0) { // Only update consumption if delivery is non-zero, otherwise hold previously estimated consumption constant - estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + pvPowerEstimate_kW*0.25; - //addedConsumption_kWh += pvPowerEstimate_kW * 0.25; - } else { - estimatedConsumption_kWh = min(pvPowerEstimate_kW*0.25, estimatedConsumption_kWh); // Take minimum to prevent to much consumption when there is not enough sun in model sun, compared to real sun data!! - - //addedConsumption_kWh += max(0, estimatedConsumption_kWh - pvPowerEstimate_kW*0.25);//* 0.25; - } - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } - profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} else { // No PV production - profile.a_energyProfile_kWh = yearlyElectricityDelivery_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} -//traceln(Arrays.stream(profile.a_energyProfile_kWh).sum() + " kWh per jaar at grid connection " + parentGC.p_ownerID + " " + profileName); -v_remainingElectricityDelivery_kWh -= nettDelivery_kWh; - -if (extraConsumption_kWh > 1) { - traceln("Preprocessing of delivery and production data led to negative consumption of: %s kWh", extraConsumption_kWh); - traceln("Consumption profile was capped to 0kW"); -} - -if (v_remainingElectricityDelivery_kWh < 0){ - traceln("v_remainingElectricityDelivery_kWh became negative at GC: %s", parentGC); -}]]> - - - VOID - - 1726584205865 - - 60100 - - false - true - true - - - - VOID - - 1726584205867 - - -390190 - - false - true - true - - - - VOID - - 1726584205869 - - -390700 - - false - true - true - no longer needed, by clearing it is send to the garbage collector -> saves memory - -/* -genericProfiles_data = null; -c_GridNode_data.clear(); -c_SurveyCompanyBuilding_data.clear(); -c_GenericCompanyBuilding_data.clear(); -c_HouseBuilding_data.clear(); -c_remainingBuilding_data.clear(); -c_Solarfarm_data.clear(); -c_Windfarm_data.clear(); -c_Electrolyser_data.clear(); -c_Battery_data.clear(); -c_Chargingstation_data.clear(); -c_Neighbourhood_data.clear(); -c_Parcel_data.clear(); -c_Cable_data_LV.clear(); -c_Cable_data_MV.clear(); -*/ -]]> - - - VOID - - 1726584205871 - - 430338 - - false - true - true - - - - VOID - - 1726584205873 - - 420130 - - false - true - true - - - - VOID - - 1726584205881 - - 90240 - - false - true - true - - - - VOID - - 1727792666396 - - -390140 - - false - true - true - without the loss of data in your database sources itself - -//Example code -/* -//Adjust building floor surface area to 0 to cause no consumption (empty buildings) - -List buildingIDS = new ArrayList(); - -// Define the building ids that need to have no consumption -String buildingID_XXXX = "XXXX"; - -buildingIDS.add(buildingID_XXXX); - - -for(String buildingID : buildingIDS){ - update(buildings) - .where(buildings.building_id.eq(buildingID)) - .set(buildings.cumulative_floor_surface_m2, 0.0) - .execute(); -} -*/]]> - - - RETURNS_VALUE - - 1728035809860 - - 1560810 - - false - true - true - - - - - - - - RETURNS_VALUE - - 1728039545686 - - 840150 - - false - true - true - - - - - - - - - - - - - - - - - - - - - 0){ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + pvPower_kW*avgc_data.p_avgFullLoadHoursPV_hr; - } - else{//Geen opwek - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; - } -} -else if(pvPower_kW != null && pvPower_kW > 0){ - //WAT HIER?? Voor nu consumption = delivery - //Maar: moet preprocessing van standaard profiel worden, waar gelijktijdigheid gecheckt wordt! - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -else{ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -return annualElectricityConsumption_kWh; -]]> - - - VOID - - 1732112209863 - - 820310 - - false - true - true - - - - - - - - - - - - - v_simStartHour_h + i*0.25).toArray(); // time axis - -// From kWh/quarter to normalized power -double totalProduction_kWh = Arrays.stream(yearlyElectricityProduction_kWh).sum(); -double fullLoadHours_h = totalProduction_kWh / pvPower_kW; -double[] a_normalizedPower_fr = Arrays.stream(yearlyElectricityProduction_kWh).map(i -> 4 * i / totalProduction_kWh * fullLoadHours_h ).toArray(); - -//traceln("Full load hours of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).sum()/4); -//traceln("Max of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).max()); - -TableFunction tf_customPVproduction_fr = new TableFunction(a_arguments, a_normalizedPower_fr, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer((parentGC.p_ownerID + "_PVproduction") , tf_customPVproduction_fr); -energyModel.f_addProfile(profilePointer); -J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, (parentGC.p_ownerID + "_rooftopPV"), OL_EnergyCarriers.ELECTRICITY, (double)pvPower_kW, energyModel.p_timeStep_h, profilePointer); - -traceln("Custom PV asset added to GC: " + parentGC.p_ownerID); -//traceln("Custom PV asset added to %s with installed power %s kW and %s full load hours!", parentGC.p_ownerID, pvPower_kW, fullLoadHours_h); -]]> - - - VOID - - 1732112244908 - - 448240 - - false - true - true - - - - - - - - - 0){ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridConnection.getElectricity().getContractedConnectionCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - - - //Check if contract capacity feedin has been filled in: if not, make the same as pv capacity - if(gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() > 0){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else{ - if(pvPower_kW != null){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = pvPower_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; - } - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - //Check if physical capacity has been filled in: if not, make the same as maximum of contract delivery and feedin - if(gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() > 0){ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = (double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - else{ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = max(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW, companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - } - } - - //Add to current scenario list - current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); - - - //Electricity consumption profile - String profileName = "default_office_electricity_demand_fr"; - - //Check if quarter hourly values are available in vallum - boolean createdTimeSeriesAssets = f_createElectricityTimeSeriesAssets(companyGC, gridConnection); - - if(createdTimeSeriesAssets){ - if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. - createElectricEA = false; - } - } - else{ //(!createdTimeSeriesAssets) { // - double yearlyElectricityConsumption_kWh = 0; - try { // Check if quarterly hour values are available in excel database - if(selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_elec_consumption LIMIT 1;") != null){ - companyGC.v_hasQuarterHourlyValues = true; - profileName = "ccid" + companyGC.p_gridConnectionID; - - //Check if solar was already producing in simualtion year (Check for now: if year production = 0 , no solar yet, if year production = null, no data: so assume there was solar already) - if(gridConnection.getElectricity().getAnnualElectricityProduction_kWh() != null && gridConnection.getElectricity().getAnnualElectricityProduction_kWh () == 0){ - pvPower_kW = null; - } - - if (!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile is present. - createElectricEA = false; - } - } - } - catch(Exception e) { - //Data not available, do nothing and leave v_hasQuarterHourlyValues on false. - } - - if(companyGC.v_hasQuarterHourlyValues == false){//Calculate yearly consumption based on yearly delivery (and yearly feedin, production or solarpanels if available) - //Get totals - double yearlyElectricityDelivery_kWh = (gridConnection.getElectricity().getAnnualElectricityDemandKwh() != null) ? gridConnection.getElectricity().getAnnualElectricityDemandKwh() : 0; // Yearly electricity consumption (0 if value is null) - Integer yearlyElectricityFeedin_kWh = gridConnection.getElectricity().getAnnualElectricityFeedIn_kWh(); - Integer yearlyElectricityProduction_kWh = gridConnection.getElectricity().getAnnualElectricityProduction_kWh(); - - //Calculate consumption - yearlyElectricityConsumption_kWh = f_getPreprocessedElectricityConsumptionTotal(companyGC, yearlyElectricityDelivery_kWh, yearlyElectricityFeedin_kWh, yearlyElectricityProduction_kWh, pvPower_kW); - - //If no electricity consumption, determine the consumption based on average values and floor surface and connection capacity - if(yearlyElectricityConsumption_kWh == 0){ - yearlyElectricityConsumption_kWh = avgc_data.p_avgCompanyElectricityConsumption_kWhpm2*companyGC.p_floorSurfaceArea_m2; - - //Check if it is within the contracted limits (peak should at least be 20% lower than contracted capacity - if(yearlyElectricityConsumption_kWh*defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr() > 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW){ - yearlyElectricityConsumption_kWh = 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW/defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr(); - } - - } - - //Update total Yearly electricity consumption (only when no timestep data available, cause when thats avaiable, it happens in the preprocessing function) - if (yearlyElectricityDelivery_kWh != 0){ - v_remainingElectricityDelivery_kWh -= yearlyElectricityDelivery_kWh; - } - else{ - v_remainingElectricityDelivery_kWh -= yearlyElectricityConsumption_kWh; - } - } - - //Add base electricity demand profile (with profile if available, with generic pattern if only yearly data is available) - f_addElectricityDemandProfile(companyGC, yearlyElectricityConsumption_kWh, pvPower_kW, companyGC.v_hasQuarterHourlyValues, profileName); - } -} - -//If everything is 0 set the GC as non active -if(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.physicalCapacity_kW == 0){ - companyGC.v_isActive = false; -} - -//Grid expansion request -if (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null && gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator()){ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(max(companyGC.v_liveConnectionMetaData.physicalCapacity_kW, max(future_scenario_list.getRequestedContractDeliveryCapacity_kW(), future_scenario_list.getRequestedContractFeedinCapacity_kW()))); -} -else{ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); -} - - -////Supply (pv, wind, etc.) -if (gridConnection.getSupply().getHasSupply() != null && gridConnection.getSupply().getHasSupply()){ - //gridConnection.getElectricity().getAnnualElectricityProductionKwh() // Staat niet meer in het formulier! - - double[] yearlyElectricityProduction_kWh_array = null; - - var quarterHourlyProduction_kWh = gridConnection.getElectricity().getQuarterHourlyProduction_kWh(); - if (quarterHourlyProduction_kWh != null && quarterHourlyProduction_kWh.hasNumberOfValuesForOneYear()) { - yearlyElectricityProduction_kWh_array = f_convertFloatArrayToDoubleArray(quarterHourlyProduction_kWh.convertToQuarterHourly().getFullYearOrFudgeIt(targetYear)); - } - - if(yearlyElectricityProduction_kWh_array == null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - try { - if(selectFirstValue(Double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - List yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption;"); - yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - } - } - catch(Exception e) { - } - } - if (yearlyElectricityProduction_kWh_array != null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0 && !gridConnection.getHeat().getHeatingTypes().contains(com.zenmo.zummon.companysurvey.HeatingType.COMBINED_HEAT_AND_POWER)){ - f_createCustomPVAsset(companyGC, yearlyElectricityProduction_kWh_array, (double)gridConnection.getSupply().getPvInstalledKwp()); // Create custom PV asset when production data is available! - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - } else if (gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - //gridConnection.getSupply().getPvOrientation(); // Wat doen we hier mee????? Nog niets! - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); - - //add to scenario: current - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - //current_scenario_list.currentPV_orient = gridConnection.getSupply().getPvOrientation(); - } - //Wind - if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); - - //add to scenario: current - current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); - } -} - -//Planned supply (PV) -if (gridConnection.getSupply().getPvPlanned() != null && gridConnection.getSupply().getPvPlanned()){ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW() + (gridConnection.getSupply().getPvPlannedKwp() != null ? gridConnection.getSupply().getPvPlannedKwp() : 0)); - future_scenario_list.setPlannedPV_year(gridConnection.getSupply().getPvPlannedYear()); - //gridConnection.getSupply().getPvPlannedOrientation(); -} -else{ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW()); -} - -//Planned supply (Wind) -if (gridConnection.getSupply().getWindPlannedKw() != null && gridConnection.getSupply().getWindPlannedKw() > 0){ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW() + (gridConnection.getSupply().getWindPlannedKw() != null ? gridConnection.getSupply().getWindPlannedKw() : 0)); - // plannedWind_year // ??? -} -else{ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW()); -} - - - - -////Gas and Heating - -//Initialize variables (outside of gas loop needed for heating) -boolean hasHourlyGasData = false; -boolean hasGasTimeSeriesInZorm = false; -double yearlyGasConsumption_m3 = 0; -double ratioGasUsedForHeating = 1; -String heatProfileName = "default_building_heat_demand_fr"; - -if (gridConnection.getNaturalGas().getHasConnection() != null && gridConnection.getNaturalGas().getHasConnection()){ - - //Determine how much gas goes towards heating - ratioGasUsedForHeating = ((gridConnection.getNaturalGas().getPercentageUsedForHeating() != null) ? gridConnection.getNaturalGas().getPercentageUsedForHeating() : 100)/100.0; - - - //Create heat demand profile using gas demand profile from zorm and create heating assets. - hasGasTimeSeriesInZorm = f_createHeatProfileFromGasTS(companyGC, gridConnection, ratioGasUsedForHeating); - - //If gas demand profile does not exist in zorm - if(!hasGasTimeSeriesInZorm){ - yearlyGasConsumption_m3 = (gridConnection.getNaturalGas().getAnnualDemandM3() != null) ? gridConnection.getNaturalGas().getAnnualDemandM3() : 0; // Yearly electricity consumption (0 if value is null) - - //Check if hourly gas consumption values are available - try{ - if (selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_gas_consumption LIMIT 1;") != null){ - hasHourlyGasData = true; - heatProfileName = "ccid" + companyGC.p_gridConnectionID; - } - } - catch(Exception e) { - //No hourly data available? - //Update total Yearly gas consumption (if it is available it happens in the function where data is imported) - v_remainingGasConsumption_m3 -= yearlyGasConsumption_m3; - } - } -} - -//Heating -if(!hasGasTimeSeriesInZorm){ // If there is gas data, heating assets have already been made. - //Determine the current heating type - f_setHeatingTypeSurvey(companyGC, gridConnection, hasHourlyGasData); - - //Set the heating demand profile - if(!createElectricEA && companyGC.p_heatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ - //Dont create additional Electric heating assets on top of Electricity profile - } - else{ - // Intermediate solution, if no gas demand check if district heating consumption, ifso: convert heat demand into gas, which will then be converted back to heat again while making the profile. - if(yearlyGasConsumption_m3 == 0 && companyGC.p_heatingType == OL_GridConnectionHeatingType.DISTRICTHEAT){ - yearlyGasConsumption_m3 = gridConnection.getHeat().getAnnualDistrictHeatingDelivery_GJ()*277.777778 / avgc_data.p_gas_kWhpm3; - traceln("Heatgrid consumption detected equal to: " + yearlyGasConsumption_m3 + " [m3] of gas"); - } - - f_addHeatDemandProfile(companyGC, yearlyGasConsumption_m3, hasHourlyGasData, ratioGasUsedForHeating, heatProfileName); - } -} - -//add heating type to scenario: current and future -current_scenario_list.setCurrentHeatingType(companyGC.p_heatingType); -future_scenario_list.setPlannedHeatingType(companyGC.p_heatingType); - - - - -////Storage -Float battery_power_kW = 0f; -Float battery_capacity_kWh = 0f; - -if (gridConnection.getStorage().getHasBattery() != null && gridConnection.getStorage().getHasBattery() && createElectricEA){ // Check if battery present and if electric demand EA should be created - if (gridConnection.getStorage().getBatteryPowerKw() != null){ - battery_power_kW = gridConnection.getStorage().getBatteryPowerKw(); - } - if (gridConnection.getStorage().getBatteryCapacityKwh() != null){ - battery_capacity_kWh = gridConnection.getStorage().getBatteryCapacityKwh(); - } -} -// Elke survey company krijgt hoe dan ook een batterij EA (ook als op dit moment nog geen batterij aanwezig is, maar dan is capaciteit gewoon 0) -f_addStorage(companyGC, battery_power_kW, battery_capacity_kWh, OL_EnergyAssetType.STORAGE_ELECTRIC); -companyGC.p_batteryAlgorithm = new J_BatteryManagementSelfConsumption(companyGC); - -//add to scenario: current -current_scenario_list.setCurrentBatteryCapacity_kWh(battery_capacity_kWh); -current_scenario_list.setCurrentBatteryPower_kW(battery_power_kW); - - - -if (gridConnection.getStorage().getHasThermalStorage() != null && gridConnection.getStorage().getHasThermalStorage()){ // Check for thermal storage - //gridConnection.getStorage().getThermalStorageKw() - //J_EAStorageHeat(Agent parentAgent, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //J_EAStorageHeat(companyGC, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //Denk ook aan aansturing?!! -} - -if (gridConnection.getStorage().getHasPlannedBattery() != null && gridConnection.getStorage().getHasPlannedBattery()){ // Check for planned battery - future_scenario_list.setPlannedBatteryCapacity_kWh((gridConnection.getStorage().getPlannedBatteryCapacityKwh() != null ? gridConnection.getStorage().getPlannedBatteryCapacityKwh() : 0) + current_scenario_list.getCurrentBatteryCapacity_kWh()); - future_scenario_list.setPlannedBatteryPower_kW((gridConnection.getStorage().getPlannedBatteryPowerKw() != null ? gridConnection.getStorage().getPlannedBatteryPowerKw() : 0) + current_scenario_list.getCurrentBatteryPower_kW()); -} -else{ -future_scenario_list.setPlannedBatteryCapacity_kWh(current_scenario_list.getCurrentBatteryCapacity_kWh()); -future_scenario_list.setPlannedBatteryPower_kW(current_scenario_list.getCurrentBatteryPower_kW()); -} - - - -////Transport - -//Cars of comuters and visitors -int nbDailyCarVisitors_notNull = (gridConnection.getTransport().getNumDailyCarVisitors() != null) ? gridConnection.getTransport().getNumDailyCarVisitors() : 0; -int nbDailyCarCommuters_notNull = (gridConnection.getTransport().getNumDailyCarAndVanCommuters() != null) ? gridConnection.getTransport().getNumDailyCarAndVanCommuters() : 0; - -if (nbDailyCarCommuters_notNull + nbDailyCarVisitors_notNull > 0){ - - int nbEVCarsComute = (gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() != null) ? gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() : 0; // Wat doen we hier mee???? - int nbDieselCarsComute = gridConnection.getTransport().getNumDailyCarAndVanCommuters() + nbDailyCarVisitors_notNull - nbEVCarsComute; - - boolean isDefaultVehicle = true; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - for (int i = 0; i< nbDieselCarsComute; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, 0); - } - - - //check if charge power is filled in - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCarsComute; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, 0, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(nbEVCarsComute); - current_scenario_list.setCurrentDieselCars(nbDieselCarsComute); - - //Initialize future cars - future_scenario_list.setPlannedEVCars(current_scenario_list.getCurrentEVCars()); - -} - - -//Business vehicles -if (gridConnection.getTransport().getHasVehicles() != null && gridConnection.getTransport().getHasVehicles()){ - - //Cars - if (gridConnection.getTransport().getCars().getNumCars() != null && gridConnection.getTransport().getCars().getNumCars() != 0){ - - - //Update v_remaningAmount of cars (company owned only) - v_remainingNumberOfCars -= gridConnection.getTransport().getCars().getNumCars(); - - //gridConnection.getTransport().getCars().getNumChargePoints(); // Wat doen we hier mee???????? - - Integer nbEVCars = gridConnection.getTransport().getCars().getNumElectricCars(); - if (nbEVCars == null) { - nbEVCars = 0; - } - int nbDieselCars = gridConnection.getTransport().getCars().getNumCars() - nbEVCars; - - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm(); - isDefaultVehicle = false; - } - - //create diesel vehicle - for (int i = 0; i< nbDieselCars; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, annualTravelDistance_km); - } - - //check if charge power is filled in - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - - //create EV - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCars; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(((current_scenario_list.getCurrentEVCars() != null) ? current_scenario_list.getCurrentEVCars() : 0) + nbEVCars); - current_scenario_list.setCurrentDieselCars(((current_scenario_list.getCurrentDieselCars() != null) ? current_scenario_list.getCurrentDieselCars() : 0) + nbDieselCars); - current_scenario_list.setCurrentEVCarChargePower_kW(maxChargingPower_kW); - - //Update Planned cars - future_scenario_list.setPlannedEVCars((gridConnection.getTransport().getCars().getNumPlannedElectricCars() != null ? gridConnection.getTransport().getCars().getNumPlannedElectricCars() : 0) + current_scenario_list.getCurrentEVCars()); - future_scenario_list.setPlannedHydrogenCars((gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() != null) ? gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() : 0); - - } - - - //Vans - if (gridConnection.getTransport().getVans().getNumVans() != null && gridConnection.getTransport().getVans().getNumVans() != 0){ - - //Update v_remaningAmount of vans - v_remainingNumberOfVans -= gridConnection.getTransport().getVans().getNumVans(); - - - //gridConnection.getTransport().getVans().getNumChargePoints(); // Wat doen we hier mee???????? - - Integer nbEVVans = gridConnection.getTransport().getVans().getNumElectricVans(); - if (nbEVVans == null) { - nbEVVans = 0; - } - int nbDieselVans = gridConnection.getTransport().getVans().getNumVans() - nbEVVans; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselVans; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, isDefaultVehicle, annualTravelDistance_km); - } - - //check if charge power is filled in - if (gridConnection.getTransport().getVans().getPowerPerChargePointKw() != null){ - maxChargingPower_kW = gridConnection.getTransport().getVans().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVVans; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VAN, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVVans(nbEVVans); - current_scenario_list.setCurrentDieselVans(nbDieselVans); - current_scenario_list.setCurrentEVVanChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVVans((gridConnection.getTransport().getVans().getNumPlannedElectricVans() != null ? gridConnection.getTransport().getVans().getNumPlannedElectricVans() : 0) + current_scenario_list.getCurrentEVVans()); - future_scenario_list.setPlannedHydrogenVans((gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() != null) ? gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() : 0); - } - - - - //Trucks - if (gridConnection.getTransport().getTrucks().getNumTrucks() != null && gridConnection.getTransport().getTrucks().getNumTrucks() != 0){ - - //Update v_remaningAmount of trucks - v_remainingNumberOfTrucks -= gridConnection.getTransport().getTrucks().getNumTrucks(); - - - //gridConnection.getTransport().getTrucks().getNumChargePoints(); // Wat doen we hier mee???????? - - - Integer nbEVTrucks = gridConnection.getTransport().getTrucks().getNumElectricTrucks(); - if (nbEVTrucks == null) { - nbEVTrucks = 0; - } - int nbDieselTrucks = gridConnection.getTransport().getTrucks().getNumTrucks() - nbEVTrucks; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselTrucks; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, isDefaultVehicle, annualTravelDistance_km); - } - - //check if charge power is filled in - if (gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() != null){ - maxChargingPower_kW = gridConnection.getTransport().getTrucks().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVTrucks; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_TRUCK, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVTrucks(nbEVTrucks); - current_scenario_list.setCurrentDieselTrucks(nbDieselTrucks); - current_scenario_list.setCurrentEVTruckChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVTrucks((gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() != null ? gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() : 0) + current_scenario_list.getCurrentEVTrucks()); - future_scenario_list.setPlannedHydrogenTrucks((gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() != null) ? gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() : 0); - } - - - //Other - if (Objects.nonNull(gridConnection.getTransport().getOtherVehicles().getHasOtherVehicles())){ - - // Wat doen we hier mee??? - - } -} -]]> - - - RETURNS_VALUE - - 1737741603780 - - 470220 - - false - true - true - - - - - - - - - - - - VOID - - 1737712184349 - - 820410 - - false - true - true - - - - - - - - - 0.0 ? 1 : 0); - -if (numTractors > 0 && annualDiesel_L <= 0.0) { - // TODO: this should be in Tractor constructor - throw new RuntimeException("Tractor diesel usage missing for " + companyGridConnection.p_gridConnectionID); -} - -CustomProfile_data tractorProfile = findFirst(c_customProfiles_data, profile -> profile.customProfileID().equals("TractorProfile")); ///???? - -for (int i = 0; i < numTractors; i++) { - if(tractorProfile == null){ - throw new RuntimeException("Trying to make a tractor, without having loaded in a tractor profile for GC: " + companyGridConnection.p_gridConnectionID); - } - new J_EADieselTractor(companyGridConnection, annualDiesel_L / numTractors, tractorProfile.getValuesArray(), energyModel.p_timeStep_h); -}]]> - - - RETURNS_VALUE - - 1738248965949 - - 460260 - - false - true - true - - - - - - - - - (double) it) - .orElse(null); - -//Preprocess the arrays and create the consumption pattern -f_createPreprocessedElectricityProfile_PV(gridConnection, deliveryTimeSeries_kWh, feedInTimeSeries_kWh, productionTimeSeries_kWh, pvPower_kW); - -gridConnection.v_hasQuarterHourlyValues = true; - -return true;]]> - - - RETURNS_VALUE - - 1738572338816 - - 1560840 - - false - true - true - - - - - - - - VOID - - 1742915722586 - - 810840 - - false - true - true - - - - - - - - - - - - - - - - RETURNS_VALUE - - 1745336464944 - - 460280 - - false - true - true - - - - - - - - - - - - - maxHeatOutputPower_kW){ - maxHeatOutputPower_kW = quarterHourlyHeatDemandProfile_kWh[i]/energyModel.p_timeStep_h; - } - totalgasconsumption_m3 += quarterHourlyGasDeliveryTimeSeries_m3[i]; -} -profile.a_energyProfile_kWh = quarterHourlyHeatDemandProfile_kWh; - -//Update v_remainingGasConsumption_m3 -v_remainingGasConsumption_m3 -= yearlyDemandHeat_kWh/(avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); - - -//Add heat asset -f_addHeatAsset(parentGC, parentGC.p_heatingType, maxHeatOutputPower_kW); - - -return true;]]> - - - VOID - - 1745336570663 - - 820270 - - false - true - true - - - - - - - - - - - - - node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(heatgrid == null){ - heatgrid = f_createHeatGridNode(); - } - parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; - - break; - - default: - traceln("HEATING TYPE NOT FOUND FOR GC: " + parentGC); -}]]> - - - RETURNS_VALUE - - 1747300761144 - - 50590 - - false - true - true - - - - VOID - - 1747829476305 - - 50330 - - false - true - true - - - - - - - - VOID - - 1747829476307 - - 50350 - - false - true - true - - - - - - - - VOID - - 1747829476311 - - 50368 - - false - true - true - - - - - - - - VOID - - 1747830228830 - - 90182 - - false - true - true - sf_data.isSliderGC()); -Windfarm_data sliderWindfarm_data = findFirst(c_windfarm_data, wf_data -> wf_data.isSliderGC()); -Battery_data sliderBattery_data = findFirst(c_battery_data, bat_data -> bat_data.isSliderGC()); - -//Get top gridnode id -GridNode_data topGridNode = findFirst(c_gridNode_data, node_data -> node_data.type().equals("HVMV")); -if ( topGridNode == null ) { - throw new RuntimeException("Unable to find top GridNode of type HVMV to create slider assets."); -} -String topGridNodeID = topGridNode.gridnode_id(); - - -if(sliderSolarfarm_data == null){ - f_addSliderSolarfarm(topGridNodeID); -} -if(sliderWindfarm_data == null){ - f_addSliderWindfarm(topGridNodeID); -} -if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - for(GridNode_data nodeData : c_gridNode_data){ - f_addSliderBattery(nodeData.gridnode_id()); - } -} -else{ - if(sliderBattery_data == null){ - f_addSliderBattery(topGridNodeID); - } -}]]> - - - RETURNS_VALUE - - 1749125189323 - - - 99140 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1749138089965 - - - 80120 - - false - true - true - - - - VOID - - 1749628581470 - - 70570 - - false - true - true - - - - - - - - - - - - RETURNS_VALUE - - 1749648772203 - - 490810 - - false - true - true - - - - - - - - RETURNS_VALUE - ]]> - 1749649169603 - - 470790 - - false - true - true - - - - - chargerProfileDataValues = chargerProfileData.valuesList(); -List chargerProfile = new ArrayList(); - -for(int i = 0; i < chargerProfileDataValues.size(); i++){ - chargerProfile.add(f_createChargingSession(chargerProfileDataValues.get(i))); -} - -return chargerProfile;]]> - - - RETURNS_VALUE - ]]> - 1749649390125 - - 450770 - - false - true - true - chargerProfile; -int randomIndex; - -if(c_chargerProfiles_data.size()>0){ - randomIndex = uniform_discr(0, c_chargerProfiles_data.size() - 1); - chargerProfile = f_createNewChargerProfile(c_chargerProfiles_data.get(randomIndex)); - c_chargerProfiles_data.remove(randomIndex); - energyModel.c_chargerProfiles.add(chargerProfile); -} -else{ - randomIndex = uniform_discr(0, energyModel.c_chargerProfiles.size() - 1); - chargerProfile = energyModel.c_chargerProfiles.get(randomIndex); -} - -return chargerProfile;]]> - - - VOID - - 1749726189312 - - 820440 - - false - true - true - - - - - - - - - - - - - - - - VOID - - 1749726279652 - - 820460 - - false - true - true - - - - - - - - - 150){ - aantalBewoners = uniform_discr(2,6); -} -else if (surface_m2 > 50){ - aantalBewoners = uniform_discr(1,4); -} -else { - aantalBewoners = uniform_discr(1,2); -} - -double yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix - -J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); - -//traceln("yearlyHWD_kWh "+ yearlyHWD_kWh); -if( surface_m2 > 200){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have large hot water demand"); -} -if (surface_m2 < 25){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have low hot water demand"); -}]]> - - - VOID - - 1749727623536 - - 820240 - - false - true - true - - - - - - - - - - - - RETURNS_VALUE - ]]> - 1749728889982 - - 50670 - - false - true - true - - - ]]> - - scopedBuildingList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBuildingList.addAll(initialBuildingList); -} -else{ - for (Building_data dataBuilding : initialBuildingList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBuilding.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBuildingList.add(dataBuilding); - } - } - } -} -return scopedBuildingList;]]> - - - VOID - - 1749728889984 - - - 420500 - - false - true - true - buildingDataHouses = f_getBuildingsInSubScope(c_houseBuilding_data); - -traceln("Aantal panden met woonfunctie in BAG data: " + buildingDataHouses.size()); - -int i = 0; - -//Add houses to the legend if in model -if(buildingDataHouses.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.HOUSE); -} - -for (Building_data houseBuildingData : buildingDataHouses) { - GCHouse GCH = energyModel.add_Houses(); - ConnectionOwner COH = energyModel.add_pop_connectionOwners(); - - //Set parameters for the Grid Connection - GCH.p_gridConnectionID = houseBuildingData.address_id(); - GCH.p_ownerID = "Woonhuis" + Integer.toString(i); //aanname : huiseigenaar is eigenbaas - - GCH.p_purposeBAG = houseBuildingData.purpose(); - - //pand gegevens - GCH.p_heatingType = avgc_data.p_avgHouseHeatingMethod ; - GCH.p_bouwjaar = houseBuildingData.build_year(); - GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; - - //Nageisoleerd - if (houseBuildingData.energy_label() != null) { - GCH.p_energyLabel = houseBuildingData.energy_label(); - } - else { - if (GCH.p_bouwjaar < 1980) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; - } - else if (GCH.p_bouwjaar < 2000) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; - } - else if (GCH.p_bouwjaar < 2015) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; - } - else { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.A; - } - } - //aansluiting gegevens - GCH.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - - GCH.v_liveConnectionMetaData.physicalCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - // Address data - GCH.p_address = new J_Address(); - GCH.p_address.setStreetName( houseBuildingData.streetname()); - if (houseBuildingData.house_number() == null) { - GCH.p_address.setHouseNumber( 0 ); - } else { - GCH.p_address.setHouseNumber( houseBuildingData.house_number()); - } - GCH.p_address.setHouseLetter( houseBuildingData.house_letter()); - GCH.p_address.setHouseAddition( houseBuildingData.house_addition()); - GCH.p_address.setPostalcode( houseBuildingData.postalcode()); - GCH.p_address.setCity( houseBuildingData.city()); - - //locatie - GCH.p_longitude = houseBuildingData.longitude(); - GCH.p_latitude = houseBuildingData.latitude(); - GCH.setLatLon(GCH.p_latitude, GCH.p_longitude); - - //Connect GC to grid node - GCH.p_parentNodeElectricID = houseBuildingData.gridnode_id(); - - //Set parameters for the Actor: ConnectionOwner - COH.p_actorID = GCH.p_ownerID; - COH.p_actorType = OL_ActorType.CONNECTIONOWNER; - COH.p_connectionOwnerType = OL_ConnectionOwnerType.HOUSEHOLD; - COH.p_detailedCompany = false; - GCH.p_owner = COH; - - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(houseBuildingData.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( houseBuildingData, GCH ); - GCH.p_roofSurfaceArea_m2 = houseBuildingData.polygon_area_m2(); - - //Style building - b.p_defaultFillColor = zero_Interface.v_houseBuildingColor; - b.p_defaultLineColor = zero_Interface.v_houseBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - f_connectGCToExistingBuilding(GCH, existingBuilding, houseBuildingData); - } - - //Floor surface of GC - GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); - - //Instantiate energy assets - double jaarlijksElectriciteitsVerbruik; - double jaarlijksGasVerbruik; - try { - jaarlijksElectriciteitsVerbruik = houseBuildingData.electricity_consumption_kwhpa(); - } - catch (NullPointerException e){ - jaarlijksElectriciteitsVerbruik = Double.valueOf(uniform_discr(1200, 3800)); - } - try { - jaarlijksGasVerbruik = houseBuildingData.gas_consumption_kwhpa(); - } - catch (NullPointerException e){ - jaarlijksGasVerbruik = Double.valueOf(uniform_discr(600, 2000)); - } - - //GCH.p_initialPVpanels = houseBuildingData.pv_default(); - GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; - GCH.v_liveAssetsMetaData.PVPotential_kW = houseBuildingData.pv_potential_kwp() != null ? houseBuildingData.pv_potential_kwp() : 0; - - f_setHouseHeatingPreferences(GCH); - f_addEnergyAssetsToHouses(GCH, jaarlijksElectriciteitsVerbruik, jaarlijksGasVerbruik ); - - i ++; -} -]]> - - - VOID - - 1749728889986 - - - 440520 - - false - true - true - - - - - - - - - - - - - x.p_gridNodeID.equals( house.p_parentNodeElectricID)); -if ( ! gn.p_hasProfileData ){ - f_addElectricityDemandProfile(house, jaarlijksElectriciteitsVerbruik, null, false, "default_house_electricity_demand_fr"); -} - -//Add building heat model and asset -f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2); -house.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; -double gasBurnerCapacity_kW = 50000;//40;//uniform_discr(3,5); -f_addHeatAsset (house, house.p_heatingType, gasBurnerCapacity_kW); - -//Add hot water and cooking demand -f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2); -double yearlyCookingDemand_kWh = uniform_discr(200,600); -f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, yearlyCookingDemand_kWh); - - -//Add pv -double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; -if (gn.p_hasProfileData){ //dont count production if there is measured data on Node - installedRooftopSolar_kW = 0; -} - -if (installedRooftopSolar_kW > 0) { - f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); -} - -//add TEST PT panel -/* -double PTCapacity_kW = house.p_roofSurfaceArea_m2*avgc_data.p_avgPTPower_kWpm2; -f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOTHERMAL, "PT Paneel", PTCapacity_kW); -//Needed storage capacity buffer in kWh -double heatBufferStorageCapacity_m3 = avgc_data.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 * PTCapacity_kW/avgc_data.p_avgPTPower_kWpm2; -double deltaTempHeatBufferMinMax_k = avgc_data.p_avgMaxHeatBufferTemperature_degC - avgc_data.p_avgMinHeatBufferTemperature_degC; -double heatBufferStorageCapacity_J = avgc_data.p_waterHeatCapacity_JpkgK/ deltaTempHeatBufferMinMax_k / (heatBufferStorageCapacity_m3*avgc_data.p_waterDensity_kgpm3); -double heatBufferStorageCapacity_kWh = heatBufferStorageCapacity_J*3.6e6; -f_addStorage(house, 100, heatBufferStorageCapacity_kWh, OL_EnergyAssetType.STORAGE_HEAT); -*/ - - -//Oprit? -if( house.p_eigenOprit){ - if (randomTrue( 0.08)){ - f_addElectricVehicle(house, OL_EnergyAssetType.ELECTRIC_VEHICLE, true, 0, 0); - } - else{ - f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - } -} -else { - f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); -}]]> - - - VOID - - 1749728889988 - - 440550 - - false - true - true - - - - - - - - VOID - - 1749729268458 - - 430870 - - false - true - true - carportGCList = new ArrayList(); - -for (ParkingSpace_data dataParkingSpace : f_getParkingSpacesInSubScope(c_parkingSpace_data)){ - - //Create parking gis object - GIS_Object parkingSpace = f_createGISObject(dataParkingSpace.parking_id(), dataParkingSpace.latitude(), dataParkingSpace.longitude(), dataParkingSpace.polygon(), OL_GISObjectType.PARKING); - parkingSpace.p_annotation = "Parking space: " + dataParkingSpace.additional_info(); - - //Set correct color and legend collection based on parking type - switch(dataParkingSpace.type()){ - case PRIVATE: - case DISABLED: - case KISS_AND_RIDE: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_private; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_private; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PRIVATE); - break; - case PUBLIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_public; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_public; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PUBLIC); - break; - case ELECTRIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_electric; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_electric; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.ELECTRIC); - break; - } - - //Add to ordered collection on the interface - zero_Interface.c_orderedParkingSpaces.add(parkingSpace); - - //Style gis object - parkingSpace.f_style(null, null, null, null); - - //Get energyProduction GC - GCEnergyProduction carportGC = findFirst(carportGCList, gc -> gc.p_parentNodeElectricID.equals(dataParkingSpace.gridnode_id())); - - if(carportGC == null){ // If non existend -> Create one. - carportGC = energyModel.add_EnergyProductionSites(); - carportGC.p_gridConnectionID = "Parking space gridconnection: " + dataParkingSpace.parking_id(); - carportGC.v_liveConnectionMetaData.physicalCapacity_kW = dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataParkingSpace.pv_potential_kwp(); - - carportGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - carportGC.p_parentNodeElectricID = dataParkingSpace.gridnode_id(); - - carportGC.p_latitude = dataParkingSpace.latitude(); - carportGC.p_longitude = dataParkingSpace.longitude(); - - //Address - carportGC.p_address = new J_Address(); - carportGC.p_address.setStreetName(dataParkingSpace.street()); - - //CO - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = "Parking space connection owner: " + dataParkingSpace.parking_id(); - COC.p_actorType = OL_ActorType.CONNECTIONOWNER; - COC.p_connectionOwnerType = OL_ConnectionOwnerType.PARKINGSPACE_OP; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - carportGC.p_owner = COC; - carportGC.p_ownerID = COC.p_actorID; - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - carportGCList.add(carportGC); - } - else{ - carportGC.v_liveConnectionMetaData.physicalCapacity_kW += dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW += dataParkingSpace.pv_potential_kwp(); - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - } - - //Update pv potential of carport energy production site - carportGC.v_liveAssetsMetaData.PVPotential_kW += dataParkingSpace.pv_potential_kwp() != null ? dataParkingSpace.pv_potential_kwp() : 0; -}]]> - - - RETURNS_VALUE - ]]> - 1749739602491 - - 50690 - - false - true - true - - - ]]> - - scopedSolarfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedSolarfarmsList.addAll(initialSolarfarmsList); -} -else{ - for (Solarfarm_data dataSolarfarm : initialSolarfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataSolarfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedSolarfarmsList.add(dataSolarfarm); - } - } - } -} -return scopedSolarfarmsList;]]> - - - RETURNS_VALUE - ]]> - 1750857080998 - - 50710 - - false - true - true - - - ]]> - - scopedWindfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedWindfarmsList.addAll(initialWindfarmsList); -} -else{ - for (Windfarm_data dataWindfarm : initialWindfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataWindfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedWindfarmsList.add(dataWindfarm); - } - } - } -} -return scopedWindfarmsList;]]> - - - RETURNS_VALUE - ]]> - 1750857082460 - - 50730 - - false - true - true - - - ]]> - - scopedChargingstationsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedChargingstationsList.addAll(initialChargingstationsList); -} -else{ - for (Chargingstation_data dataChargingstation : initialChargingstationsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataChargingstation.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedChargingstationsList.add(dataChargingstation); - } - } - } -} -return scopedChargingstationsList;]]> - - - RETURNS_VALUE - ]]> - 1750857083468 - - 50750 - - false - true - true - - - ]]> - - scopedElectrolysersList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedElectrolysersList.addAll(initialElectrolysersList); -} -else{ - for (Electrolyser_data dataElectrolyser : initialElectrolysersList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataElectrolyser.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedElectrolysersList.add(dataElectrolyser); - } - } - } -} -return scopedElectrolysersList;]]> - - - RETURNS_VALUE - ]]> - 1750857084547 - - 50790 - - false - true - true - - - ]]> - - scopedParkingSpacesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedParkingSpacesList.addAll(initialParkingSpaceList); -} -else{ - for (ParkingSpace_data dataParkingSpace : initialParkingSpaceList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataParkingSpace.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedParkingSpacesList.add(dataParkingSpace); - } - } - } -} -return scopedParkingSpacesList;]]> - - - RETURNS_VALUE - ]]> - 1750861476829 - - 50770 - - false - true - true - - - ]]> - - scopedBatteriesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBatteriesList.addAll(initialBatteriesList); -} -else{ - for (Battery_data dataBattery : initialBatteriesList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBattery.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBatteriesList.add(dataBattery); - } - } - } -} -return scopedBatteriesList;]]> - - - RETURNS_VALUE - ]]> - 1752239414416 - - 450200 - - false - true - true - - - - - - - - - connectedBuildingsData = new ArrayList(); - -if ( vallumGC.getPandIds() != null && !vallumGC.getPandIds().isEmpty()) { - for (var PID : vallumGC.getPandIds() ) { - List buildingsDataSameID = findAll(c_companyBuilding_data, b -> b.building_id().equals(PID.getValue())); - Building_data connectedBuildingData = null; - if(buildingsDataSameID.size() == 1){ // Only one building package with same id, so this building package belongs to this GC - connectedBuildingData = buildingsDataSameID.get(0); - } - else{//Multiple building packages with this building id -> Find the right one based on address, if none are found: pick a package without address - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() != null && buildingData.house_number() == companyGC.p_address.getHouseNumber()); - if(connectedBuildingData == null){ //If no matching house numbers, find first object that has no house number. - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() == null); - } - } - - if (connectedBuildingData != null) { - // Remove from company building data and add to survey - c_companyBuilding_data.remove(connectedBuildingData); - c_surveyCompanyBuilding_data.add(connectedBuildingData); - // Set trafo ID - companyGC.p_parentNodeElectricID = connectedBuildingData.gridnode_id(); - } - else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) { - // Create new building package - connectedBuildingData = f_createBuildingData_Vallum(companyGC, PID.getValue()); - c_vallumBuilding_data.add(connectedBuildingData); - } - - if (connectedBuildingData != null) { - connectedBuildingsData.add(connectedBuildingData); - } - } -} -else {// No building connected in zorm? -> check if it is manually connected in excel (using gc_id column) - connectedBuildingsData = findAll(c_companyBuilding_data, b -> b.gc_id() != null && b.gc_id().equals(companyGC.p_gridConnectionID)); - if(connectedBuildingsData == null){ - traceln("GC %s has no building in zorm and also no manual connection with building in excel", companyGC.p_gridConnectionID); - } - else{ - c_companyBuilding_data.removeAll(connectedBuildingsData); - } -} - -return connectedBuildingsData;]]> - - - - - 1750947055322 - - -370760 - - false - true - true - FILE - - - - - - READ - null - , - - - 1750949192704 - - -370800 - - false - true - true - FILE - - - - - - READ - null - , - - - 1750949507008 - - -370780 - - false - true - true - FILE - - - - - - READ - null - , - - - - - 1726584206083 - - true - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - 1726584206041 - - 30890 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089957 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - 1726584829907 - - -370830 - - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - ARRAY_LIST_BASED - true - XYZ - - - - - - - - - - - - - - - - - - - SPECIFIED_NUMBER - - 1658477089956 - - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - - - 1726584205903 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - 1726584205905 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 1920 - 980 - 0.0 - -1 - null - - - 1726584205907 - - 144020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -65536 - null - SOLID - 460 - 490 - 0.0 - -1 - null - - - 1726584205909 - - 00 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 169 - 40 - 0.0 - -1 - null - - - 1726584205911 - - 557 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16744448 - - - SansSerif - 18 - - - LEFT - - - 1726584205913 - - 147070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1726584205915 - - 0840 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 290 - 140 - 0.0 - -1 - null - - - 1726584205917 - - 20850 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205921 - - 146040 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205923 - - 2060 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 340 - 210 - 0.0 - -1 - null - - - 1726584205925 - - -4400 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -360334 - null - SOLID - 437 - 980 - 0.0 - -1 - null - - - 1726584205927 - - 20490 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 340 - 120 - 0.0 - -1 - null - - - 1726584205929 - - 4070 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205931 - - 40500 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205933 - - -4400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -360334 - null - SOLID - 169 - 40 - 0.0 - -1 - null - - - 1726584205935 - - -40010 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -360334 - - - SansSerif - 16 - - - LEFT - - - 1726584205937 - - -380720 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205939 - - -40060 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205941 - - -400160 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205943 - - 20410 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 340 - 60 - 0.0 - -1 - null - - - 1726584205945 - - 40420 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205947 - - 400660 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 360 - 240 - 0.0 - -1 - null - - - 1726584205949 - - 410670 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1726584205951 - - 570550 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1726584205953 - - -170-110 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 360 - 200 - 0.0 - -1 - null - - - 1726584205955 - - -160-100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - 1726584205957 - - 570230 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1726584205959 - - -170-168.017 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 360 - 358.017 - 0.0 - -1 - null - - - 1726584205961 - - -158.134-158.134 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - 1726584205963 - - 960200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1726584205965 - - -180-140 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 450 - 420 - 0.0 - -1 - null - - - 1726584205967 - - -160-130 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - 1726584205969 - - 960630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - - 1726584205971 - - -180-120 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 380 - 248.024 - 0.0 - -1 - null - - - 1726584205973 - - -161.492-109.13 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - 1727792637339 - - -400110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1730217549237 - - 1520750 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 390 - 220 - 0.0 - -1 - null - - - 1730217578770 - - 1550770 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1742919550888 - - 780780 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 380 - 130 - 0.0 - -1 - null - - - 1742919565761 - - 800800 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1744808981703 - - -400870 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 16 - - - LEFT - - - 1747830521606 - - 20290 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 340 - 100 - 0.0 - -1 - null - - - 1747830569531 - - 30300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - 1750856789809 - - 20630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 340 - 180 - 0.0 - -1 - null - - - 1750857047506 - - 40640 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 14 - - - LEFT - - - - - - 1726584205975 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - - - 1726584206081 - - 00 - - false - true - false - <![CDATA[]]> - 1920 - 980 - - - - - - - 1709049506453 - - true - false - - 1709049506459 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089955 - true - 1709107200000 - - - - - - - - - - - 1709049506456 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049506460 - 1709049506454 - - - 1709049506454 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - - 1709049506460 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - - - - - 1709049506453 - - true - false - - 1709049506460 - - - - - - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - - - - - - - - - - - - - - - - - - false - - - - - CONTINUOUS - - - - - - MOORE - USER_DEF - USER_DEF - - - - - - - true - 1658477089954 - true - 1709107200000 - - - - - - - - - - - 1709049506456 - - 0-150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049506460 - 1709049506454 - - - 1709049506454 - - 50-50 - - false - true - true - false - COLLECTION_OF_LINKS - true - - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - - - 1709049506460 - - 00 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - - - - EULER - RK45_NEWTON - MODIFIED_NEWTON - 1.0 - 1.0 - 1.0 - 0.1 - - 1658477089982 - 1920 - 980 - - - 1658477089953 - false - false - false - - - - - - - - 1658477103163 - - 4096 - - - - - - - - - false - realTimeScaled - 5.0 - false - false - false - - - - - - - - - - 1715862317301 - - - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}]]> - - - - 1715862317307 - - - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}]]> - - - - 1726584206084 - - - - - - 1726584206085 - - - - - - 1726584206086 - - - - - - 1726584206087 - - - - - - 1726584206088 - - - - - - 1726584206089 - - - - - - 1726584206090 - - - - - - 1726584206091 - - - - - - 1726584206093 - - databaseNames; - - //Map centre coordinates - Double map_centre_latitude; - Double map_centre_longitude; - Double map_scale; - - //Project specific actors - String grid_operator; - Boolean hasCongestionPricing; - String energy_coop; - String energy_supplier; - - //Project totals - Double total_electricity_consumption_companies_kWh_p_yr; - Double total_gas_consumption_companies_m3_p_yr; - Double avg_electricity_consumption_house_kWh_p_yr; - Double avg_gas_consumption_house_m3_p_yr; - Double avg_number_of_cars_per_household; - Integer total_cars_houses; - Integer total_cars_companies; - Integer total_vans_companies; - Integer total_trucks_companies; - - //Project data parameters - Double gridnode_profile_timestep_hr; -}]]> - - - - 1726584206094 - - Put on 'false' to prevent electric assets from being made on top of real - //electricity total or profile, to prevent wrong energy totals. - boolean runHeadlessAtStartup;// Runs year simulation on starting of the model - Boolean showKPISummary; // Setting used to active the KPI summary of the resultsUI. If on true, it will be shown after a year simulation - ArrayList subscopesToSimulate; // Selected subscopes to simulate (used for larger models that have memory/speed problems). - OL_RadioButtonSetup resultsUIRadioButtonSetup; // Selected (radiobuttons -> graphs) setup for the resultsUI. - boolean isPublicModel; // Boolean used to control if the model should be ran in a public version mode: - // Connection owners where dataSharingAgreed = false, cant be clicked. Just like low level gridnodes. - List activeMapOverlayTypes; //If defined it will override the default map overlay setup as defined in the generic interface/loader. - //Add all map overlays to this list that you want to be usable in the simulation - -}]]> - - - - 1726584206095 - - - - - - 1726584206096 - - - - - - 1726584206097 - - - - - - 1737714961123 - - list) { - double[] array = new double[list.size()]; - for (int i = 0; i < array.length; i++) { - array[i] = list.get(i); - } - return array; - } -} - - - - - - - - - - - - -]]> - - - - 1744204067723 - - getLorumIpsum(int width_ch, String descriptionText) { - //return this.restrictWidth(descriptionText, width_ch); - //} - - public Pair restrictWidth( String txt, int width_ch ) { - StringBuilder output = new StringBuilder(); - int remainingTextSize = txt.length(); - int currentIndex = 0; - int lines = 0; - while (remainingTextSize > width_ch) { - int i = 0; - while (!Character.isWhitespace(txt.charAt(currentIndex + width_ch - i))) { - i++; - if (i > width_ch) { - throw new RuntimeException("Impossible to format string to fit within width."); - } - } - output.append(txt.substring(currentIndex, currentIndex + width_ch - i)); - output.append('\n'); - currentIndex += width_ch - i + 1; - remainingTextSize -= width_ch - i + 1; - lines++; - } - output.append(txt.substring(currentIndex, txt.length())); - lines++; - return new Pair(output.toString(), lines); - } - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose
- * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}]]>
-
- - - 1749138380458 - - argumentsList; - List valuesList; - - double[] getArgumentsArray() { - return ListUtil.doubleListToArray(argumentsList); - } - double[] getValuesArray() { - return ListUtil.doubleListToArray(valuesList); - } - -}]]> - - - - 1749549699201 - - arguments_hr; - - // Weather data - List ambientTemperatureProfile_degC; - List PVProductionProfile35DegSouth_fr; - List PVProductionProfile15DegEastWest_fr; - List windProductionProfile_fr; - - //EPEX data - List epexProfile_eurpMWh; - - // Various demand profiles - List defaultHouseElectricityDemandProfile_fr; - List defaultHouseHotWaterDemandProfile_fr; - List defaultHouseCookingDemandProfile_fr; - List defaultOfficeElectricityDemandProfile_fr; - List defaultBuildingHeatDemandProfile_fr; - - //Maximum getters - public double getDefaultOfficeElectricityDemandProfileMaximum_fr() { - return Collections.max(defaultOfficeElectricityDemandProfile_fr); - } - public double getDefaultBuildingHeatDemandProfileMaximum_fr() { - return Collections.max(defaultBuildingHeatDemandProfile_fr); - } -}]]> - - - - 1749649742298 - - valuesList; - -}]]> - - - - 1749738288352 - - - -
- - - 1658477089999 - - false - FILE_SYSTEM - - - 1658477089998 - - false - FILE_SYSTEM - - - 1658477089997 - - false - FILE_SYSTEM - - - 1658477089996 - - false - FILE_SYSTEM - - - 1658477089995 - - false - FILE_SYSTEM - - - 1658477089994 - - false - FILE_SYSTEM - - - 1658477089993 - - false - FILE_SYSTEM - - - 1658477089992 - - false - FILE_SYSTEM - - - 1658477089991 - - false - FILE_SYSTEM - - - 1658477089990 - - false - FILE_SYSTEM - - - 1658477089989 - - false - FILE_SYSTEM - - - 1658477089988 - - false - FILE_SYSTEM - - - 1658477089987 - - false - FILE_SYSTEM - - - 1658477089986 - - false - FILE_SYSTEM - - - 1658477089985 - - false - FILE_SYSTEM - - - 1658477089984 - - false - FILE_SYSTEM - - - 1658477089983 - - false - FILE_SYSTEM - - - - - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - true - false - - - - - - - true - false - - -
- - 9f7858c9-b2c8-4ead-9244-fd08833f642b - 404652e6-561a-404c-aab2-ab7415f40ef5 - 6fd6cd57-6dfe-4fc6-be0b-c74065351957 - 3325dc48-3ad4-41e3-836f-dfd0e98fe1ed - 3f69ef3d-706e-41a6-8af0-11658c5eef68 - 3f6fe405-e047-4304-91d6-6eee206d1106 - 820d2b51-5b4a-48e7-b0b6-e46418e3c0f2 - 630818fa-8975-4b70-976f-03180dce01db - 7c7e471c-004e-495e-a4ad-d840620ab38e - 3e38ff63-1f70-4ec0-b42c-e879b146785d - b1eb86e4-14b3-405c-8257-56b80f1b485d - d55f9fb6-86bb-45ea-9db1-79cecfa0ce91 - ab77aafd-8f02-4354-b789-928d45b1f73c - e4f14fd7-1c4a-42e9-b91d-db2415f475db - 6d208120-6c7a-45a6-b411-402f18890d9b - 1816cdd0-177c-4973-9e88-dd8b95318556 - 5c23f62f-06dc-46ad-8ead-688ec434e3e5 - 5c7d7990-3f35-41eb-ae16-d0c16098acc6 - 02a16c52-a834-4f30-b6af-a6aee51a294e - f0988929-2718-4984-a1b6-c1f2ce152f1f - 1c9d9cfe-ea2b-43f9-8f62-dc31d8ed3ae1 - 34cb742a-8ba4-47a7-87e6-f2685fe69e97 - 4fe10751-c399-4752-94b7-30113ad45070 - c13fe5ac-6466-446e-886a-12df1431b1eb - 714f9ca2-426e-4bff-8569-2d18f58fdcf8 - 045aeb5f-1087-4ac7-9702-a49404e7f7e8 - 840e9a0a-de98-4b7d-a172-f9bbda2d6b98 - e342358b-75ed-4812-9376-6043fb6cb473 - f3d5ccdc-1bb3-466f-871d-f6b92a26cbb4 - 59acb6fb-561c-4038-b722-a596a748b3c7 - be7e6726-05c0-4228-821d-a8df91aeb5bc - df4a6a60-9ce8-4c6c-91c0-ad5a5d732259 - 47491eb9-4606-42bd-8399-125a2b95fded - 9b2d1306-5d19-439a-8f2c-b144dd7e22fa - ef421152-8732-4f97-9acb-c8e9a6890d5e - d48f8080-25b1-44f5-8322-7bf2712ff974 - 6c4de826-daad-4cd4-b703-51dfe803e822 - 01af22d6-6889-4e98-a3df-e6eddc40fc92 - ea3b3dbe-cca2-4bde-957b-feaef7e18789 - e737c8c6-b526-4f88-b89e-554e205b0614 - efd24e87-d7f7-425f-9cb0-3ee17c7b2116 - a62607e6-047e-4910-a1ec-5426bf9283b5 - 64dceb5b-de05-47c7-8e40-e9b293e80d75 - 8d51c652-6aee-4de8-ba03-47b289a13ec5 - 51d7b5ce-5664-4750-b1a0-fabcdc31e49a - 6522e3af-aa9e-421c-b667-e11db73cd8ca - 9ac073a0-7abf-4dff-826f-9c44d4780590 - 2da9c21c-adc7-405a-a36e-46fbd9dfcd42 - fe4d1053-9c84-4221-bac7-cb489a7064ff - 1f005f88-e6d7-4bdc-81fa-3acf4c89cf64 - 42dc5a7c-d7b1-4653-92b9-9359b46cc2d4 - e25721a9-34f9-479c-a4c3-31f5ec9e117d - 506d1de3-06df-4131-9e88-e43f1768e3d8 - e6625695-25a2-43d0-9056-1e9a1a594b1e - 91990287-4edf-4e38-aa6c-66d0e906807b - 2216cdd0-177c-5678-9e88-dd8b95312234 - -
\ No newline at end of file diff --git a/_alp/Agents/Zero_Interface/Code/Functions.xml b/_alp/Agents/Zero_Interface/Code/Functions.xml index 2cf472bb..3eb948c8 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.xml +++ b/_alp/Agents/Zero_Interface/Code/Functions.xml @@ -1868,7 +1868,7 @@ - + VOID double 1752836715726 diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index c65976b0..d90d8117 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3192,7 +3192,7 @@ GridNode f_createHeatGridNode() J_ProfilePointer f_createEngineProfile(String profileID,double[] arguments,double[] values) {/*ALCODESTART::1749125189323*/ TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); +J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); energyModel.f_addProfile(profilePointer); return profilePointer; /*ALCODEEND*/} @@ -3907,3 +3907,65 @@ else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) return connectedBuildingsData; /*ALCODEEND*/} +J_ProfilePointer f_createEngineProfile1(String profileID,double[] arguments,double[] values,EnergyModel energyModel) +{/*ALCODESTART::1753349205424*/ +TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer; +if (energyModel.f_findProfile(profileID)!=null) { + profilePointer=energyModel.f_findProfile(profileID); + profilePointer.setTableFunction(tf_profile); +} else { + profilePointer = new J_ProfilePointer(profileID, tf_profile); + energyModel.f_addProfile(profilePointer); +} +return profilePointer; +/*ALCODEEND*/} + +double f_setEngineProfilesAfterDeserialisation(EnergyModel energyModel) +{/*ALCODESTART::1753349205426*/ +energyModel.p_truckTripsCsv = inputCSVtruckTrips; +energyModel.p_householdTripsCsv = inputCSVhouseholdTrips; +energyModel.p_cookingPatternCsv = inputCSVcookingActivities; + +//Profile Arguments +double[] a_arguments_hr = ListUtil.doubleListToArray(defaultProfiles_data.arguments_hr()); + +//Weather data +double[] a_ambientTemperatureProfile_degC = ListUtil.doubleListToArray(defaultProfiles_data.ambientTemperatureProfile_degC()); +double[] a_PVProductionProfile35DegSouth_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile35DegSouth_fr()); +double[] a_PVProductionProfile15DegEastWest_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile15DegEastWest_fr()); +double[] a_windProductionProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.windProductionProfile_fr()); + +//EPEX data +double[] a_epexProfile_eurpMWh = ListUtil.doubleListToArray(defaultProfiles_data.epexProfile_eurpMWh()); + +//Various demand data +double[] a_defaultHouseElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseElectricityDemandProfile_fr()); +double[] a_defaultHouseHotWaterDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseHotWaterDemandProfile_fr()); +double[] a_defaultHouseCookingDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseCookingDemandProfile_fr()); +double[] a_defaultOfficeElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultOfficeElectricityDemandProfile_fr()); +double[] a_defaultBuildingHeatDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultBuildingHeatDemandProfile_fr()); + +//Create Weather engine profiles +energyModel.pp_ambientTemperature_degC = f_createEngineProfile1("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC, energyModel); +energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile1("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr, energyModel); +energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile1("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr, energyModel); +energyModel.pp_windProduction_fr = f_createEngineProfile1("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr, energyModel); + +//Create Epex engine profile +energyModel.pp_dayAheadElectricityPricing_eurpMWh = f_createEngineProfile1("epex_price_eurpMWh", a_arguments_hr, a_epexProfile_eurpMWh, energyModel); + +//Create Consumption engine profiles: +f_createEngineProfile1("default_house_electricity_demand_fr", a_arguments_hr, a_defaultHouseElectricityDemandProfile_fr, energyModel); +f_createEngineProfile1("default_house_hot_water_demand_fr", a_arguments_hr, a_defaultHouseHotWaterDemandProfile_fr, energyModel); +f_createEngineProfile1("default_house_cooking_demand_fr", a_arguments_hr, a_defaultHouseCookingDemandProfile_fr, energyModel); +f_createEngineProfile1("default_office_electricity_demand_fr", a_arguments_hr, a_defaultOfficeElectricityDemandProfile_fr, energyModel); +f_createEngineProfile1("default_building_heat_demand_fr", a_arguments_hr, a_defaultBuildingHeatDemandProfile_fr, energyModel); + + +//Create custom engine profiles +for(CustomProfile_data customProfile : c_customProfiles_data){ + f_createEngineProfile1(customProfile.customProfileID(), customProfile.getArgumentsArray(), customProfile.getValuesArray(), energyModel); +} +/*ALCODEEND*/} + diff --git a/_alp/Agents/Zero_Loader/Code/Functions.xml b/_alp/Agents/Zero_Loader/Code/Functions.xml index b70d1b2f..c0238acc 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.xml +++ b/_alp/Agents/Zero_Loader/Code/Functions.xml @@ -1739,4 +1739,58 @@ verbruik = levering + productie - teruglevering]]> + + RETURNS_VALUE + J_ProfilePointer + 1753349205424 + + + 151 + 1140 + + false + true + true + + + + + + + + + + + + + + + + + + + + VOID + double + 1753349205426 + + + 132 + 1120 + + false + true + true + + + + + + diff --git a/_alp/Agents/Zero_Loader/EmbeddedObjects.xml b/_alp/Agents/Zero_Loader/EmbeddedObjects.xml index f320bf6b..a3918fbb 100644 --- a/_alp/Agents/Zero_Loader/EmbeddedObjects.xml +++ b/_alp/Agents/Zero_Loader/EmbeddedObjects.xml @@ -27,15 +27,9 @@ - - - - - - @@ -60,9 +54,6 @@ - - - diff --git a/_alp/Agents/Zero_Loader/Levels/Level.level.xml b/_alp/Agents/Zero_Loader/Levels/Level.level.xml index 6bfaa07e..330a0306 100644 --- a/_alp/Agents/Zero_Loader/Levels/Level.level.xml +++ b/_alp/Agents/Zero_Loader/Levels/Level.level.xml @@ -1102,4 +1102,55 @@ LEFT + + 1753349205420 + + 72 + 1060 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -16777216 + null + SOLID + 340 + 210 + 0.0 + -1 + null + + + 1753349205422 + + 92 + 1070 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + + 14 + + + LEFT + From a3ce87dbf9005a827be1ce4c17d9012352fb011b Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:57:48 +0200 Subject: [PATCH 2/4] Placed (de-)serialisation functionality in Zero_Loader agent, projects can add Mixin classes if they use their own types. --- _alp/Agents/Zero_Loader/AOC.Zero_Loader.xml | 4 + _alp/Agents/Zero_Loader/Code/Functions.java | 112 ++++++++++ _alp/Agents/Zero_Loader/Code/Functions.xml | 115 ++++++++++- _alp/Agents/Zero_Loader/EmbeddedObjects.xml | 109 ++++++++++ .../Agents/Zero_Loader/Levels/Level.level.xml | 194 +++++++++++++++++- _alp/Agents/Zero_Loader/Variables.xml | 69 +++++-- 6 files changed, 572 insertions(+), 31 deletions(-) diff --git a/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml b/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml index eb6cd69f..99190fbf 100644 --- a/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml +++ b/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml @@ -12,6 +12,10 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TextNode; import com.fasterxml.jackson.databind.node.NumericNode; import com.fasterxml.jackson.core.type.TypeReference; + +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; + import java.io.FileOutputStream; import java.util.stream.Stream; import java.util.stream.IntStream; diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index d90d8117..a0bf842c 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3969,3 +3969,115 @@ J_ProfilePointer f_createEngineProfile1(String profileID,double[] arguments,doub } /*ALCODEEND*/} +double f_reconstructGridConnections(EnergyModel deserializedEnergyModel) +{/*ALCODESTART::1753449467888*/ +ArrayList allConnections = new ArrayList<>(); +allConnections.addAll(deserializedEnergyModel.c_gridConnections); +allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); + +for(GridConnection GC : allConnections){ + GC.energyModel = deserializedEnergyModel; + if (GC instanceof GCHouse){ + //toMove.add(GC); + f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); + } else if (GC instanceof GCEnergyProduction) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); + } else if (GC instanceof GCEnergyConversion) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); + } else if (GC instanceof GCGridBattery) { + f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); + } else if (GC instanceof GCNeighborhood) { + f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); + } else if (GC instanceof GCPublicCharger) { + f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); + } else if (GC instanceof GCUtility) { + f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); + } + GC.f_startAfterDeserialisation(); +} + + +/*ALCODEEND*/} + +double f_reconstructEnergyModel(EnergyModel energyModel) +{/*ALCODESTART::1753449467890*/ +// Code Instead of Agent.goToPopulation() (which resets all parameters to default!) + +try{ // Reflection trick to get to Agent.owner private field + energyModel.forceSetOwner(energyModel, pop_energyModels); +} catch (Exception e) { + e.printStackTrace(); +} + +energyModel.setEngine(getEngine()); +energyModel.instantiateBaseStructure_xjal(); +energyModel.setEnvironment(this.getEnvironment()); +traceln("EnergyModel owner: %s", energyModel.getOwner()); + +pop_energyModels._add(energyModel ); // Add to the population +int popSize = pop_energyModels.size(); +pop_energyModels.callCreate(energyModel , popSize); // Update population object +energyModel.start(); +/*ALCODEEND*/} + +double f_reconstructAgent(Agent agent,AgentArrayList pop,EnergyModel energyModel) +{/*ALCODESTART::1753449467892*/ +// Code Instead of Agent.goToPopulation() (which resets many variables to default!) +try{ // Reflection trick to get to Agent.owner private field + if (agent instanceof GridNode) { + + ((GridNode)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GridConnection) { + ((GridConnection)agent).forceSetOwner(agent,pop); + } else if (agent instanceof Actor) { + ((Actor)agent).forceSetOwner(agent,pop); + } +} catch (Exception e) { + e.printStackTrace(); +} + + +agent.setEngine(getEngine()); +agent.instantiateBaseStructure_xjal(); +agent.setEnvironment(pop.getEnvironment()); + +pop._add(agent); // Add to the population +int popSize = pop.size(); +pop.callCreate(agent, popSize); // Update population object + +/*ALCODEEND*/} + +double f_reconstructGridConnections1(EnergyModel energyModel) +{/*ALCODESTART::1753449467894*/ +// Code Instead of Agent.goToPopulation() (which resets many variables to default!) +GC.energyModel = energyModel; +try{ // Reflection trick to get to Agent.owner private field + GC.forceSetOwner(GC,pop); +} catch (Exception e) { + e.printStackTrace(); +} + +traceln("GC owner: %s", GC.getOwner()); +GC.setEngine(getEngine()); +GC.instantiateBaseStructure_xjal(); +GC.setEnvironment(pop.getEnvironment()); + +pop._add(GC); // Add to the population +int popSize = pop.size(); +pop.callCreate(GC, popSize); // Update population object + +/*ALCODEEND*/} + +double f_addMixins() +{/*ALCODESTART::1753451091785*/ +v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); +v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +/*ALCODEEND*/} + diff --git a/_alp/Agents/Zero_Loader/Code/Functions.xml b/_alp/Agents/Zero_Loader/Code/Functions.xml index c0238acc..1cf438f5 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.xml +++ b/_alp/Agents/Zero_Loader/Code/Functions.xml @@ -1745,8 +1745,9 @@ verbruik = levering + productie - teruglevering]]> 1753349205424 - 151 - 1140 + true + 1279 + 1030 LEFT + + false + 1753449467882 + + 1233.333 + 713 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); + +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + /*objectMapper.addMixIn(Agent.class, AgentMixin.class); + objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); + objectMapper.addMixIn(Actor.class, ActorMixin.class); + objectMapper.addMixIn(AgentArrayList.class, PopulationMixin.class); + objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); + //objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); + objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); + */ + // Weirdness regarding material handling toolbox + + v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); + v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); + + EnergyModel deserializedEnergyModel = v_objectMapper.readValue(new File("energyModel.json"), EnergyModel.class); + //loader_L4L.energyModel = deserializedEnergyModel; + f_reconstructEnergyModel(deserializedEnergyModel); + + f_reconstructGridConnections(deserializedEnergyModel); + + + for(Actor AC : deserializedEnergyModel.c_actors){ + + if (AC instanceof ConnectionOwner) { + ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); + } else if (AC instanceof EnergySupplier) { + ((EnergySupplier)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); + } else if (AC instanceof EnergyCoop) { + ((EnergyCoop)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); + ((EnergyCoop)AC).f_startAfterDeserialisation(); + } else if (AC instanceof GridOperator) { + ((GridOperator)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); + } + } + + //toMove.forEach(house -> f_reconstructGridConnection(house, deserializedEnergyModel.Houses, deserializedEnergyModel)); + + for(GridNode GN : deserializedEnergyModel.c_gridNodes){ + GN.energyModel = deserializedEnergyModel; + f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); + } + + for(GIS_Object GO : deserializedEnergyModel.c_GISObjects){ + GO.gisRegion = c_GISregions.get(GO.p_id); + + if (GO instanceof GIS_Building) { + ((GIS_Building)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); + } else if (GO instanceof GIS_Parcel) { + ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); + } else { + GO.energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); + //GO.f_startAfterDeserialisation(); + } + GO.f_resetStyle(); + } + + //loader_GENIUS.f_setEngineProfilesAfterDeserialisation(deserializedEnergyModel); + // Get profilePointer tableFunctions from 'original' model + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + //loader_L4L.f_setEngineProfilesL4LafterDeserialisation(deserializedEnergyModel); + deserializedEnergyModel.b_isInitialized = false; + deserializedEnergyModel.f_initializeEngine(); + + energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + zero_Interface.f_clearSelectionAndSelectEnergyModel(); + //agent.goToPopulation(myAgents1); + //objectMapper.writeValue(new File("objects.json"), myAgents.get(0)); +} catch (IOException e) { + e.printStackTrace(); +} + + + + + + deserialize_energy_model + + + + false + 1753449467884 + + 1236.333 + 610 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + energyModel.pop_gridNodes.forEach(x->energyModel.c_gridNodes.add(x)); +energyModel.pop_GIS_Buildings.forEach(x->{energyModel.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Objects.forEach(x->{energyModel.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Parcels.forEach(x->{energyModel.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); + +v_objectMapper = new ObjectMapper(); +f_addMixins(); + +v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); + + +try { + + //objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + + //objectMapper.writeValue(new File("objects.json"), myAgents.get(0)); + v_objectMapper.writeValue(new File("energyModel.json"), energyModel); +} catch (IOException e) { + e.printStackTrace(); +} + + + + + serialize_energy_model + + diff --git a/_alp/Agents/Zero_Loader/Variables.xml b/_alp/Agents/Zero_Loader/Variables.xml index 130aeb54..0d00e022 100644 --- a/_alp/Agents/Zero_Loader/Variables.xml +++ b/_alp/Agents/Zero_Loader/Variables.xml @@ -3,7 +3,7 @@ 1726584205883 - 1480 + 1620 170 LEFT - - 1701951640330 - - 910 - 880 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1701951640332 - - -510 - -100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 200 - 0.0 - -3092235 - v_themeColor - null - - - 1701951640336 - - -500 - -84 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - DOTTED - 1000 - 172 - 0.0 - -1 - null - - - 1701951640338 - - -470 - -100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -1 - - - - 18 - - - LEFT - - - 1701951640396 - - -165 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074247375 - - -10 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074154126 - - -340 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074154148 - - -60 - -79 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 16 - - - LEFT - - - 1724074154158 - - -120 - -59 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 271 - 0 - 0 - - - 1724074839746 - - -75 - -19 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074853961 - - -55 - 40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridLineColorCongested - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorCongested - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853963 - - -25 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074853967 - - -55 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_MVLVLineColor - null - SOLID - 1 - 0 - 1 - 0 - - v_MVLVNodeColor - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853969 - - -25 - -21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074853971 - - -55 - 15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridNodeLineColorStrained - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorStrained - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853973 - - -25 - 2 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - - - 1724074839748 - - 75 - 5 - - true - true - false - SHAPE_DRAW_2D3D - b_showCables - false - 0 - 0.0 - - - 1724074864095 - - true - -15 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074864097 - - true - -40 - 25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -16776961 - v_HVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870571 - - -15 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074870573 - - -15 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074870575 - - -40 - -15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -6737204 - v_LVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870577 - - -40 - -40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -12156236 - v_MVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074875518 - - true - -15 - -2.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 12 - - - LEFT - - - 1724074875520 - - true - -35 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 5.75 - 40 - 0.0 - -1 - v_gasGridColor - null - - - - - - - 1724074493431 - - 80 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074500599 - - 50 - -84 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 16 - - - LEFT - - - 1724074502826 - - 380 - -64 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - -458 - 0 - 0 - - - 1724074508882 - - -180 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074508886 - - 4 - -71 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - - 11 - - - CENTER - - - - - - - 1696863329245 @@ -2551,7 +1722,7 @@ van het gebied, en de huidige gasconsumptie voor verwarming.]]> 1719217632486 50 - -720 + -750