- Posts: 5
Python utilitrate3 call input error
- gex
- Topic Author
Less
More
10 Dec 2017 10:58 #5952
by gex
Python utilitrate3 call input error was created 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
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
Less
More
- Posts: 5423
11 Dec 2017 10: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.
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
Less
More
- Posts: 5
11 Dec 2017 12: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
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
Less
More
- Posts: 5423
11 Dec 2017 16: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.
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
Less
More
- Posts: 5
11 Dec 2017 17: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
Less
More
- Posts: 5
12 Dec 2017 10: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