Skip to content

Address SAM issue #1634 with ssc_auto_exec#1801

Merged
sjanzou merged 7 commits into
patchfrom
SAM_1634_2
Jun 27, 2024
Merged

Address SAM issue #1634 with ssc_auto_exec#1801
sjanzou merged 7 commits into
patchfrom
SAM_1634_2

Conversation

@sjanzou

@sjanzou sjanzou commented Jun 20, 2024

Copy link
Copy Markdown
Collaborator

The fundamental issue for the ssc_auto_exec in the EqnDatabase is that the EqnDatabase is constructed at load up on a page by page basis and has no idea on which UI variables will be available in whatever configuration the page is used. The ssc_auto_exec was constructed to avoid having to manually set each variable when the compute module referenced was called. Initially, any variables that were not to be set by the ssc_auto_exec function were designated by the UIHINT=”SIMULATION_PARAMETER” which is still in effect.

For SAM issue 1634, there is no way for ssc_auto_exec to have the same functionality as clicking the Simulate button in the UI. This is because ssc_auto_exec in constructed at page loadup when SAM starts and has no concept of a case or a configuration. That is, the list of UI variables is not available when the ssc_auto_exec function is evaluated.

To address SAM issue 1634 as much as possible, no UI variable will be used for any ssc variable that has the “REQUIRED_IF=*”. If the ssc variable is not required or has a default or a different REQUIRED_IF value, then ssc_auto_exec will skip the assignment to a UI variable.

Tested with add-temp-mspt_cmod_var branch of ssc - no equation errors
image

@sjanzou sjanzou self-assigned this Jun 20, 2024
@sjanzou sjanzou requested a review from tyneises June 20, 2024 09:27
@sjanzou sjanzou linked an issue Jun 20, 2024 that may be closed by this pull request
@sjanzou

sjanzou commented Jun 20, 2024

Copy link
Copy Markdown
Collaborator Author

@tyneises, can you take a look at the failing MSLF configurations?

@sjanzou

sjanzou commented Jun 21, 2024

Copy link
Copy Markdown
Collaborator Author

MSLF configurations fail because REQUIRED_IF is not set for all required variables.
add-temp-mspt_cmod_var and patch branch work fine for MSPT configurations.
image

@sjanzou sjanzou requested a review from taylorbrown75 June 24, 2024 07:55
@sjanzou

sjanzou commented Jun 24, 2024

Copy link
Copy Markdown
Collaborator Author

Added fcall_var_exists to facilitate desired functionality of #1634

Working and running for add-temp-mspt_cmod_var and patch branches of ssc as requested.

@tyneises, @taylorbrown75 please review and let me know if you have any questions.

@taylorbrown75 taylorbrown75 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Logic is clear and works well. I produced the following table showing performance depending on required_if type and whether the variable is defined in the UI. Works as described.

image

Seems we can stop using SIMULATION_PARAMETER? Conditional required_if works with sim_type. (i.e. use REQUIRED_IF="sim_type=1")

@sjanzou

sjanzou commented Jun 27, 2024

Copy link
Copy Markdown
Collaborator Author

Logic is clear and works well. I produced the following table showing performance depending on required_if type and whether the variable is defined in the UI. Works as described.

image

Seems we can stop using SIMULATION_PARAMETER? Conditional required_if works with sim_type. (i.e. use REQUIRED_IF="sim_type=1")

@taylorbrown75 thanks for the detailed review!
@tyneises can we get stop using SIMULATION_PARAMETER as @taylorbrown75 suggests?

@sjanzou sjanzou merged commit e92e2af into patch Jun 27, 2024
@taylorbrown75

Copy link
Copy Markdown
Collaborator

Updated table to include conditional required_if case.

image

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.

ssc_auto_exec not using var table "required_if"

2 participants