@@ 562-597 (lines=36) @@ | ||
559 | return dsm |
|
560 | ||
561 | ||
562 | def ind_sites_vent_data_import_individual(ind_vent_share, wz): |
|
563 | """ |
|
564 | Import industry sites necessary to identify DSM-potential. |
|
565 | ---------- |
|
566 | ind_vent_share: float |
|
567 | Share of considered application in industry demand |
|
568 | wz: int |
|
569 | Wirtschaftszweig to be considered within industry sites |
|
570 | """ |
|
571 | ||
572 | # import load data |
|
573 | ||
574 | sources = config.datasets()["DSM_CTS_industry"]["sources"][ |
|
575 | "ind_sites_loadcurves_individual" |
|
576 | ] |
|
577 | ||
578 | dsm = db.select_dataframe( |
|
579 | f""" |
|
580 | SELECT site_id, bus_id as bus, scn_name, p_set FROM |
|
581 | {sources['schema']}.{sources['table']} |
|
582 | WHERE wz = {wz} |
|
583 | """ |
|
584 | ) |
|
585 | ||
586 | # calculate share of timeseries for ventilation |
|
587 | ||
588 | timeseries = dsm["p_set"].copy() |
|
589 | ||
590 | for index, liste in timeseries.items(): |
|
591 | share = [float(item) * ind_vent_share for item in liste] |
|
592 | timeseries.loc[index] = share |
|
593 | ||
594 | dsm["p_set"] = timeseries.copy() |
|
595 | ||
596 | return dsm |
|
597 | ||
598 | ||
599 | def calc_ind_site_timeseries(scenario): |
|
600 | # calculate timeseries per site |
|
@@ 525-559 (lines=35) @@ | ||
522 | return dsm |
|
523 | ||
524 | ||
525 | def ind_sites_vent_data_import(ind_vent_share, wz): |
|
526 | """ |
|
527 | Import industry sites necessary to identify DSM-potential. |
|
528 | ---------- |
|
529 | ind_vent_share: float |
|
530 | Share of considered application in industry demand |
|
531 | wz: int |
|
532 | Wirtschaftszweig to be considered within industry sites |
|
533 | """ |
|
534 | ||
535 | # import load data |
|
536 | ||
537 | sources = config.datasets()["DSM_CTS_industry"]["sources"][ |
|
538 | "ind_sites_loadcurves" |
|
539 | ] |
|
540 | ||
541 | dsm = db.select_dataframe( |
|
542 | f""" |
|
543 | SELECT bus, scn_name, p_set FROM |
|
544 | {sources['schema']}.{sources['table']} |
|
545 | WHERE wz = {wz} |
|
546 | """ |
|
547 | ) |
|
548 | ||
549 | # calculate share of timeseries for ventilation |
|
550 | ||
551 | timeseries = dsm["p_set"].copy() |
|
552 | ||
553 | for index, liste in timeseries.items(): |
|
554 | share = [float(item) * ind_vent_share for item in liste] |
|
555 | timeseries.loc[index] = share |
|
556 | ||
557 | dsm["p_set"] = timeseries.copy() |
|
558 | ||
559 | return dsm |
|
560 | ||
561 | ||
562 | def ind_sites_vent_data_import_individual(ind_vent_share, wz): |