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

Allow keyword arguments in the interface to types. #174

Open
ahobeost opened this issue Dec 20, 2023 · 0 comments
Open

Allow keyword arguments in the interface to types. #174

ahobeost opened this issue Dec 20, 2023 · 0 comments

Comments

@ahobeost
Copy link
Contributor

As a user, I would like to minimize duplication and searching when dealing with the type interface.
Currently, this is used as follows:

CONSTANTS 61
par1 = 1
par2 = 2
.....
EQUATIONS 60
input1 = var1
input2 = var2
.....
PARAMETERS 61
par1
par2
........
INPUTS 60
input1
input2
......
*** initial values
input1 input2 .....

With keywords this could be reduced to (in the ddck):

PARAMETERS 61
par1 = 1
par2 = 2
.....
INPUTS 60
input1 = [var1, 0]
input2 = [var2, 35]
.....

Notice the absence of the initial values.
As the dck interface of trnsys doesn't change, this would require pytrnsys to identify the keywords being used, and to add them to a new set of CONSTANTS or EQUATIONS.

In this suggested behavior, the initial values would be read from the second entry in the brackets.
inputName = [variableName, initialValue]

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

No branches or pull requests

1 participant