Skip to content

Commit

Permalink
Merge branch 'main' into kt/fuels
Browse files Browse the repository at this point in the history
  • Loading branch information
ktehranchi authored Aug 27, 2024
2 parents 2824a09 + fcc37c0 commit c9b60c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/r2x/parser/plexos.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ def _construct_generators(self):
mapped_records = self._construct_value_curves(mapped_records, generator_name)
mapped_records["fuel_price"] = fuel_prices.get(generator_fuel_map.get(generator_name))


valid_fields, ext_data = self._field_filter(mapped_records, model_map.model_fields)

ts_fields = {k: v for k, v in mapped_records.items() if isinstance(v, SingleTimeSeries)}
Expand All @@ -595,6 +596,7 @@ def _construct_generators(self):

self.system.add_component(model_map(**valid_fields))
generator = self.system.get_component_by_label(f"{model_map.__name__}.{generator_name}")

if ts_fields:
generator = self.system.get_component_by_label(f"{model_map.__name__}.{generator_name}")
ts_dict = {"solve_year": self.study_year}
Expand Down Expand Up @@ -1107,6 +1109,7 @@ def _construct_load_profiles(self):
)
self.system.add_component(load)
ts_dict = {"solve_year": self.study_year}

self.system.add_time_series(ts, load, **ts_dict)
return

Expand Down

0 comments on commit c9b60c1

Please sign in to comment.