Skip to content

Commit 47a1797

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e608ae6 commit 47a1797

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

modelitool/combitabconvert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def df_to_combitimetable(df, filename):
4747
raise ValueError(f"df must be an instance of pandas DataFrame. Got {type(df)}")
4848
if not isinstance(df.index, pd.DatetimeIndex):
4949
raise ValueError(
50-
f"DataFrame index must be an instance of DatetimeIndex. " f"Got {type(df)}"
50+
f"DataFrame index must be an instance of DatetimeIndex. Got {type(df)}"
5151
)
5252
if not df.index.is_monotonic_increasing:
5353
raise ValueError(

tutorials/Modelica models Handling.ipynb

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
"metadata": {},
88
"outputs": [],
99
"source": [
10-
"import pandas as pd\n",
1110
"import os\n",
12-
"from pathlib import Path"
11+
"from pathlib import Path\n",
12+
"\n",
13+
"import pandas as pd"
1314
]
1415
},
1516
{
@@ -98,10 +99,8 @@
9899
"outputs": [],
99100
"source": [
100101
"reference_df = pd.read_csv(\n",
101-
" Path(TUTORIAL_DIR) / \"resources/study_df.csv\",\n",
102-
" index_col=0,\n",
103-
" parse_dates=True\n",
104-
") "
102+
" Path(TUTORIAL_DIR) / \"resources/study_df.csv\", index_col=0, parse_dates=True\n",
103+
")"
105104
]
106105
},
107106
{
@@ -137,7 +136,7 @@
137136
"source": [
138137
"df_to_combitimetable(\n",
139138
" df=reference_df.loc[\"2018-03-22\":\"2018-03-23\"],\n",
140-
" filename=\"resources/boundary_temp.txt\"\n",
139+
" filename=\"resources/boundary_temp.txt\",\n",
141140
")"
142141
]
143142
},
@@ -164,11 +163,7 @@
164163
"metadata": {},
165164
"outputs": [],
166165
"source": [
167-
"output_list = [\n",
168-
" \"T_coat_ins.T\",\n",
169-
" \"T_ins_ins.T\",\n",
170-
" \"Tw_out.T\"\n",
171-
"]"
166+
"output_list = [\"T_coat_ins.T\", \"T_ins_ins.T\", \"Tw_out.T\"]"
172167
]
173168
},
174169
{
@@ -277,12 +272,12 @@
277272
"outputs": [],
278273
"source": [
279274
"simulation_opt = {\n",
280-
" \"startTime\": second_index[0],\n",
281-
" \"stopTime\": second_index[-1],\n",
282-
" \"stepSize\": 300,\n",
283-
" \"tolerance\": 1e-06,\n",
284-
" \"solver\": \"dassl\",\n",
285-
" \"outputFormat\": \"csv\"\n",
275+
" \"startTime\": second_index[0],\n",
276+
" \"stopTime\": second_index[-1],\n",
277+
" \"stepSize\": 300,\n",
278+
" \"tolerance\": 1e-06,\n",
279+
" \"solver\": \"dassl\",\n",
280+
" \"outputFormat\": \"csv\",\n",
286281
"}"
287282
]
288283
},
@@ -314,7 +309,7 @@
314309
" \"Tins1_init\": 19.70 + 273.15,\n",
315310
" \"Tins2_init\": 10.56 + 273.15,\n",
316311
" \"Tcoat_init\": 6.4 + 273.15,\n",
317-
" 'Lambda_ins.k': 0.04,\n",
312+
" \"Lambda_ins.k\": 0.04,\n",
318313
"}"
319314
]
320315
},
@@ -341,7 +336,7 @@
341336
"outputs": [],
342337
"source": [
343338
"init_res_OM = simu_OM.simulate(\n",
344-
" simflags = \"-initialStepSize=60 -maxStepSize=3600 -w -lv=LOG_STATS\",\n",
339+
" simflags=\"-initialStepSize=60 -maxStepSize=3600 -w -lv=LOG_STATS\",\n",
345340
" parameter_dict=parameter_dict_OM,\n",
346341
" x=reference_df,\n",
347342
" year=2024,\n",

0 commit comments

Comments
 (0)