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

Merge Gemini changes #84

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

Merge Gemini changes #84

wants to merge 32 commits into from

Conversation

daniel-thom
Copy link
Collaborator

@daniel-thom daniel-thom commented Oct 28, 2021

This is a draft pull request to attempt to merge Gemini-required changes into PyDSS master. More fixes are almost certainly required.

@AadilLatif You will want to be aware of this PR. You're welcome to review now or wait until we've removed the draft label.

@daniel-thom daniel-thom marked this pull request as draft October 28, 2021 00:40
PyDSS/helics_interface.py Outdated Show resolved Hide resolved
helics.helicsFederateInfoSetCoreInitString(self.fedinfo, f"--federates=1 --networktimeout=60min --timeout=60min --broker_address {self._options['Helics']['Broker']} --port {self._options['Helics']['Broker port']} --maxsize=32768 --slowresponding")
helics.helicsFederateInfoSetFlagOption(self.fedinfo, helics.helics_flag_terminate_on_error, 0) # set terminate_on_error to false
#if 'Broker' in self._options['Helics']:
# helics.helicsFederateInfoSetBroker(self.fedinfo, self._options['Helics']['Broker'])
IP = self._settings.helics.broker
Copy link
Collaborator

Choose a reason for hiding this comment

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

the broker and port are already set in line 86: helics.helicsFederateInfoSetCoreInitString, so likely don't need the next few lines.

PyDSS/dataset_buffer.py Outdated Show resolved Hide resolved
PyDSS/dssInstance.py Outdated Show resolved Hide resolved
PyDSS/dssInstance.py Outdated Show resolved Hide resolved
PyDSS/helics_interface.py Outdated Show resolved Hide resolved
IP = self._settings.helics.broker
Port = self._settings.helics.broker_port
self._logger.info("Connecting to broker @ {}".format(f"{IP}:{Port}" if Port else IP))
helics.helicsFederateInfoSetCoreInitString(self.fedinfo, f"--federates=1 --networktimeout=60min --timeout=60min --broker_address {self._options['Helics']['Broker']} --port {self._options['Helics']['Broker port']} --maxsize=32768 --slowresponding")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nadiavp This line is actually broken because of the recent changes to the input structures. The original code did not require both broker and broker_port. Do we need to keep that behavior?

PyDSS/dssCircuit.py Outdated Show resolved Hide resolved
PyDSS/dssInstance.py Outdated Show resolved Hide resolved
PyDSS/dssObjectBase.py Outdated Show resolved Hide resolved
PyDSS/dssTransformer.py Outdated Show resolved Hide resolved
IP = self._settings.helics.broker
Port = self._settings.helics.broker_port
self._logger.info("Connecting to broker @ {}".format(f"{IP}:{Port}" if Port else IP))
helics.helicsFederateInfoSetCoreInitString(self.fedinfo, f"--federates=1 --networktimeout=60min --timeout=60min --maxsize=32768 --slowresponding")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AadilLatif Do you have any comments on the changes in this file?

PyDSS/helics_interface.py Outdated Show resolved Hide resolved
PyDSS/modes/QSTS.py Outdated Show resolved Hide resolved
PyDSS/dssCircuit.py Outdated Show resolved Hide resolved
PyDSS/dssInstance.py Outdated Show resolved Hide resolved
@@ -523,6 +528,11 @@ class HelicsModel(InputsBaseModel):
default=5,
alias="Helics logging level",
)
store_intermediate_values: bool = Field(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nadiavp @AadilLatif Note this field and default value. Let me know if the default should be flipped.

@@ -71,6 +72,9 @@ def GetValue(self, VarName, convert=False):
if convert:
if VarName in self.VARIABLE_OUTPUTS_BY_LIST:
VarValue = VarValue[:self.NumWindings]
if len(VarValue) < self.NumWindings:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AadilLatif Any objections?

… helics prints, request time non-iterative if never converges
@daniel-thom daniel-thom changed the title WIP: Merge Gemini changes Merge Gemini changes Dec 17, 2021
@daniel-thom daniel-thom marked this pull request as ready for review December 17, 2021 17:27
@daniel-thom
Copy link
Collaborator Author

@AadilLatif This is ready for a final review. You'll want to check the HELICS changes.

Nadia Panossian and others added 2 commits March 25, 2022 14:10
@AadilLatif
Copy link
Collaborator

@daniel-thom are we still interested in merging this pull request?

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.

None yet

3 participants