{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### **Import all functions and libraries**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from src.Functions_Load_Emulator_and_DSM import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **General input**\n", "\n", "Before to run the emulation of the domestic load profiles is necessary to specify some useful parameters. In particular:\n", "\n", "- Start day for simulation;\n", "\n", "- End day for simulation;\n", "\n", "- Total number of users to emulate;" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "start_day = date(2025, 1, 1) # start day for simulation\n", "end_day = date(2025, 12, 31) # end day for simulation\n", "\n", "num_days = (end_day - start_day).days + 1 # total number of days" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "num_user = 20 # number of emulated users" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **Usage probability of all appliances**\n", "\n", "To emulate the domestic load profile are used the following usage probability on quarterly level." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "name": "dish_washer", "type": "scatter", "x": [ "2025-01-01T00:00:00", "2025-01-01T00:15:00", "2025-01-01T00:30:00", "2025-01-01T00:45:00", "2025-01-01T01:00:00", "2025-01-01T01:15:00", "2025-01-01T01:30:00", "2025-01-01T01:45:00", "2025-01-01T02:00:00", "2025-01-01T02:15:00", "2025-01-01T02:30:00", "2025-01-01T02:45:00", "2025-01-01T03:00:00", "2025-01-01T03:15:00", "2025-01-01T03:30:00", "2025-01-01T03:45:00", "2025-01-01T04:00:00", "2025-01-01T04:15:00", "2025-01-01T04:30:00", "2025-01-01T04:45:00", "2025-01-01T05:00:00", "2025-01-01T05:15:00", "2025-01-01T05:30:00", "2025-01-01T05:45:00", "2025-01-01T06:00:00", "2025-01-01T06:15:00", "2025-01-01T06:30:00", "2025-01-01T06:45:00", "2025-01-01T07:00:00", "2025-01-01T07:15:00", "2025-01-01T07:30:00", "2025-01-01T07:45:00", "2025-01-01T08:00:00", "2025-01-01T08:15:00", "2025-01-01T08:30:00", "2025-01-01T08:45:00", "2025-01-01T09:00:00", "2025-01-01T09:15:00", "2025-01-01T09:30:00", "2025-01-01T09:45:00", "2025-01-01T10:00:00", "2025-01-01T10:15:00", "2025-01-01T10:30:00", "2025-01-01T10:45:00", "2025-01-01T11:00:00", "2025-01-01T11:15:00", "2025-01-01T11:30:00", "2025-01-01T11:45:00", "2025-01-01T12:00:00", "2025-01-01T12:15:00", "2025-01-01T12:30:00", "2025-01-01T12:45:00", "2025-01-01T13:00:00", "2025-01-01T13:15:00", "2025-01-01T13:30:00", "2025-01-01T13:45:00", "2025-01-01T14:00:00", "2025-01-01T14:15:00", "2025-01-01T14:30:00", "2025-01-01T14:45:00", "2025-01-01T15:00:00", "2025-01-01T15:15:00", "2025-01-01T15:30:00", "2025-01-01T15:45:00", "2025-01-01T16:00:00", "2025-01-01T16:15:00", "2025-01-01T16:30:00", "2025-01-01T16:45:00", "2025-01-01T17:00:00", "2025-01-01T17:15:00", "2025-01-01T17:30:00", "2025-01-01T17:45:00", "2025-01-01T18:00:00", "2025-01-01T18:15:00", "2025-01-01T18:30:00", "2025-01-01T18:45:00", "2025-01-01T19:00:00", "2025-01-01T19:15:00", "2025-01-01T19:30:00", "2025-01-01T19:45:00", "2025-01-01T20:00:00", "2025-01-01T20:15:00", "2025-01-01T20:30:00", "2025-01-01T20:45:00", "2025-01-01T21:00:00", "2025-01-01T21:15:00", "2025-01-01T21:30:00", "2025-01-01T21:45:00", "2025-01-01T22:00:00", "2025-01-01T22:15:00", "2025-01-01T22:30:00", "2025-01-01T22:45:00", "2025-01-01T23:00:00", "2025-01-01T23:15:00", "2025-01-01T23:30:00", "2025-01-01T23:45:00" ], "y": [ 0.9001873765526497, 0.6826999899607696, 0.5134138331310983, 0.4515685633140463, 0.31678464986680616, 0.14802308584466947, 0.09327456767971272, 0.0921895223578439, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.07682537314136022, 0.08450744774960206, 0.0921895223578439, 0.0921895223578439, 0.09186331470244197, 0.09531625743781344, 0.0921895223578439, 0.0921895223578439, 0.09186331470244197, 0.08810382931217153, 0.13956482209892873, 0.1980728256541559, 0.20089301807922647, 0.19384369378128555, 0.19243359756875025, 0.2953544263775292, 0.36655329584557395, 0.4064929118670716, 0.4591569399787153, 0.34239657787479927, 0.2939454869297294, 0.3497131148266333, 0.31447806098428327, 0.4624976765347464, 0.27984683833384755, 0.30036553121157583, 0.2706817913347359, 0.2826647172294471, 0.4624976765347464, 0.25587867301495415, 0.28901072856822363, 0.32778085544216334, 0.3306010478672339, 0.32778085544216334, 0.2836063237241179, 0.22627012284591966, 0.2681496333287968, 0.5289144805863671, 0.7179483465975774, 0.8926722616545603, 1.1887261451088027, 1.6236800965273246, 2.2270920438509756, 2.865301622694864, 3.366093995797273, 3.577526297381347, 3.4569162222377945, 3.326853065675998, 2.478396208093469, 1.9641226674109713, 1.4348324696385244, 0.910872181061219, 0.6050562057690658, 0.5078359135766723, 0.24248449414297218, 0.18397417705827404, 0.2713735366465457, 0.40155815350556584, 0.5797242148270558, 0.3860386122262842, 0.35597815263392707, 0.5878391507993098, 0.7989797163170987, 0.8030075711259975, 0.9653236420421077, 1.457515083748068, 2.1762290158064026, 2.8185237093135957, 3.476238126320207, 3.9837159055347793, 4.346179112628685, 4.581901160128113, 4.6151905356854055, 4.480621009302474, 4.3585946685344625, 4.187295162682708, 3.8310544244538303, 3.1922205231570002, 2.338261100979955 ] }, { "name": "washing_machine", "type": "scatter", "x": [ "2025-01-01T00:00:00", "2025-01-01T00:15:00", "2025-01-01T00:30:00", "2025-01-01T00:45:00", "2025-01-01T01:00:00", "2025-01-01T01:15:00", "2025-01-01T01:30:00", "2025-01-01T01:45:00", "2025-01-01T02:00:00", "2025-01-01T02:15:00", "2025-01-01T02:30:00", "2025-01-01T02:45:00", "2025-01-01T03:00:00", "2025-01-01T03:15:00", "2025-01-01T03:30:00", "2025-01-01T03:45:00", "2025-01-01T04:00:00", "2025-01-01T04:15:00", "2025-01-01T04:30:00", "2025-01-01T04:45:00", "2025-01-01T05:00:00", "2025-01-01T05:15:00", "2025-01-01T05:30:00", "2025-01-01T05:45:00", "2025-01-01T06:00:00", "2025-01-01T06:15:00", "2025-01-01T06:30:00", "2025-01-01T06:45:00", "2025-01-01T07:00:00", "2025-01-01T07:15:00", "2025-01-01T07:30:00", "2025-01-01T07:45:00", "2025-01-01T08:00:00", "2025-01-01T08:15:00", "2025-01-01T08:30:00", "2025-01-01T08:45:00", "2025-01-01T09:00:00", "2025-01-01T09:15:00", "2025-01-01T09:30:00", "2025-01-01T09:45:00", "2025-01-01T10:00:00", "2025-01-01T10:15:00", "2025-01-01T10:30:00", "2025-01-01T10:45:00", "2025-01-01T11:00:00", "2025-01-01T11:15:00", "2025-01-01T11:30:00", "2025-01-01T11:45:00", "2025-01-01T12:00:00", "2025-01-01T12:15:00", "2025-01-01T12:30:00", "2025-01-01T12:45:00", "2025-01-01T13:00:00", "2025-01-01T13:15:00", "2025-01-01T13:30:00", "2025-01-01T13:45:00", "2025-01-01T14:00:00", "2025-01-01T14:15:00", "2025-01-01T14:30:00", "2025-01-01T14:45:00", "2025-01-01T15:00:00", "2025-01-01T15:15:00", "2025-01-01T15:30:00", "2025-01-01T15:45:00", "2025-01-01T16:00:00", "2025-01-01T16:15:00", "2025-01-01T16:30:00", "2025-01-01T16:45:00", "2025-01-01T17:00:00", "2025-01-01T17:15:00", "2025-01-01T17:30:00", "2025-01-01T17:45:00", "2025-01-01T18:00:00", "2025-01-01T18:15:00", "2025-01-01T18:30:00", "2025-01-01T18:45:00", "2025-01-01T19:00:00", "2025-01-01T19:15:00", "2025-01-01T19:30:00", "2025-01-01T19:45:00", "2025-01-01T20:00:00", "2025-01-01T20:15:00", "2025-01-01T20:30:00", "2025-01-01T20:45:00", "2025-01-01T21:00:00", "2025-01-01T21:15:00", "2025-01-01T21:30:00", "2025-01-01T21:45:00", "2025-01-01T22:00:00", "2025-01-01T22:15:00", "2025-01-01T22:30:00", "2025-01-01T22:45:00", "2025-01-01T23:00:00", "2025-01-01T23:15:00", "2025-01-01T23:30:00", "2025-01-01T23:45:00" ], "y": [ 0.7541951685925694, 0.6798636427428516, 0.5455962697521213, 0.40343293088018883, 0.30699318304939177, 0.27710899419551555, 0.35465076589135913, 0.2195701700485967, 0.20707766627475255, 0.1924665029653518, 0.1877797712654841, 0.16135664330578162, 0.1390611076974446, 0.13766150836789506, 0.18158604812737747, 0.21409900903308487, 0.2827377414574737, 0.3513192759109301, 0.46028899802305967, 0.5098136860590342, 0.4795372825473358, 0.5389348461986354, 0.5442196274313132, 0.6769568963343261, 0.8596353089759593, 0.9513040456476779, 1.0735055261253146, 1.0625958886491096, 1.1144913742149547, 1.2197720217528671, 1.2127195508470885, 1.1202351010715423, 1.219062299991094, 1.279317833206379, 1.3633395513560975, 1.5014495385083233, 1.7215757545457697, 2.0342353304604375, 2.294685123795514, 2.4139528152865313, 2.4244795765491483, 2.3386723478619165, 2.21839120171042, 2.093671026092359, 1.975625853682107, 1.839700751199129, 1.7396389321314931, 1.6049412125023186, 1.5083758625965762, 1.4594050610342226, 1.444393511928295, 1.4787157964043127, 1.5268403014579728, 1.5329990054302025, 1.383541874689415, 1.3565094132434534, 1.2232465455708113, 1.1178281170702653, 1.0262405470430125, 0.9722230945759444, 0.9278421383545321, 0.916073364008812, 0.9889680923927817, 0.9763530215383682, 0.9013481938593894, 0.8016949317269845, 0.8396739953242437, 0.9032411743259613, 0.9330016287937387, 0.9796564961860956, 0.997371524897725, 1.012133270620397, 1.0372513509984174, 1.068155764884843, 1.069060426669998, 1.1036535260287974, 1.1487231925124568, 1.2321003245489326, 1.3425652483134558, 1.592422120102531, 1.6165920889895866, 1.2960175655088053, 1.1158086785046932, 1.068191951356249, 0.939247880680661, 0.8277246777233358, 0.919598043054329, 1.015625070560174, 0.9378190987128807, 0.8761024880768393, 0.8761024880768393, 0.8761024880768393, 0.8549018850549222, 0.814209614305884, 0.8326763877783392, 0.8483649740912212 ] }, { "name": "oven", "type": "scatter", "x": [ "2025-01-01T00:00:00", "2025-01-01T00:15:00", "2025-01-01T00:30:00", "2025-01-01T00:45:00", "2025-01-01T01:00:00", "2025-01-01T01:15:00", "2025-01-01T01:30:00", "2025-01-01T01:45:00", "2025-01-01T02:00:00", "2025-01-01T02:15:00", "2025-01-01T02:30:00", "2025-01-01T02:45:00", "2025-01-01T03:00:00", "2025-01-01T03:15:00", "2025-01-01T03:30:00", "2025-01-01T03:45:00", "2025-01-01T04:00:00", "2025-01-01T04:15:00", "2025-01-01T04:30:00", "2025-01-01T04:45:00", "2025-01-01T05:00:00", "2025-01-01T05:15:00", "2025-01-01T05:30:00", "2025-01-01T05:45:00", "2025-01-01T06:00:00", "2025-01-01T06:15:00", "2025-01-01T06:30:00", "2025-01-01T06:45:00", "2025-01-01T07:00:00", "2025-01-01T07:15:00", "2025-01-01T07:30:00", "2025-01-01T07:45:00", "2025-01-01T08:00:00", "2025-01-01T08:15:00", "2025-01-01T08:30:00", "2025-01-01T08:45:00", "2025-01-01T09:00:00", "2025-01-01T09:15:00", "2025-01-01T09:30:00", "2025-01-01T09:45:00", "2025-01-01T10:00:00", "2025-01-01T10:15:00", "2025-01-01T10:30:00", "2025-01-01T10:45:00", "2025-01-01T11:00:00", "2025-01-01T11:15:00", "2025-01-01T11:30:00", "2025-01-01T11:45:00", "2025-01-01T12:00:00", "2025-01-01T12:15:00", "2025-01-01T12:30:00", "2025-01-01T12:45:00", "2025-01-01T13:00:00", "2025-01-01T13:15:00", "2025-01-01T13:30:00", "2025-01-01T13:45:00", "2025-01-01T14:00:00", "2025-01-01T14:15:00", "2025-01-01T14:30:00", "2025-01-01T14:45:00", "2025-01-01T15:00:00", "2025-01-01T15:15:00", "2025-01-01T15:30:00", "2025-01-01T15:45:00", "2025-01-01T16:00:00", "2025-01-01T16:15:00", "2025-01-01T16:30:00", "2025-01-01T16:45:00", "2025-01-01T17:00:00", "2025-01-01T17:15:00", "2025-01-01T17:30:00", "2025-01-01T17:45:00", "2025-01-01T18:00:00", "2025-01-01T18:15:00", "2025-01-01T18:30:00", "2025-01-01T18:45:00", "2025-01-01T19:00:00", "2025-01-01T19:15:00", "2025-01-01T19:30:00", "2025-01-01T19:45:00", "2025-01-01T20:00:00", "2025-01-01T20:15:00", "2025-01-01T20:30:00", "2025-01-01T20:45:00", "2025-01-01T21:00:00", "2025-01-01T21:15:00", "2025-01-01T21:30:00", "2025-01-01T21:45:00", "2025-01-01T22:00:00", "2025-01-01T22:15:00", "2025-01-01T22:30:00", "2025-01-01T22:45:00", "2025-01-01T23:00:00", "2025-01-01T23:15:00", "2025-01-01T23:30:00", "2025-01-01T23:45:00" ], "y": [ 0.331163448320206, 0.22995212548395724, 0.2754972207602692, 0.22995212548395724, 0.24513382390939456, 0.26031552233483185, 0.26031552233483185, 0.28561835304389405, 0.22995212548395724, 0.22995212548395724, 0.26031552233483185, 0.24513382390939456, 0.2805577869020816, 0.2552549561930194, 0.24007325776758212, 0.3109211837529563, 0.27043665461845673, 0.295739485327519, 0.30586061761114386, 0.26031552233483185, 0.32610288217839356, 0.32610288217839356, 0.22995212548395724, 0.31598174989476874, 0.3210423160365811, 0.24007325776758212, 0.2653760884766443, 0.24007325776758212, 0.331163448320206, 0.2350126916257697, 0.3109211837529563, 0.22995212548395724, 0.22995212548395724, 0.3210423160365811, 0.2754972207602692, 0.3210423160365811, 0.2805577869020816, 0.30080005146933136, 0.331163448320206, 0.29067891918570654, 0.24513382390939456, 1.2667103109570717, 1.1525726153392535, 1.2954526397871855, 1.6776080394076742, 2.1032809341369885, 2.3320016551931055, 2.773337002131329, 3.444467597003115, 4.019725766318262, 3.6910065714445524, 3.4239233853227367, 3.0472679776707072, 3.5523972431064643, 4.048073370989315, 2.628617461890848, 1.557836246818638, 1.2292503135199955, 0.8192871029502471, 0.7827633102494064, 0.9379944897941225, 0.9866923177767835, 0.8299412815341433, 0.8482031778845638, 0.9212507632862456, 0.5248127591581813, 0.5327460400131627, 0.4814403336120876, 0.41752032267485467, 0.6906458247699945, 0.6077520645117263, 0.7310207083047545, 0.8421161602436534, 1.4567834883881658, 1.8606487167570303, 1.6902088491007876, 1.9571182891184007, 1.8282712145817142, 1.988063651075584, 2.5770173992258574, 2.97878417950125, 2.8372519525024202, 2.8144237386367044, 2.8996487330309675, 2.268603725996169, 1.4219212482372205, 1.1206134532983267, 1.2210538832256397, 0.9060336408978156, 0.6168830126869365, 0.5902138291195848, 0.3536053723037636, 0.280556100046701, 0.26685883435619534, 0.32164621026283746, 0.27599146938678626 ] }, { "name": "tv", "type": "scatter", "x": [ "2025-01-01T00:00:00", "2025-01-01T00:15:00", "2025-01-01T00:30:00", "2025-01-01T00:45:00", "2025-01-01T01:00:00", "2025-01-01T01:15:00", "2025-01-01T01:30:00", "2025-01-01T01:45:00", "2025-01-01T02:00:00", "2025-01-01T02:15:00", "2025-01-01T02:30:00", "2025-01-01T02:45:00", "2025-01-01T03:00:00", "2025-01-01T03:15:00", "2025-01-01T03:30:00", "2025-01-01T03:45:00", "2025-01-01T04:00:00", "2025-01-01T04:15:00", "2025-01-01T04:30:00", "2025-01-01T04:45:00", "2025-01-01T05:00:00", "2025-01-01T05:15:00", "2025-01-01T05:30:00", "2025-01-01T05:45:00", "2025-01-01T06:00:00", "2025-01-01T06:15:00", "2025-01-01T06:30:00", "2025-01-01T06:45:00", "2025-01-01T07:00:00", "2025-01-01T07:15:00", "2025-01-01T07:30:00", "2025-01-01T07:45:00", "2025-01-01T08:00:00", "2025-01-01T08:15:00", "2025-01-01T08:30:00", "2025-01-01T08:45:00", "2025-01-01T09:00:00", "2025-01-01T09:15:00", "2025-01-01T09:30:00", "2025-01-01T09:45:00", "2025-01-01T10:00:00", "2025-01-01T10:15:00", "2025-01-01T10:30:00", "2025-01-01T10:45:00", "2025-01-01T11:00:00", "2025-01-01T11:15:00", "2025-01-01T11:30:00", "2025-01-01T11:45:00", "2025-01-01T12:00:00", "2025-01-01T12:15:00", "2025-01-01T12:30:00", "2025-01-01T12:45:00", "2025-01-01T13:00:00", "2025-01-01T13:15:00", "2025-01-01T13:30:00", "2025-01-01T13:45:00", "2025-01-01T14:00:00", "2025-01-01T14:15:00", "2025-01-01T14:30:00", "2025-01-01T14:45:00", "2025-01-01T15:00:00", "2025-01-01T15:15:00", "2025-01-01T15:30:00", "2025-01-01T15:45:00", "2025-01-01T16:00:00", "2025-01-01T16:15:00", "2025-01-01T16:30:00", "2025-01-01T16:45:00", "2025-01-01T17:00:00", "2025-01-01T17:15:00", "2025-01-01T17:30:00", "2025-01-01T17:45:00", "2025-01-01T18:00:00", "2025-01-01T18:15:00", "2025-01-01T18:30:00", "2025-01-01T18:45:00", "2025-01-01T19:00:00", "2025-01-01T19:15:00", "2025-01-01T19:30:00", "2025-01-01T19:45:00", "2025-01-01T20:00:00", "2025-01-01T20:15:00", "2025-01-01T20:30:00", "2025-01-01T20:45:00", "2025-01-01T21:00:00", "2025-01-01T21:15:00", "2025-01-01T21:30:00", "2025-01-01T21:45:00", "2025-01-01T22:00:00", "2025-01-01T22:15:00", "2025-01-01T22:30:00", "2025-01-01T22:45:00", "2025-01-01T23:00:00", "2025-01-01T23:15:00", "2025-01-01T23:30:00", "2025-01-01T23:45:00" ], "y": [ 1.0251107094231888, 0.9713470611748962, 0.9003481764068159, 0.8360375923777577, 0.8180306288496213, 0.7640097382652122, 0.7099888476808034, 0.6568254315501151, 0.6122367599566348, 0.5316341613068818, 0.4733258984538689, 0.4764128064872637, 0.5067674021489792, 0.49519149702374876, 0.5112691430310133, 0.594744281100731, 0.5543572343304823, 0.588227475252453, 0.5196295189547908, 0.49905013206549226, 0.45017408820340793, 0.46046378164805735, 0.4846445612429832, 0.5620745044139692, 0.5453537525664142, 0.5796527307152453, 0.6238126650818653, 0.7943643339269277, 0.8437548624612446, 0.8128857821272966, 0.7575786798623064, 0.8211175368830161, 0.903778074221699, 0.9432218990928547, 0.9312172567407638, 0.9328296517035404, 0.935568082118943, 0.8955367843500542, 0.8571875427685619, 0.8977774679945609, 0.9055174611510717, 0.9075405863771804, 0.9073157851578963, 0.9159703319842638, 0.9445772232144058, 0.9648622677062239, 0.9855430652409158, 1.0498832835870946, 1.0869236418634491, 1.128809668308729, 1.1660500124936766, 1.2174330372666153, 1.26743058911621, 1.3155358491918447, 1.3564477560752157, 1.3266601911202567, 1.2852270426659578, 1.247424252404333, 1.231463994649783, 1.2285417217115024, 1.2200160247130474, 1.2001704644612432, 1.196396833720345, 1.1863935939082022, 1.1631276538079514, 1.1489657772251893, 1.1739176835963463, 1.1532540241177358, 1.149621830929731, 1.1430998802347307, 1.1371644420660756, 1.1397494417192255, 1.1435708909521598, 1.1780537630723358, 1.237533541823, 1.3019199755923074, 1.3539750569930211, 1.410727003712531, 1.493869813266468, 1.558309761608111, 1.5898968910496045, 1.5803141852920484, 1.5620188531051258, 1.5559938088560568, 1.6055851407579456, 1.6856913074309654, 1.7032998597454212, 1.678617852033317, 1.6608144872394723, 1.6468773261285496, 1.593807121554192, 1.5197750311527904, 1.4585027192061115, 1.4292799783903145, 1.3254266283711342, 1.197565056916094 ] }, { "name": "microwaves", "type": "scatter", "x": [ "2025-01-01T00:00:00", "2025-01-01T00:15:00", "2025-01-01T00:30:00", "2025-01-01T00:45:00", "2025-01-01T01:00:00", "2025-01-01T01:15:00", "2025-01-01T01:30:00", "2025-01-01T01:45:00", "2025-01-01T02:00:00", "2025-01-01T02:15:00", "2025-01-01T02:30:00", "2025-01-01T02:45:00", "2025-01-01T03:00:00", "2025-01-01T03:15:00", "2025-01-01T03:30:00", "2025-01-01T03:45:00", "2025-01-01T04:00:00", "2025-01-01T04:15:00", "2025-01-01T04:30:00", "2025-01-01T04:45:00", "2025-01-01T05:00:00", "2025-01-01T05:15:00", "2025-01-01T05:30:00", "2025-01-01T05:45:00", "2025-01-01T06:00:00", "2025-01-01T06:15:00", "2025-01-01T06:30:00", "2025-01-01T06:45:00", "2025-01-01T07:00:00", "2025-01-01T07:15:00", "2025-01-01T07:30:00", "2025-01-01T07:45:00", "2025-01-01T08:00:00", "2025-01-01T08:15:00", "2025-01-01T08:30:00", "2025-01-01T08:45:00", "2025-01-01T09:00:00", "2025-01-01T09:15:00", "2025-01-01T09:30:00", "2025-01-01T09:45:00", "2025-01-01T10:00:00", "2025-01-01T10:15:00", "2025-01-01T10:30:00", "2025-01-01T10:45:00", "2025-01-01T11:00:00", "2025-01-01T11:15:00", "2025-01-01T11:30:00", "2025-01-01T11:45:00", "2025-01-01T12:00:00", "2025-01-01T12:15:00", "2025-01-01T12:30:00", "2025-01-01T12:45:00", "2025-01-01T13:00:00", "2025-01-01T13:15:00", "2025-01-01T13:30:00", "2025-01-01T13:45:00", "2025-01-01T14:00:00", "2025-01-01T14:15:00", "2025-01-01T14:30:00", "2025-01-01T14:45:00", "2025-01-01T15:00:00", "2025-01-01T15:15:00", "2025-01-01T15:30:00", "2025-01-01T15:45:00", "2025-01-01T16:00:00", "2025-01-01T16:15:00", "2025-01-01T16:30:00", "2025-01-01T16:45:00", "2025-01-01T17:00:00", "2025-01-01T17:15:00", "2025-01-01T17:30:00", "2025-01-01T17:45:00", "2025-01-01T18:00:00", "2025-01-01T18:15:00", "2025-01-01T18:30:00", "2025-01-01T18:45:00", "2025-01-01T19:00:00", "2025-01-01T19:15:00", "2025-01-01T19:30:00", "2025-01-01T19:45:00", "2025-01-01T20:00:00", "2025-01-01T20:15:00", "2025-01-01T20:30:00", "2025-01-01T20:45:00", "2025-01-01T21:00:00", "2025-01-01T21:15:00", "2025-01-01T21:30:00", "2025-01-01T21:45:00", "2025-01-01T22:00:00", "2025-01-01T22:15:00", "2025-01-01T22:30:00", "2025-01-01T22:45:00", "2025-01-01T23:00:00", "2025-01-01T23:15:00", "2025-01-01T23:30:00", "2025-01-01T23:45:00" ], "y": [ 0.5095318640142956, 0.3072826215114737, 0.1687937117721199, 0.24822043288175152, 0.2349835549378912, 0.18305174756745318, 0.1782847536720255, 0.17351775977659784, 0.17351775977659784, 0.21970845137593734, 0.23192826155317697, 0.15860940048973898, 0.15616761983287897, 0.190871989805169, 0.18219487479088342, 0.21689924476317343, 0.22557635977745907, 0.24292649972117789, 0.2602766396648967, 0.3154287071757609, 0.2808068205813269, 0.18916097097526435, 0.2502572951382277, 0.47632037501311775, 0.5985184767855145, 0.8514932924677322, 1.2970742939325204, 3.479295098498006, 2.3636927568587143, 1.6052417371337218, 1.6128826973187425, 3.4758138227759185, 2.522090836297748, 1.961006179442666, 2.040866449546648, 1.9243460672301385, 1.75191558834346, 1.514989243100697, 1.438276974971416, 1.06965126084422, 0.9223359479934695, 0.8925151393348998, 0.9956548090569072, 0.7390428854197267, 0.7757023159514458, 0.7237671001769643, 0.7186769895781999, 0.9589967418868062, 1.2196823900369391, 1.554704648697939, 1.502770796285075, 2.077771285169509, 2.1962324127484645, 2.1202945340178974, 2.410536498672814, 2.4166961664604707, 1.9502117638364747, 2.134332046071607, 1.8325165046461238, 1.2717781416418759, 0.8653228918747806, 0.5295841866838082, 0.33884921472119345, 0.35208813770747993, 0.5160357806103599, 0.6188843726270413, 0.7146032650652476, 0.832737185856014, 0.796068211792973, 0.8754928878601782, 0.5832420098619431, 0.4702111516053069, 0.7155398944964384, 0.8259367381081536, 0.8116882458441428, 0.6993288431841024, 0.9406663449401377, 1.23970880883572, 1.755308995409303, 2.2318734121519452, 2.6188295232258096, 2.663635039421816, 2.57346366540503, 2.2404544101722, 1.7532721331528267, 1.306576242725366, 0.8171116983583746, 0.9956698060346993, 0.5351058012344968, 0.3419045081059077, 0.3072826215114737, 0.5439956006611052, 0.4827418082313258, 0.6295274550936956, 0.40503973956777345, 0.3765277580619592 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Daily usage probability of appliances" }, "xaxis": { "rangeslider": { "visible": false }, "title": { "text": "time" } }, "yaxis": { "title": { "text": "[%]" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_appliance_usage_probability()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **Load profile of all appliances**\n", "\n", "To emulate the domestic load profile are used the following load profile on quarterly level." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "size": 5 }, "mode": "markers+lines", "name": "fridge", "type": "scatter", "x": [ "00:00", "00:15", "00:30", "00:45", "01:00", "01:15", "01:30", "01:45", "02:00", "02:15", "02:30", "02:45", "03:00", "03:15", "03:30", "03:45", "04:00", "04:15", "04:30", "04:45", "05:00", "05:15", "05:30", "05:45", "06:00", "06:15", "06:30", "06:45", "07:00", "07:15", "07:30", "07:45", "08:00", "08:15", "08:30", "08:45", "09:00", "09:15", "09:30", "09:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00", "20:15", "20:30", "20:45", "21:00", "21:15", "21:30", "21:45", "22:00", "22:15", "22:30", "22:45", "23:00", "23:15", "23:30", "23:45" ], "y": [ 0.07028571428571423, 0.06316483516483509, 0.07151648351648347, 0.0883516483516483, 0.08830769230769227, 0.08193406593406585, 0.06536263736263728, 0.06685714285714281, 0.07112087912087908, 0.07002197802197797, 0.07907692307692299, 0.07349450549450541, 0.07243956043956037, 0.06760439560439557, 0.05793406593406593, 0.06597802197802191, 0.07912087912087905, 0.07898901098901095, 0.08109890109890106, 0.05951648351648349, 0.06294505494505488, 0.06843956043956033, 0.08193406593406588, 0.08474725274725267, 0.07780219780219773, 0.05463736263736258, 0.06162637362637356, 0.07178021978021973, 0.0794725274725274, 0.07468131868131861, 0.07485714285714277, 0.06839560439560434, 0.0724395604395604, 0.0748571428571428, 0.08061538461538456, 0.08382417582417577, 0.07718681318681313, 0.07019780219780213, 0.06369230769230766, 0.0715604395604395, 0.0787252747252747, 0.08360439560439555, 0.08817582417582413, 0.07718681318681313, 0.07578021978021975, 0.07459340659340653, 0.07692307692307686, 0.08070329670329662, 0.0893626373626373, 0.08918681318681308, 0.07978021978021976, 0.06531868131868128, 0.06738461538461533, 0.06989010989010982, 0.08219780219780215, 0.08905494505494495, 0.07846153846153842, 0.0642637362637362, 0.06399999999999997, 0.05793406593406589, 0.07828571428571421, 0.09564835164835153, 0.08189010989010984, 0.06923076923076919, 0.06971428571428565, 0.07015384615384614, 0.0791648351648351, 0.08465934065934058, 0.07599999999999993, 0.07134065934065928, 0.07191208791208786, 0.08162637362637355, 0.07156043956043952, 0.07837362637362628, 0.07520879120879116, 0.08136263736263732, 0.08373626373626367, 0.07819780219780213, 0.07349450549450541, 0.08013186813186807, 0.09362637362637356, 0.09863736263736259, 0.08487912087912083, 0.08694505494505488, 0.08571428571428566, 0.07569230769230766, 0.07617582417582411, 0.08993406593406589, 0.0864615384615384, 0.08720879120879116, 0.07758241758241755, 0.06347252747252745, 0.07186813186813179, 0.08479120879120873, 0.09380219780219776, 0.08716483516483509 ] }, { "marker": { "size": 5 }, "mode": "markers+lines", "name": "electricity_mains", "type": "scatter", "x": [ "00:00", "00:15", "00:30", "00:45", "01:00", "01:15", "01:30", "01:45", "02:00", "02:15", "02:30", "02:45", "03:00", "03:15", "03:30", "03:45", "04:00", "04:15", "04:30", "04:45", "05:00", "05:15", "05:30", "05:45", "06:00", "06:15", "06:30", "06:45", "07:00", "07:15", "07:30", "07:45", "08:00", "08:15", "08:30", "08:45", "09:00", "09:15", "09:30", "09:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00", "20:15", "20:30", "20:45", "21:00", "21:15", "21:30", "21:45", "22:00", "22:15", "22:30", "22:45", "23:00", "23:15", "23:30", "23:45" ], "y": [ 0.3692307692307695, 0.3309890109890112, 0.32000000000000006, 0.3305494505494508, 0.3120879120879121, 0.28263736263736283, 0.2694505494505496, 0.2567032967032967, 0.2518681318681319, 0.23868131868131862, 0.21274725274725267, 0.20395604395604394, 0.1881318681318681, 0.18505494505494496, 0.17538461538461525, 0.16835164835164823, 0.16351648351648346, 0.16615384615384604, 0.16923076923076918, 0.15252747252747245, 0.1468131868131867, 0.14989010989010979, 0.16747252747252742, 0.16967032967032952, 0.16659340659340652, 0.14021978021978015, 0.14813186813186804, 0.15032967032967023, 0.15912087912087905, 0.16307692307692304, 0.19340659340659339, 0.21230769230769223, 0.2852747252747253, 0.23252747252747252, 0.22241758241758236, 0.2057142857142857, 0.22461538461538463, 0.21230769230769228, 0.2092307692307692, 0.20043956043956043, 0.20571428571428563, 0.1960439560439559, 0.21626373626373618, 0.21538461538461537, 0.18725274725274715, 0.1868131868131868, 0.19912087912087906, 0.18109890109890103, 0.19384615384615378, 0.20395604395604394, 0.22109890109890107, 0.2149450549450549, 0.24043956043956044, 0.27120879120879127, 0.26989010989011, 0.27296703296703295, 0.24659340659340664, 0.27648351648351654, 0.3059340659340661, 0.30109890109890114, 0.38505494505494503, 0.36439560439560426, 0.33142857142857124, 0.290989010989011, 0.25054945054945055, 0.20747252747252742, 0.20879120879120872, 0.22373626373626368, 0.20043956043956038, 0.2043956043956043, 0.24615384615384614, 0.2567032967032968, 0.25274725274725285, 0.25626373626373644, 0.25142857142857145, 0.2931868131868133, 0.3384615384615384, 0.3657142857142857, 0.3736263736263737, 0.3573626373626373, 0.32571428571428573, 0.3248351648351648, 0.3441758241758243, 0.433406593406593, 0.4615384615384614, 0.5296703296703295, 0.5406593406593404, 0.5578021978021975, 0.6210989010989006, 0.53010989010989, 0.501978021978022, 0.43956043956043966, 0.4865934065934064, 0.4615384615384613, 0.4369230769230769, 0.40967032967032974 ] } ], "layout": { "font": { "color": "black", "family": "Arial", "size": 14 }, "legend": { "orientation": "h", "x": 0.5, "xanchor": "center", "y": -0.4, "yanchor": "bottom" }, "paper_bgcolor": "white", "plot_bgcolor": "white", "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Load profile fridge and electricity mains" }, "xaxis": { "dtick": 4, "gridcolor": "lightgray", "gridwidth": 1, "linecolor": "gray", "linewidth": 1, "mirror": true, "range": [ 0, 95 ], "showgrid": true, "showline": true }, "yaxis": { "dtick": 0.1, "gridcolor": "lightgray", "gridwidth": 1, "linecolor": "gray", "linewidth": 1, "mirror": true, "range": [ 0, 0.8 ], "showgrid": true, "showline": true, "title": { "text": "[kW]" }, "zeroline": true, "zerolinecolor": "black", "zerolinewidth": 2 } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_main_appliance_load_profile()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\rollo\\OneDrive - RSE S.P.A\\Desktop\\CACER simulator - public repo\\CACER-simulator\\Functions_Load_Emulator_and_DSM.py:1674: UserWarning:\n", "\n", "Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n", "\n" ] }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "size": 5 }, "mode": "markers+lines", "name": "dish_washer", "type": "scatter", "x": [ 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, 930, 945, 960, 975, 990, 1005, 1020, 1035, 1050, 1065, 1080, 1095, 1110, 1125, 1140, 1155, 1170, 1185, 1200, 1215, 1230, 1245, 1260, 1275, 1290, 1305, 1320, 1335, 1350, 1365, 1380, 1395, 1410, 1425 ], "y": [ 0.864, 0.864, 0.108, 1.056, 1.024, 0.008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, { "marker": { "size": 5 }, "mode": "markers+lines", "name": "washing_machine", "type": "scatter", "x": [ 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, 930, 945, 960, 975, 990, 1005, 1020, 1035, 1050, 1065, 1080, 1095, 1110, 1125, 1140, 1155, 1170, 1185, 1200, 1215, 1230, 1245, 1260, 1275, 1290, 1305, 1320, 1335, 1350, 1365, 1380, 1395, 1410, 1425 ], "y": [ 0.928, 0.072, 0.056, 0.064, 0.072, 0.324, 0.736, 0.06, 0.06, 0.052, 0.06, 0.008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, { "marker": { "size": 5 }, "mode": "markers+lines", "name": "oven", "type": "scatter", "x": [ 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, 930, 945, 960, 975, 990, 1005, 1020, 1035, 1050, 1065, 1080, 1095, 1110, 1125, 1140, 1155, 1170, 1185, 1200, 1215, 1230, 1245, 1260, 1275, 1290, 1305, 1320, 1335, 1350, 1365, 1380, 1395, 1410, 1425 ], "y": [ 0.48666666666666664, 0.5613333333333334, 0.017333333333333333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, { "marker": { "size": 5 }, "mode": "markers+lines", "name": "tv", "type": "scatter", "x": [ 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, 930, 945, 960, 975, 990, 1005, 1020, 1035, 1050, 1065, 1080, 1095, 1110, 1125, 1140, 1155, 1170, 1185, 1200, 1215, 1230, 1245, 1260, 1275, 1290, 1305, 1320, 1335, 1350, 1365, 1380, 1395, 1410, 1425 ], "y": [ 0.06, 0.004, 0.076, 0.092, 0.04, 0.08, 0.084, 0.088, 0.092, 0.088, 0.024, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, { "marker": { "size": 5 }, "mode": "markers+lines", "name": "microwaves", "type": "scatter", "x": [ 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, 930, 945, 960, 975, 990, 1005, 1020, 1035, 1050, 1065, 1080, 1095, 1110, 1125, 1140, 1155, 1170, 1185, 1200, 1215, 1230, 1245, 1260, 1275, 1290, 1305, 1320, 1335, 1350, 1365, 1380, 1395, 1410, 1425 ], "y": [ 0.096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] } ], "layout": { "font": { "color": "black", "family": "Arial", "size": 14 }, "paper_bgcolor": "white", "plot_bgcolor": "white", "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Load profile of the different appliances" }, "xaxis": { "dtick": 15, "gridcolor": "lightgray", "gridwidth": 1, "linecolor": "gray", "linewidth": 1, "mirror": true, "range": [ 0, 180 ], "rangeslider": { "visible": false }, "showgrid": true, "showline": true, "title": { "text": "minutes" } }, "yaxis": { "dtick": 0.25, "gridcolor": "lightgray", "gridwidth": 1, "linecolor": "gray", "linewidth": 1, "mirror": true, "range": [ 0, 1.25 ], "showgrid": true, "showline": true, "title": { "text": "[kW]" }, "zeroline": true, "zerolinecolor": "black", "zerolinewidth": 2 } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_appliance_load_profile()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **Flag**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "flag_daily_activation = True # if false we dont use a daily usage activation for some specified appliances\n", "flag_multi_use = False # if true we activate the possibility to have multiple activations for the selected appliances during the day" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **1. Create calendar**\n", "\n", "Creating calendar for load profiles." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[34mGenerate calendar:\n", "\u001b[0m\n", "**** Calendar successfully created! *****\n" ] } ], "source": [ "calendar = generate_calendar_modified(start_day, end_day)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **2. Create start time dictionary**\n", "\n", "\n", "A dictionary is created with the activation time (number of the quarter-hour, from 0 to 95) for each day of the simulation and for each user.\n", "\n", "**start_time_dict**: \n", "\n", "- user_0:\n", " - **df_start_time_user_0**\n", "\n", "- user_1:\n", " - **df_start_time_user_0**\n", "\n", "- ...\n", "\n", " \n", "\n", "**df_start_time_user:**\n", "\n", "| index (type int) | appliance_0 (type int) | appliance_1 (type int) | ... | \n", "| :--- | :----: | :----: | ---: |\n", "| day_0 | start_time_day_0 | start_time_day_0 | ... | \n", "| day_1 | start_time_day_1 | start_time_day_1 | ... | \n", "| ... | ... | ... | ... | " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "(start_time_dict_1, start_time_dict_2, start_time_dict_3) = create_all_user_appliance_start_time_mod(num_user, num_days, calendar, flag_daily_activation, flag_multi_use)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **3. Create all_user load profile dictionary**\n", "\n", "\n", "A dictionary is created with the daily load profile for each user.\n", "\n", "**all_user_load_profile_dict**: \n", "\n", "- user_0:\n", " - **df_load_profile_user_0**:\n", "- user_1:\n", " - **df_load_profile_user_1**:.\n", "- ...\n", "\n", "**df_load_profile_user:**\n", "\n", "| index (type int) | day_0 (type float) | day_1 (type float) | ... | \n", "| :--- | :----: | :----:| ---:|\n", "| timestep_0 | kWh_timetep_0 | kWh_timetep_0 | ... | \n", "| timestep_1 | kWh_timetep_1 | kWh_timetep_1 | ... |\n", "| ... | ... | ... | ... | " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "emulated_users_list = create_emulated_users_list(num_user)\n", "all_user_load_profile_dict = create_all_user_load_profile(start_time_dict_1, start_time_dict_2, start_time_dict_3, emulated_users_list, num_days, flag_DSM = False, flag_all_appliance = True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **4. Create all user file dataframe**\n", "\n", "\n", "a dataframe is reconstructed with the load profiles of each user.\n", "\n", "**all_user_df:**\n", "\n", "| index (type int) | user_0 (type float) | user_1 (type float) | ... | \n", "| :--- | :----: | :----: | ---:|\n", "| timestep_0 | kWh_timetep_0 | kWh_timetep_0 | ... | \n", "| timestep_1 | kWh_timetep_1 | kWh_timetep_1 | ... |\n", "| ... | ... | ... | ... | " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "all_user_df = create_single_user_load_profile_df(all_user_load_profile_dict, calendar, flag_DSM = False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **Output: csv file with emulated load profile**\n", "\n", "The csv file with emulated load profile can be found at the following path:\n", "\n", "- emulated_load_profile.csv [[link csv](files/energy/input/emulated_load_profile.csv)]\n", "\n", "📂 *files/energy/input/emulated_load_profile.csv*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **6. Create all users appliance load profile dictionary**\n", "\n", "\n", "A dictionary is created with all appliance daily load profile for each user.\n", "\n", "**all_user_appliance_load_profile_dict**: \n", "\n", "- user_0:\n", " - appliance_0:\n", " - **df_appliance_load_profile_0**\n", " - appliance_1:\n", " - **df_appliance_load_profile_1**\n", " - ...\n", "\n", "- user_1:\n", " - appliance_0:\n", " - **df_appliance_load_profile_0**\n", " - appliance_1:\n", " - **df_appliance_load_profile_1**\n", " - ...\n", "- ...\n", "\n", " \n", "\n", "**df_appliace_load_profile:**\n", "\n", "| index (type int) | day_0 (type float) | day_1 (type float) | ... | \n", "| :--- | :----: | :----:| ---:|\n", "| timestep_0 | kWh_timetep_0 | kWh_timetep_0 | ... | \n", "| timestep_1 | kWh_timetep_1 | kWh_timetep_1 | ... |\n", "| ... | ... | ... | ... | " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "all_user_appliance_load_profile_dict = create_all_user_appliance_load_profile(start_time_dict_1, emulated_users_list, num_days, flag_DSM = False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **7. Plot**\n", "\n", "Before plotting the results, select a user for the visualization." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "user = 'u_001' # user to be plotted" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **7.1 Plot load profile**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# plot load profile for all days of the years for the selcted user\n", "plot_all_day_load_profile(all_user_load_profile_dict, user)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# plot average users load profiles\n", "plot_average_users_load_profile(all_user_load_profile_dict, plot_type = 'scatter plot') # plot_type : [scatter plot; barchart]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# comparison of average users load profiles with arera load profile for every region in a specified month \n", "\n", "month = 1 # month to be plotted\n", "\n", "comparison_average_load_profile_arera_profile(all_user_load_profile_dict, month)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **7.2 Plot single user appliance load profile**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# plot of appliance load profile for a single user for a selected day\n", "\n", "day = 0\n", "\n", "plot_single_user_appliance_load_profile(all_user_appliance_load_profile_dict, id_user = user, day = day)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **7.3 Plot single appliance load profile in each days for a single user**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# plot of all day appliance load profile for a single user\n", "\n", "appliance = 'washing_machine'\n", "\n", "plot_all_day_appliance_load_profile(user, appliance)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.11" } }, "nbformat": 4, "nbformat_minor": 2 }