Optional Inputs?

  • tmartin
  • Topic Author
More
19 Oct 2016 22:41 #4839 by tmartin
Optional Inputs? was created by tmartin
Hi,

I've been using the SDK in conjunction with matlab and finally got everything setup to run pvsamv1. Once I tried to run it though, it threw an error saying it required subarray2 variables, even though I had subarray2 disabled. I was wondering (and hoping) if the variables in the SDKtool that are marked as optional are optional in the SDK. Or are they only optional in SAM because SAM creates placeholder inputs automatically?

Basically, do I have to pass a module all of its inputs, including optional ones? The documentation made it seem as though some optional values had default values assigned automatically if not passed to the module manually, while others were not necessary for calculations.

Any help is appreciated.

Thanks

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

  • pgilman
More
21 Oct 2016 17:50 #4840 by pgilman
Replied by pgilman on topic Optional Inputs?
Hello,

It turns out that you need to specify values for all of the SSC module's inputs, even if they are indicated as optional.

To make your life a little easier, in the latest update to SAM 2016.3.14 (Revision 4), we wrote a new code generator that creates code for the SDK in various languages, including for MATLAB. To use it, create a case in SAM with the performance and financial models you need (detailed photovoltaic in your case), and then on the case menu (click the little carrot on the case tab), click "Generate code" and choose a language and folder in which to save the files. You can then cut and paste the variable assignments from the file SAM generated into your file.

Best regards,
Paul.

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

  • tmartin
  • Topic Author
More
23 Oct 2016 20:24 #4841 by tmartin
Replied by tmartin on topic Optional Inputs?
OK, I'll try that out. Thanks for the help

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

Moderators: pgilman
Powered by Kunena Forum