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

Support 4G result data #7

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Support 4G result data #7

wants to merge 12 commits into from

Conversation

nllong
Copy link
Member

@nllong nllong commented Jan 6, 2025

  • Increase the flexibility of the post processing to read in 4g and 5g data.
  • New method created to pull data from .mat file and ensuring that the lengths are consistent.
  • Create results_base abstract class to store data that need to be in both URBANopt results and Modelica results
  • leverage regex to find all variables in the .mat file

@nllong nllong requested a review from vtnate January 6, 2025 03:38
Copy link
Contributor

@vtnate vtnate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teeeeeeessssssssttttttttssssssss! 😆

urbanopt_des/modelica_results.py Outdated Show resolved Hide resolved
urbanopt_des/modelica_results.py Outdated Show resolved Hide resolved
urbanopt_des/modelica_results.py Show resolved Hide resolved
common methods/datasets that can be used for easy comparison."""

@property
def end_use_summary_dict(self) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is returning a list, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to that, getting mypy to run during pre-commit would be awesome. Why is it commented?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably because it failed tooooo much?

Comment on lines +295 to +296
data = (
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the new parentheses? What is that doing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of the pipes combining the data. But maybe they aren't needed?

urbanopt_des/modelica_results.py Show resolved Hide resolved
else:
print(f'Other var "{other_var}" length does not match {len(other_var_data)} != {len(time)}')
other_var_data = self.retrieve_variable_data(other_var, len(time1))
data[other_var] = other_var_data

df_power = pd.pandas.DataFrame(data)
Copy link
Contributor

@vtnate vtnate Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pd.pandas.dataframe? 😱

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, I should fix this and do import pandas as pd.... oof..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already did! 😆

nllong and others added 4 commits January 9, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants