Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrates Timeslices, change time-series to PU #32

Merged
merged 16 commits into from
Sep 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove ext data export function. to use each component ext field
  • Loading branch information
ktehranchi committed Sep 10, 2024
commit fd3df4467deafec9d8e7607410fd0669e88eb705
34 changes: 0 additions & 34 deletions src/r2x/exporter/sienna.py
Original file line number Diff line number Diff line change
@@ -76,7 +76,6 @@ def run(self, *args, path=None, **kwargs) -> "SiennaExporter":
self.process_storage_data()
self.export_data()
self.create_timeseries_pointers()
# self.create_extra_data_json()
return self

def process_bus_data(self, fname: str = "bus.csv") -> None:
@@ -436,39 +435,6 @@ def create_timeseries_pointers(self) -> None:
logger.info("File timeseries_pointers.json created.")
return

# def create_extra_data_json(self) -> None:
# """Create extra_data.json file."""
# extra_data = []
# model_types = [
# ACBranch,
# Bus,
# DCBranch,
# Generator,
# HydroPumpedStorage,
# PowerLoad,
# Reserve,
# ReserveMap,
# Storage,
# ]
# for model in model_types:
# model_type_name = model.__name__
# logger.debug(f"Processing {model_type_name}")
# component_dict = {
# component.name: {
# item: value.to_tuple() if isinstance(value, Quantity) else value
# for item, value in component.ext.items()
# if not isinstance(value, SingleTimeSeries)
# }
# for component in self.system.get_components(model)
# }
# extra_data.append({model_type_name: component_dict})

# with open(os.path.join(self.output_folder, "extra_data.json"), mode="w") as f:
# json.dump(extra_data, f)

# logger.info("File extra_data.json created.")
# return

def export_data(self) -> None:
"""Export csv data to specified folder from output_data attribute."""
logger.debug("Saving Sienna data and timeseries files.")