- Posts: 2
Unset variable causes crash but not set in any generated code
- nbroderick
- Topic Author
Less
More
08 May 2018 00:09 #6234
by nbroderick
Unset variable causes crash but not set in any generated code was created by nbroderick
I am using the SAM SDK (ver. 186) to run a basic model via the JNI in a Java web servlet environment (wind/levpartflip with default parameters). However, I cannot get it to run; it crashes with the following notice message form the SAM SDK:
Furthermore, when examining generated code/input from SAM itself (2017.9.5) running a similar model, I see no sign of a 'gen' variable. I thus find it impossible to intuit what this variable is used for, how it should be set, or why it must be set.
Any guidance would be appreciated.
Edit: Only a few minutes after completing this post, I tried running the SAM simulation again and it, for whatever reason and without any changes to code or data, works. Very bizarre. I'll update again if I encounter the same issue.
Code:
SAM module log [levpartflip;-1.0] [NOTICE]: precheck input: variable 'gen' required but not assigned
Furthermore, when examining generated code/input from SAM itself (2017.9.5) running a similar model, I see no sign of a 'gen' variable. I thus find it impossible to intuit what this variable is used for, how it should be set, or why it must be set.
Any guidance would be appreciated.
Edit: Only a few minutes after completing this post, I tried running the SAM simulation again and it, for whatever reason and without any changes to code or data, works. Very bizarre. I'll update again if I encounter the same issue.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
14 May 2018 15:40 #6235
by pgilman
Replied by pgilman on topic Unset variable causes crash but not set in any generated code
The 'gen' variable is the hourly or subhourly electrical output of the system over one year. It is an output of each of SAM's performance models (Detailed PV, PVWatts, Physical Trough, etc.) and an input to the financial models.
Best regards,
Paul.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- nbroderick
- Topic Author
Less
More
- Posts: 2
24 May 2018 07:03 #6236
by nbroderick
Replied by nbroderick on topic Unset variable causes crash but not set in any generated code
I see. The issue, then, was likely not running the performance module before the finance module. Thank you for the reply.
Please Log in or Create an account to join the conversation.
Moderators: pgilman