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

ssc_auto_exec not using var table "required_if" #1634

Open
tyneises opened this issue Dec 5, 2023 · 2 comments · Fixed by #1702
Open

ssc_auto_exec not using var table "required_if" #1634

tyneises opened this issue Dec 5, 2023 · 2 comments · Fixed by #1702
Assignees
Labels

Comments

@tyneises
Copy link
Collaborator

tyneises commented Dec 5, 2023

When using ssc_auto_exec to call a cmod, we use ‘SIMULATION_PARAMETER’ to designate variables that the UI doesn’t provide to the cmod. It appears that all the variables that don’t have SIMULATION_PARAMETER are required to be in the UI, even if “required_if” is false.

For example, the following SSC branch currently contains exactly one new line of code in the mspt cmod that adds a new input var, “is_dispatch123”, that i) is not required, ii) does not have ‘SIMULATION_PARAMETER’ in UI Hints, iii) is not defined in the UI, iv) is not used anywhere in the cmod. The MSPT model will fail on open because it uses ssc_auto_exec on MSPT System Design. https://github.com/NREL/ssc/tree/add-temp-mspt_cmod_var

@tyneises tyneises added the bug label Dec 5, 2023
@tyneises
Copy link
Collaborator Author

tyneises commented Dec 5, 2023

This SAM issue (probably) requires this fix: #1464

@cpaulgilman cpaulgilman added this to the 2023 Release Patch 1 milestone Dec 13, 2023
sjanzou added a commit that referenced this issue Feb 16, 2024
@sjanzou sjanzou linked a pull request Feb 16, 2024 that will close this issue
tyneises added a commit that referenced this issue Mar 15, 2024
@tyneises
Copy link
Collaborator Author

I'm replacing an old comment that I just deleted to try to clarify the problem and give simple examples in the this comment...

@sjanzou pull request #1702 makes auto_exec ignore blank required_if entries (i.e. ""). I think ideally it would check for those variables but not require them.

More importantly, auto_exec still cannot use conditional or default required_if. For example, in the cmod below, I change the required_if field for SSC_INPUT "is_dispatch123" in two ways:

  1. "is_dispatch = 1"
  2. "?=0"

In both cases, the auto_exec callback from the System Design page fails because it can't find "is_dispatch123" in the UI even though it isn't required.

My wish is that the auto_exec would have the same cmod parsing functionality as clicking Simulate in the UI.

https://github.com/NREL/ssc/tree/add-temp-mspt_cmod_var

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants