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

replace electricityMerger ghpython component in Core #701

Closed
christophwaibel opened this issue Dec 21, 2021 · 2 comments · Fixed by #729
Closed

replace electricityMerger ghpython component in Core #701

christophwaibel opened this issue Dec 21, 2021 · 2 comments · Fixed by #729
Assignees
Labels
bug 👾 a bug!!!

Comments

@christophwaibel
Copy link
Contributor

Describe the bug
There are custom ghpython components for merging grid electricity in the main template. They use import Hive.IO.EnergySystems, which will not work anymore once we remove the epw_reader.py component from honeybadger (#692 ). In that python script, we load in dependencies that make this import work. But once we create a proper Hive.IO component for merging electricity, we won't need these dependencies anymore.

clr.AddReferenceToFileAndPath(os.path.join(path, "Libraries\Hive", "Hive.IO.gha"))
import Hive.IO.EnergySystems as ensys

To Reproduce
remove Hive.Core.epw_reader.ghpy from the grasshopper components libraries folder and the main hive template will stop working properly.

Screenshots
image

Software

Additional context
related comment from earlier PR

@christophwaibel christophwaibel added the bug 👾 a bug!!! label Dec 21, 2021
@ChrisZenhub
Copy link

ChrisZenhub commented Jan 3, 2022

To Do:

  • modify the grasshopper component \Hive.IO\GhMergers\GhPurchasedElectricity.cs
  • instead of having the input parameter elecPurchased, it should read a list of Hive.IO.EnergySystems (i.e., all technologies that require or produce electricity: chiller, ashp, PV, CHP, ...)
  • also add a new input for building electricity demand (plug loads) and a boolean for hourly. Have a look at other merger components in the namespace Hive.IO\GhMergers and try to follow their structure, if possible
  • the component will need to identify how much electricity needs to be purchased from the grid, i.e., replacing the lines var elecPurchased = new List<double>(); DA.GetDataList(1, elecPurchased); with code contained in the two custom ghpython components as seen on the screenshot.
  • the elecDemandOut of the ghpython component in the middle of the screenshot above is what needs to be now internally calculated in GhPurchasedElectricity.cs
  • the heatDemandOut of the ghpython component will be redundant and can be ignored
  • you can locate those two custom ghpython components in the EaCS3_E04_Hive_Template.gh to the very right, just before the Results group

@ChrisZenhub
Copy link

possible relation with #707

christophwaibel added a commit that referenced this issue May 6, 2022
…ceElectricityMergerGhpythonComponentInCore

#701 replace electricity merger ghpython component in core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 👾 a bug!!!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants