- Posts: 6
Differences of results between the desktop version and the SDK one
- juvima
- Topic Author
Less
More
20 May 2019 10:02 - 20 May 2019 10:03 #6807
by juvima
Differences of results between the desktop version and the SDK one was created by juvima
Hello, I'm new to the SDK. I notice that the results of the financial model are different when calculated with the Desktop version or with the code generated by SAM 2018.11.11 itself (I tried with Python 2, Python 3, and Matlab). For example, the size of debt value is 284 millions for the desktop version, but 259 millions for the generated code. Can anyone explain me why this is happening?
Thank you a lot in advance.
Thank you a lot in advance.
Attachments:
Last edit: 20 May 2019 10:03 by juvima.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
20 May 2019 13:27 - 20 May 2019 13:28 #6810
by pgilman
Replied by pgilman on topic Differences of results between the desktop version and the SDK one
Hi,
There are a couple of things that might cause differences between results generated by SAM and those generated by code you write that calls the SSC API:
1. SAM is using a different SSC library than your code.
2. There are differences in the inputs between SAM and your code.
3. Different rounding errors in SAM and your code.
SAM's code generator should automatically copy the SSC library file from the SAM installation to the folder with your code, and assign input variable values identical to the inputs in SAM.
The debt_option input may be responsible for the size of debt difference in your results.
Best regards,
Paul.
There are a couple of things that might cause differences between results generated by SAM and those generated by code you write that calls the SSC API:
1. SAM is using a different SSC library than your code.
2. There are differences in the inputs between SAM and your code.
3. Different rounding errors in SAM and your code.
SAM's code generator should automatically copy the SSC library file from the SAM installation to the folder with your code, and assign input variable values identical to the inputs in SAM.
The debt_option input may be responsible for the size of debt difference in your results.
Best regards,
Paul.
Last edit: 20 May 2019 13:28 by pgilman.
Please Log in or Create an account to join the conversation.
- juvima
- Topic Author
Less
More
- Posts: 6
21 May 2019 04:40 - 21 May 2019 04:40 #6814
by juvima
Replied by juvima on topic Differences of results between the desktop version and the SDK one
Thank you for your answer! After a few investigations, the problem seems to be different rounding errors between SAM and the generated code. I have to say that I have no idea of how to solve that issue.
Last edit: 21 May 2019 04:40 by juvima.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
30 May 2019 10:52 #7344
by pgilman
Replied by pgilman on topic Differences of results between the desktop version and the SDK one
One approach might be to present your results rounded to the nearest meaningful digit. For example, perhaps round annual energy to the nearest MWh like 244,864,000 kWh.
Best regards,
Paul.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Anton Driesse
Less
More
- Posts: 19
17 Jun 2019 09:18 #7460
by Anton Driesse
Replied by Anton Driesse on topic Differences of results between the desktop version and the SDK one
Actually, the "PPA price (year 1)" looks quite different.
Please Log in or Create an account to join the conversation.
Moderators: pgilman