@@ 494-528 (lines=35) @@ | ||
491 | return dsm |
|
492 | ||
493 | ||
494 | def ind_osm_data_import_individual(ind_vent_cool_share): |
|
495 | """ |
|
496 | Import industry data per osm-area necessary to identify DSM-potential. |
|
497 | ||
498 | Parameters |
|
499 | ---------- |
|
500 | ind_share: float |
|
501 | Share of considered application in industry demand |
|
502 | """ |
|
503 | ||
504 | # import load data |
|
505 | ||
506 | sources = config.datasets()["DSM_CTS_industry"]["sources"][ |
|
507 | "ind_osm_loadcurves_individual" |
|
508 | ] |
|
509 | ||
510 | dsm = db.select_dataframe( |
|
511 | f""" |
|
512 | SELECT osm_id, bus_id as bus, scn_name, p_set FROM |
|
513 | {sources['schema']}.{sources['table']} |
|
514 | """ |
|
515 | ) |
|
516 | ||
517 | # calculate share of timeseries for cooling and ventilation out of |
|
518 | # industry-data |
|
519 | ||
520 | timeseries = dsm["p_set"].copy() |
|
521 | ||
522 | for index, liste in timeseries.items(): |
|
523 | share = [float(item) * ind_vent_cool_share for item in liste] |
|
524 | ||
525 | timeseries.loc[index] = share |
|
526 | ||
527 | dsm["p_set"] = timeseries.copy() |
|
528 | ||
529 | return dsm |
|
530 | ||
531 | ||
@@ 456-487 (lines=32) @@ | ||
453 | return dsm |
|
454 | ||
455 | ||
456 | def ind_osm_data_import(ind_vent_cool_share): |
|
457 | """ |
|
458 | Import industry data per osm-area necessary to identify DSM-potential. |
|
459 | ||
460 | Parameters |
|
461 | ---------- |
|
462 | ind_share: float |
|
463 | Share of considered application in industry demand |
|
464 | """ |
|
465 | ||
466 | # import load data |
|
467 | ||
468 | sources = config.datasets()["DSM_CTS_industry"]["sources"][ |
|
469 | "ind_osm_loadcurves" |
|
470 | ] |
|
471 | ||
472 | dsm = db.select_dataframe( |
|
473 | f""" |
|
474 | SELECT bus, scn_name, p_set FROM |
|
475 | {sources['schema']}.{sources['table']} |
|
476 | """ |
|
477 | ) |
|
478 | ||
479 | # calculate share of timeseries for cooling and ventilation out of |
|
480 | # industry-data |
|
481 | ||
482 | timeseries = dsm["p_set"].copy() |
|
483 | ||
484 | for index, liste in timeseries.items(): |
|
485 | share = [float(item) * ind_vent_cool_share for item in liste] |
|
486 | ||
487 | timeseries.loc[index] = share |
|
488 | ||
489 | dsm["p_set"] = timeseries.copy() |
|
490 |