Input parameters for modules using the SDK

  • karooga
  • Topic Author
More
23 Oct 2014 21:00 #2647 by karooga
Good day,

I'm running SAM 14.1.14.

I have an existing Case model in SAM, which I'm trying to replicate using the SSC SDK. The model is based on a physical trough configuration and there are a number of components related to financing, incentives, system costs etc that I'm ignoring for now.

Using the SDK interface or SSC SDKTool, I have identified the required input parameters that I need to use so as to conform to the API of the tcstrough_physical module. I used the "Export Input Variable List" to generate a list of input parameters. The parameters however are designated by long text descriptions which are difficult to match up with short variable names given by SDKTool. There are also a number of input variables defined in SDKTool, which are quite cryptic or don't have any "meta" field information, meaning I've had search through the parameters from all the modules to try make an educated guess so as to match them up.

I wrote a script in SamUL to output the parameters (using "ActiveVariables()") and while it has got me a bit further down the path, it has also shown up a whole bunch of what I am guessing are environment variables meant for TRANSYS, sitting below the SAM engine. I understand the complete model will contain variables for each of the modules it uses but in some cases I didn't find them in any of the modules. I found that the parameter names used in SamUL are in some cases completely different from those used by SSC e.g. csp.dtr.solf.stow_angle and theta_stow.

Despite digging around for quite some time in the documentation and on this forum, I haven't been able to find a better way to do this. Have I missed something quite obvious here? Perhaps there are some look up tables? I did also have a look at CS and JAVA code that was automatically generated, however both of these only included parameters for the annual_output and ippppa modules, nothing for tcstrough_physical, which seemed a bit strange.

Any comments or suggestions would be greatly appreciated.

Thanks
Paul

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
24 Oct 2014 15:49 #2648 by Paul Gilman
Replied by Paul Gilman on topic Input parameters for modules using the SDK
Dear Paul,

This is a problem with SAM 2014.1.14 and the SAM SDK 2014-1-21. SSC requires the variables that you see listed in SDKtool, and there are separate input variables that SAM uses, and in the case of the CSP models, also TRNSYS variables. Some of the variables you see in the SamUL list are variables in SAM's user interface that are not used by SSC.

In the new version of SAM, currently in Beta testing (SAM 2014.9.30), we've completely rewritten the underlying code to eliminate this extra layer of code and associated variables between the user interface and SSC. The SAM inputs browser in the Beta version lists SSC variable names and their values, which makes what you are trying to do a little easier. We've also replaced the TRNSYS simulation engine for the CSP models with a new engine so that all of the calculations happen in the SSC environment.

Furthermore, in the new version of SAM, we've replaced SamUL with the LK scripting language. That means that SAM and SDKtool use the same scripting language.

We plan to develop a tool to export LK script from the SAM user interface that you can then run directly in SDKtool, but that is not yet available.

So, my recommendation would be switch to the new version of SAM -- you can start now with the Beta version. I realize that will involve some work to recreate SAM files and port your SamUL script to LK. We plan to release the new version in mid-November.

Otherwise, if you have a list of the long user-interface variable names from SAM 2014.1.14 for which you need SSC equivalents, you can send me the list, and I will try to match them up.

Thanks,
Paul.

Please Log in or Create an account to join the conversation.

  • karooga
  • Topic Author
More
25 Oct 2014 09:46 #2649 by karooga
Replied by karooga on topic Input parameters for modules using the SDK
Hi Paul,

Thanks so much for your reply. I actually already downloaded the Beta release and took a quick look at the variable browser. However due to what I saw regarding the variable names and underlying changes you subsequently indicated I felt that the added overhead in correlating the details was probably not worth the effort for me right now. I was also not able to find a download of the SSC SDK library for the beta release which I would need for Linux.

I think for now, my strategy is going to be to stick with 2014.1.14 as I see this as a more stable solution and my requirements are are slightly more immediate than the release date of the new version. I'm also somewhat concerned that the interfaces will change before the final release meaning there would be future effort that I need to put in.

The input variable name descriptions that I'm after are numerous (188) so I shall mail you directly with a list of them. I have managed to manually work out quite a few but my confidence that I have interpreted them correctly is variable. With regards to some of the variables, specifically those that relate to the drop down boxes in SAM, am I assuming correctly that the first item in the list, is represented by index 0 (and not 1) for the variable?

Another query I have is, does there exist any documentation regarding the logical relationships between each of the SSC modules? While I'd imagine that I can get quite far with just the details contained in each module, the fact that there are 38 separate modules leaves me a bit worried that when I run my model, I will have missed out using another module that is a dependency for the one I'm currently using.

Regards
Paul

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
27 Oct 2014 16:20 #2650 by Paul Gilman
Replied by Paul Gilman on topic Input parameters for modules using the SDK
Dear Paul,

Your assumption is correct that the index of the first item in a SAM user-interface dropdown box is zero.

And, no, we have not documented the connection between SSC modules. At the moment, we do not have funding to develop such documentation. We've tried to make each module as self-documented as possible with the meta data visible in SDKtool and through the SSC query functions. That's still a work in progress -- we are continually adding to each module's self documentation.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • karooga
  • Topic Author
More
20 Nov 2014 09:06 #2651 by karooga
Replied by karooga on topic Input parameters for modules using the SDK
Hi Paul,

With regards to your statement:

"We've also replaced the TRNSYS simulation engine for the CSP models with a new engine so that all of the calculations happen in the SSC environment."

For 2014.1.14, are all the CSP models using TRNSYS? With the new beta release have you moved away from using TRNSYS completely now? I would be interested to understand which modules are coupled to TRNSYS and which ones aren't; do you have this information available for both the beta and 2014.1.14 releases?

regards
Paul

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
20 Nov 2014 16:53 #2652 by Paul Gilman
Replied by Paul Gilman on topic Input parameters for modules using the SDK
Hi Paul,
You can tell whether a version of SAM is using TRNSYS by looking in the installation folder. For example, in Windows for SAM 2014.1.14, the default installation folder location is C:\SAM\2014.1.14. In that folder, if you go to \exelib, you'll see a trnsys folder with the files SAM uses to run TRNSYS.
In SAM 2014.1.14 and earlier versions, all of the CSP models use TRNSYS. In the original versions of SAM, all of the performance models used TRNSYS. Starting with version 2012.5.11, we started developing C++ versions of the models to run with SAM's simulation model (SSC).
Starting with next week's version (knock on wood) all of the performance models run in SSC.
Best regards,

Paul.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum