Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mayer
CircularGreenSimCity
Commits
bbfb7f67
Commit
bbfb7f67
authored
Jun 21, 2023
by
Eric Duminil
Browse files
Removing unused code
parent
e22302f4
Changes
1
Show whitespace changes
Inline
Side-by-side
python_scripts/simstadt_urbi/compare_heat_demands.py
View file @
bbfb7f67
...
@@ -9,7 +9,6 @@ S_DEMAND = 'Simstadt heat demand [MWh / a]' # Inkl Warmwasser?
...
@@ -9,7 +9,6 @@ S_DEMAND = 'Simstadt heat demand [MWh / a]' # Inkl Warmwasser?
U_DEMAND
=
'Urbi+ heat demand [MWh / a]'
U_DEMAND
=
'Urbi+ heat demand [MWh / a]'
AREA
=
'Area [m²]'
AREA
=
'Area [m²]'
TYPE
=
'Usage Type'
TYPE
=
'Usage Type'
SUFFIX
=
''
# Could be 'Bensheim', for example
# Feldberg : 2.493 (Average : 3.0°C, Min : -18°C)
# Feldberg : 2.493 (Average : 3.0°C, Min : -18°C)
# Original : 2.487 (Average : 7.9°C, Min : -12°C), Würzburg
# Original : 2.487 (Average : 7.9°C, Min : -12°C), Würzburg
...
@@ -46,7 +45,7 @@ def get_simstadt_heat_demand():
...
@@ -46,7 +45,7 @@ def get_simstadt_heat_demand():
def
get_urbi_heat_demand
():
def
get_urbi_heat_demand
():
urbi_csvs
=
list
(
PROJ_DIR
.
glob
(
f
'**/
{
CITYGML
}
{
SUFFIX
}
.csv'
))
urbi_csvs
=
list
(
PROJ_DIR
.
glob
(
f
'**/
{
CITYGML
}
.csv'
))
assert
len
(
urbi_csvs
)
==
1
assert
len
(
urbi_csvs
)
==
1
urbi_csv_filename
=
urbi_csvs
[
0
]
urbi_csv_filename
=
urbi_csvs
[
0
]
urbi_results
=
{}
urbi_results
=
{}
...
@@ -70,16 +69,16 @@ def compare_results(simstadt_df, urbi_df):
...
@@ -70,16 +69,16 @@ def compare_results(simstadt_df, urbi_df):
simstadt_urbi
=
simstadt_urbi
.
dropna
()
simstadt_urbi
=
simstadt_urbi
.
dropna
()
simstadt_urbi
.
round
(
1
).
to_csv
(
simstadt_urbi
.
round
(
1
).
to_csv
(
f
'simstadt_vs_urbi_heat_demands_
{
CITYGML
}
{
SUFFIX
}
.csv'
,
sep
=
';'
,
decimal
=
'.'
)
f
'simstadt_vs_urbi_heat_demands_
{
CITYGML
}
.csv'
,
sep
=
';'
,
decimal
=
'.'
)
plt
.
rcParams
[
"figure.figsize"
]
=
(
10
,
10
)
plt
.
rcParams
[
"figure.figsize"
]
=
(
10
,
10
)
fig
=
simstadt_urbi
.
plot
.
scatter
(
fig
=
simstadt_urbi
.
plot
.
scatter
(
x
=
S_DEMAND
,
y
=
U_DEMAND
,
title
=
f
'Urbi vs SimStadt Heat-demand
\n
{
CITYGML
}
{
SUFFIX
}
'
)
x
=
S_DEMAND
,
y
=
U_DEMAND
,
title
=
f
'Urbi vs SimStadt Heat-demand
\n
{
CITYGML
}
'
)
max_heat_demand
=
simstadt_urbi
.
max
().
max
()
max_heat_demand
=
simstadt_urbi
.
max
().
max
()
fig
.
plot
([
0
,
max_heat_demand
],
[
0
,
max_heat_demand
])
fig
.
plot
([
0
,
max_heat_demand
],
[
0
,
max_heat_demand
])
fig
.
axis
(
'equal'
)
fig
.
axis
(
'equal'
)
plt
.
savefig
(
plt
.
savefig
(
f
'simstadt_vs_urbi_heat_demands_
{
CITYGML
}
{
SUFFIX
}
.png'
,
bbox_inches
=
'tight'
)
f
'simstadt_vs_urbi_heat_demands_
{
CITYGML
}
.png'
,
bbox_inches
=
'tight'
)
print
(
"Correlation:"
)
print
(
"Correlation:"
)
print
(
simstadt_urbi
.
corr
())
print
(
simstadt_urbi
.
corr
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment