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

PV panels and Electricity Layer #7

Closed
1 task done
ArthurWaeber opened this issue Feb 28, 2024 · 2 comments
Closed
1 task done

PV panels and Electricity Layer #7

ArthurWaeber opened this issue Feb 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ArthurWaeber
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Dear Dorsan, Dear Joseph, Dear Cédric,Dear REHO Explorers,
After some basic trials on REHO, I wanted to simplify as much as possible the model to better understand the integration of my new technology (SOFC.mod). It seems that PV panels cannot be excluded of the analysis, and I am afraid that my SOFC model, as an electricity production unit is affected by this issue. FYI, my SOFC model is currently added but almost negligible compared to PV (even with investment cost being reduced down to 0).

Thanks for your help :)
Arthur

Version

1.0.2 (Stable)

Relevant log output

Traceback (most recent call last):
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/scripts/arthur_w/test.py", line 45, in <module>
    reho.single_optimization()
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/reho/model/reho.py", line 525, in single_optimization
    self.add_df_Results(ampl, Scn_ID, Pareto_ID, self.scenario)
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/reho/model/reho.py", line 681, in add_df_Results
    df_Results = WR.get_df_Results_from_SP(ampl, scenario, self.method, self.buildings_data)
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/reho/model/postprocessing/write_results.py", line 338, in get_df_Results_from_SP
    df_Results["df_Unit"], df_Results["df_Unit_t"] = set_df_unit(df, ampl)
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/reho/model/postprocessing/write_results.py", line 134, in set_df_unit
    df3 = get_variable_in_pandas(df, 'Units_curtailment')
  File "/Users/awaeber/Documents/PhD-IPESE/rSOC/reho2/reho/model/postprocessing/write_results.py", line 581, in get_variable_in_pandas
    if len(id[0]) > 1:
IndexError: list index out of range

Process finished with exit code 1

Anything else?

I was not willing to look further into the repo code. However in initialise_units (infrastructure.py) the PV are added by default. The error I get here above is after me removing them explicitly from the list: units_to_keep (l. 386).

@ArthurWaeber ArthurWaeber added the bug Something isn't working label Feb 28, 2024
@JosephLoustau JosephLoustau self-assigned this Feb 29, 2024
@JosephLoustau
Copy link
Collaborator

@cterrier24 and @DorsanL, we might have a discussion on why some units must be defined in the model. For instance, here if there is no PV, there is no Units_curtailment, hence the IndexError Arthur got.

So, Arthur, as you can guess from this, some of the units are explicitly not removable and this shoud not be changed in the code. For the issue that you have with the PV still used even when setting scenario['exclude_units'] = ['PV'], the issue comes from somewhere else and we can have a further discussion so that I can try to understand the problem

@ArthurWaeber
Copy link
Author

ArthurWaeber commented Mar 4, 2024 via email

@DorsanL DorsanL closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants