Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes/Resolves:
Adds optional positional arguments to the
action_wrapper()
, which wraps thebuild
,solve
, andexport
functions ofFlowsheetInterfaces
Summary/Motivation:
To run a parameter sweep using
parameter_sweep.ParameterSweep
, you must provide a flowsheet'ssolve
function. On the UI, we store this solve function as anaction_wrapper('solve')
. When running a parameter sweep using theParameterSweep
class, we then have 2 options:solve
function ORWe had been using option 2, but this relied on the assumption that a flowsheet's
solve
function was named eithersolve
oroptimize
. To remove this assumption, we can use option 1.In order for option 1 to work, we must add optional positional arguments, see below screenshot:
![Screenshot 2024-07-31 at 10 27 24 AM](https://private-user-images.githubusercontent.com/35114629/354681617-34f54272-cdab-4f98-9adc-62c8b85a385f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzQ1MDgsIm5iZiI6MTczOTUzNDIwOCwicGF0aCI6Ii8zNTExNDYyOS8zNTQ2ODE2MTctMzRmNTQyNzItY2RhYi00Zjk4LTlhZGMtNjJjOGI4NWEzODVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExNTY0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzYzljM2NjZjU2N2NjNTE3YTg2ZjJjMDU4MWZmNTVjZThjMzk0MTljYzU1ZTA0NzU5NzVlODZmNDU2NzkwNDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Bl43xKwGzUDbp4YypYMZfO5nD1oAOs5dvowT4JUxU9M)
Changes proposed in this PR:
*args
toaction_wrapper()
solve
functionLegal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: