From 72c4212743153cd6b0531f1aa094cda33cacfbef Mon Sep 17 00:00:00 2001 From: "christoph.von.oy" <christoph.von.oy@rwth-aachen.de> Date: Wed, 27 Mar 2024 12:36:20 +0100 Subject: [PATCH] Clean-up of imports --- demand_generator/__init__.py | 4 ---- demand_generator/electrical_demand/ElectricalDemand.py | 4 ++-- demand_generator/electrical_demand/__init__.py | 4 ---- demand_generator/thermal_demand/ThermalDemand.py | 3 ++- demand_generator/thermal_demand/__init__.py | 4 ---- input_profile_processor/calc_irradiance.py | 1 - input_profile_processor/input_profile_processor.py | 7 ++++--- 7 files changed, 8 insertions(+), 19 deletions(-) diff --git a/demand_generator/__init__.py b/demand_generator/__init__.py index 428eabc..e6d5f4f 100644 --- a/demand_generator/__init__.py +++ b/demand_generator/__init__.py @@ -1,6 +1,2 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -# Created by jgn on 30.11.2020. - from .electrical_demand import * from .thermal_demand import * diff --git a/demand_generator/electrical_demand/ElectricalDemand.py b/demand_generator/electrical_demand/ElectricalDemand.py index ef3acb8..4a5ea5d 100644 --- a/demand_generator/electrical_demand/ElectricalDemand.py +++ b/demand_generator/electrical_demand/ElectricalDemand.py @@ -25,11 +25,11 @@ THE SOFTWARE. # Smoothing factors pkl for household demand calculated with formula from VDEW 1999 # Formula adjusted for accuracy by oemof: https://github.com/oemof/demandlib/blob/master/demandlib/bdew.py +import calendar import datetime import numpy as np -import pandas as pd import os -import calendar +import pandas as pd def add_weekdays2df(time_df, holidays=None, holiday_is_sunday=False): diff --git a/demand_generator/electrical_demand/__init__.py b/demand_generator/electrical_demand/__init__.py index f6a5fb1..f13315f 100644 --- a/demand_generator/electrical_demand/__init__.py +++ b/demand_generator/electrical_demand/__init__.py @@ -1,5 +1 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -# Created by jgn on 30.11.2020. - from .ElectricalDemand import ElectricalDemand diff --git a/demand_generator/thermal_demand/ThermalDemand.py b/demand_generator/thermal_demand/ThermalDemand.py index 5136e79..6b6768b 100644 --- a/demand_generator/thermal_demand/ThermalDemand.py +++ b/demand_generator/thermal_demand/ThermalDemand.py @@ -21,10 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ + from math import ceil import numpy as np -import pandas as pd import os +import pandas as pd # This is needed if we provide a default temperature pattern ''' diff --git a/demand_generator/thermal_demand/__init__.py b/demand_generator/thermal_demand/__init__.py index bc249bb..263bcf5 100644 --- a/demand_generator/thermal_demand/__init__.py +++ b/demand_generator/thermal_demand/__init__.py @@ -1,5 +1 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -# Created by jgn on 30.11.2020. - from .ThermalDemand import ThermalDemand diff --git a/input_profile_processor/calc_irradiance.py b/input_profile_processor/calc_irradiance.py index d0d47ea..4a2fa2d 100644 --- a/input_profile_processor/calc_irradiance.py +++ b/input_profile_processor/calc_irradiance.py @@ -24,7 +24,6 @@ THE SOFTWARE. import numpy as np import pandas as pd -from datetime import timedelta def calc_total_irradiance(irradiance, timer, beta, psi_f, phi, lambda_st, lambda_1, alpha_albedo=0.2, reflection=1, refraction_index=2): """ diff --git a/input_profile_processor/input_profile_processor.py b/input_profile_processor/input_profile_processor.py index c97120c..6d26a6e 100644 --- a/input_profile_processor/input_profile_processor.py +++ b/input_profile_processor/input_profile_processor.py @@ -21,14 +21,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import pandas as pd -from datetime import datetime -from datetime import timedelta + from Tooling.demand_generator.electrical_demand.ElectricalDemand import ElectricalDemand from Tooling.demand_generator.thermal_demand.ThermalDemand import ThermalDemand from Tooling.input_profile_processor.calc_irradiance import generate_g_t_series from Tooling.modifier import Modifier +from datetime import datetime, timedelta +import pandas as pd + def process_input_profiles(input_profile_dict, t_start, dynamic): d_step_min = min(dynamic.step_size_p(position) for position in range(dynamic.number_of_steps())) # This entire process assumes four things: -- GitLab