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

Add initialize function to fsapi #1501

Merged
merged 8 commits into from
Oct 24, 2024

Conversation

MichaelPesce
Copy link
Contributor

@MichaelPesce MichaelPesce commented Oct 2, 2024

Fixes/Resolves:

  • adds a hook for flowsheets to provide an optional initialize function to the UI

Summary/Motivation:

The parameter sweep tool (see UI PR#103) with parallel capabilities allows for an optional initialize function. in the case that there is no initialize function, it runs the build function multiple times. This takes a long time. If the UI can access a models initialize function, then parameter sweep run times can be decreased.

Changes proposed in this PR:

  • update fsapi to allow for a do_initailize function

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@MichaelPesce MichaelPesce self-assigned this Oct 2, 2024
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Oct 3, 2024
@MichaelPesce MichaelPesce marked this pull request as ready for review October 9, 2024 17:08
Copy link
Collaborator

@dangunter dangunter left a comment

Choose a reason for hiding this comment

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

I think it makes sense with the suggested changes. I need to look it over one more time though, maybe the initialize internal method can be dropped entirely, not sure.

watertap/ui/fsapi.py Show resolved Hide resolved
watertap/ui/fsapi.py Show resolved Hide resolved
@dangunter dangunter self-requested a review October 24, 2024 20:31
Copy link
Collaborator

@dangunter dangunter left a comment

Choose a reason for hiding this comment

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

LGTM

@adam-a-a adam-a-a enabled auto-merge (squash) October 24, 2024 20:31
@adam-a-a adam-a-a merged commit 8c651de into watertap-org:main Oct 24, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants