Hello,
I was trying to export a SAM project of a PV plant with battery using the "Generate Code --> PYSAM JSON" option, and I realized that the same results are not obtained as in SAM (for example, in the total energy generated in year 1).
Reviewing I found that when using automatic dispatch in the battery the results obtained are different, but when using manual dispatch in SAM (and then export the code to pySAM) the same results are obtained.
I am attaching the pySAM file that I am using and the weather data file. I could not upload the SAM file because it is very large, but it can be downloaded from the following link:
drive.google.com/file/d/1zh0gis26WC3k-yS6R1-Wxlj4fgQYrJX2/view?usp=sharing
Files being exported from SAM must be saved in a folder called "others" for the code to work, or change the path.
I look forward to your help or comments.
regards
Martin Ibarra