Skip to content

Commit

Permalink
area.get_wind_matrix() is just here to check to absence or not of the…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
killian-scalian committed Jan 10, 2025
1 parent b0ea55f commit 99a8781
Showing 1 changed file with 66 additions and 66 deletions.
132 changes: 66 additions & 66 deletions src/andromede/input_converter/src/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,28 @@ def _convert_wind_to_component_list(

for area in areas:
try:
if area.get_wind_matrix().any:
series_path = (
self.study_path
/ "input"
/ "wind"
/ "series"
/ f"wind_{area.id}.txt"
)
area.get_wind_matrix()
series_path = (
self.study_path
/ "input"
/ "wind"
/ "series"
/ f"wind_{area.id}.txt"
)

components.append(
InputComponent(
id=area.id,
model="wind",
parameters=[
InputComponentParameter(
name="wind",
type="timeseries",
timeseries=str(series_path),
)
],
)
components.append(
InputComponent(
id=area.id,
model="wind",
parameters=[
InputComponentParameter(
name="wind",
type="timeseries",
timeseries=str(series_path),
)
],
)
)
except FileNotFoundError:
pass

Expand All @@ -204,29 +204,29 @@ def _convert_solar_to_component_list(

for area in areas:
try:
if area.get_solar_matrix().any:
series_path = (
self.study_path
/ "input"
/ "solar"
/ "series"
/ f"solar_{area.id}.txt"
)
components.extend(
[
InputComponent(
id=area.id,
model="solar",
parameters=[
InputComponentParameter(
name="solar",
type="timeseries",
timeseries=str(series_path),
)
],
)
]
)
area.get_solar_matrix()
series_path = (
self.study_path
/ "input"
/ "solar"
/ "series"
/ f"solar_{area.id}.txt"
)
components.extend(
[
InputComponent(
id=area.id,
model="solar",
parameters=[
InputComponentParameter(
name="solar",
type="timeseries",
timeseries=str(series_path),
)
],
)
]
)
except FileNotFoundError:
pass

Expand All @@ -238,29 +238,29 @@ def _convert_load_to_component_list(
components = []
for area in areas:
try:
if area.get_load_matrix().any:
series_path = (
self.study_path
/ "input"
/ "load"
/ "series"
/ f"load_{area.id}.txt"
)
components.extend(
[
InputComponent(
id=area.id,
model="load",
parameters=[
InputComponentParameter(
name="load",
type="timeseries",
timeseries=str(series_path),
)
],
)
]
)
area.get_load_matrix()
series_path = (
self.study_path
/ "input"
/ "load"
/ "series"
/ f"load_{area.id}.txt"
)
components.extend(
[
InputComponent(
id=area.id,
model="load",
parameters=[
InputComponentParameter(
name="load",
type="timeseries",
timeseries=str(series_path),
)
],
)
]
)
except FileNotFoundError:
pass

Expand Down

0 comments on commit 99a8781

Please sign in to comment.