We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

Python utilitrate3 call input error

  • gex
  • Topic Author
More
10 Dec 2017 17:58 #5952 by gex
We ran into this error:
utilityrate V3 simulation error
: exec fail(utilityrate3): invalid number of gen records (350): must be an integer multiple of 8760
Utility mod failed

We made sure gen and load are set as arrays of 8760
print(len(ssc.data_get_array(data2,'load')))
print(len(ssc.data_get_array(data2,'gen')))
print(len(ssc.data_get_array(data2,'degradation')))
8760
8760
1
if run_utilityrate3(ssc,data2):
elec_cost_with_system = self.sscapi.data_get_number("gen")
else:
print("Utility mod failed")

Can you tell us what can possibly wrong? Or is there anyway that we can take a look at the section C code that returns the error?
Thank you so much for your help!
Xiaolin Ge

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

  • pgilman
More
11 Dec 2017 17:52 #5953 by pgilman
Replied by pgilman on topic Python utilitrate3 call input error
Dear Xiaolin,

It's hard for me to tell what's wrong from the code you provided.

Did you use SAM's code generator to create the initial code? That is a good way to make sure all of the input variables are assigned valid values.

The source code for the utilityrate3 module is available in the SAM GitHub repository:

github.com/NREL/ssc/blob/develop/ssc/cmod_utilityrate3.cpp

Note that SAM 2017.9.5 uses utilityrate5.

Best regards,
Paul.

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

  • gex
  • Topic Author
More
11 Dec 2017 19:50 #5954 by gex
Replied by gex on topic Python utilitrate3 call input error
Thank you, Paul! I was able to pass that error using the source code.

Could you please point a link to me on how to use Python SAM code generator?

Best regards,
Xiaolin

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

  • pgilman
More
11 Dec 2017 23:18 #5955 by pgilman
Replied by pgilman on topic Python utilitrate3 call input error
Dear Xiaolin,

Here is a link to one of the posts on the code generator:

sam.nrel.gov/node/75313

Best regards,
Paul.

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

  • gex
  • Topic Author
More
12 Dec 2017 00:40 #5956 by gex
Replied by gex on topic Python utilitrate3 call input error
How do I start "SAM 2017.9.5"(to use the code generator)? Is there an URL? I can only start SSC SDKTool. Sorry for being un-knowledgeable.

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

  • gex
  • Topic Author
More
12 Dec 2017 17:26 #5957 by gex
Replied by gex on topic Python utilitrate3 call input error
Please ignore my question above. I got it. Thank you so much!

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

Moderators: pgilman
Powered by Kunena Forum