@@ -671,7 +671,6 @@ def vertical_POA(
671
671
lcoa_nom : float [cents/kWh]
672
672
LCOE Levelized cost of energy nominal
673
673
"""
674
- return
675
674
676
675
import PySAM
677
676
import PySAM .Pvsamv1 as PV
@@ -783,7 +782,10 @@ def pysam(
783
782
meta : dict ,
784
783
pv_model : str ,
785
784
pv_model_default : str ,
786
- files : dict [str : str ] = None ,
785
+ # grid_default: str,
786
+ # cashloan_default: str,
787
+ # utilityrate_default: str,
788
+ config_files : dict [str : str ] = None ,
787
789
results : list [str ] = None ,
788
790
) -> dict :
789
791
"""
@@ -803,7 +805,7 @@ def pysam(
803
805
options: ``pvwatts8``, ``pysamv1``, etc.
804
806
805
807
pv_model_default: str
806
- choose pysam config for pv model. [Pysam Modules](https://nrel-pysam.readthedocs.io/en/main/ssc-modules.html)
808
+ pysam config for pv model. [Pysam Modules](https://nrel-pysam.readthedocs.io/en/main/ssc-modules.html)
807
809
808
810
On the docs some modules have availabile defaults listed.
809
811
@@ -858,6 +860,40 @@ def pysam(
858
860
- "PhotovoltaicWindBatteryHybridHostDeveloper"
859
861
- "PhotovoltaicWindBatteryHybridSingleOwner"
860
862
863
+ grid_default: str
864
+
865
+ pysam default config for grid model. [Grid Defaults](https://nrel-pysam.readthedocs.io/en/main/modules/Grid.html)
866
+
867
+ cashloan_default: str
868
+
869
+ pysam default config for cashloan model. [Cashloan Defaults](https://nrel-pysam.readthedocs.io/en/main/modules/Cashloan.html)
870
+ - "FlatPlatePVCommercial"
871
+ - "FlatPlatePVResidential"
872
+ - "PVBatteryCommercial"
873
+ - "PVBatteryResidential"
874
+ - "PVWattsBatteryCommercial"
875
+ - "PVWattsBatteryResidential"
876
+ - "PVWattsCommercial"
877
+ - "PVWattsResidential"
878
+
879
+ utiltityrate_default: str
880
+
881
+ pysam default config for utilityrate5 model. [Utilityrate5 Defaults](https://nrel-pysam.readthedocs.io/en/main/modules/Utilityrate5.html())
882
+
883
+ config_files: dict
884
+ SAM configuration files. A dictionary containing a mapping to filepaths.
885
+
886
+ Keys must be `'pv', 'grid', 'utilityrate', 'cashloan'`. Each key should contain a value as a string representing the file path to a SAM config file.
887
+
888
+ ```
889
+ files = {
890
+ 'pv' : 'example/path/1/pv-file.json'
891
+ 'grid' : 'example/path/1/grid-file.json'
892
+ 'utilityrate' : 'example/path/1/utilityrate-file.json'
893
+ 'cashloan' : 'example/path/1/cashloan-file.json'
894
+ }
895
+ ```
896
+
861
897
results: list[str]
862
898
list of strings corresponding to pysam outputs to return.
863
899
Pysam models such as `Pvwatts8` and `Pvsamv1` return hundreds of results.
@@ -877,6 +913,9 @@ def pysam(
877
913
"""
878
914
import PySAM .Pvwattsv8 as pv8
879
915
import PySAM .Pvsamv1 as pv1
916
+ import PySAM .Grid as Grid
917
+ import PySAM .Utilityrate5 as UtilityRate
918
+ import PySAM .Cashloan as Cashloan
880
919
import json
881
920
882
921
weather_df = utilities .add_time_columns_tmy (weather_df = weather_df )
@@ -907,6 +946,11 @@ def pysam(
907
946
908
947
pysam_model .unassign ('solar_resource_file' ) # unassign file
909
948
949
+ # grid = Grid.from_existing(pv_model)
950
+ # utility_rate = UtilityRate.from_existing(pv_model)
951
+ # cashloan = Cashloan.from_existing(grid, 'FlatPlatePVCommercial')
952
+
953
+
910
954
# Duplicate Columns in the dataframe seem to cause this issue
911
955
# Error (-4) converting nested tuple 0 into row in matrix.
912
956
pysam_model .SolarResource .solar_resource_data = solar_resource
0 commit comments