Optional Inputs?

3 posts / 0 new
Last post
tmartin
Optional Inputs?

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

Paul Gilman

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.

tmartin

OK, I'll try that out. Thanks for the help

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer