Subject: Writing short functions in WEAP Posted: 4/17/2024 Viewed: 1550 times
When expression a function, we may refer several times to files with RreadFromFile. Therefore, the function could be long and complicated to read. Is there any hint for simplifying the writing of functions in WEAP.
Mr. Doug Chalmers
Subject: Re: Writing short functions in WEAP Posted: 4/17/2024 Viewed: 1541 times
Younes,
I understand- I often face this as well. Some options to store ReadFromFile values as other variables to shorten your expressions:
1. You could enter your ReadFromFile expressions as Key\ or Other\ in the data tree.
2. To shorten them the most, you could create a custom variable in the data tree by going to your model object, right clicking on the name of the variables at the top --> "Create". Then, store your ReadFromFile values into custom variables within the same WEAP object and reference them in your new expression. The new expression will then only have the name of the custom variable and its unit, shortening your expression.