-
Notifications
You must be signed in to change notification settings - Fork 143
Compute modules in SAM
Compute modules in SSC are a structure that contain complete functions calculating large sections of a model in SAM.
Please see SSC Compute Modules for background and instruction on how to create a new compute module in SSC.
After a new compute module is created and set up in SSC, getting the compute module to be accessible via the SAM GUI or PySAM requires further steps. In SAM, a compute module is run within a "Configuration", which are defined in the startup.lk script. The addconfig
function creates a new configuration, the name of which is called the "config name" in this document.
-
Setup the configuration in the startup.lk script: UI pages. Setup the defaults.
-
Build sam_api with export_config. First refresh the CMake build if this is not automated. The
export_config
project needs to be run first, and will generate the SAM_api and PySAM files for the new configuration. You will notice new files in thesam/api/include
,sam/api/modules
and if you have provided Default files for the configuration,sam/api/api_autogen/library/defaults
. There will also be new files inpysam/docs
,pysam/modules
, andpysam/stubs
. -
Update table in PySAM's config_to_cmod_name to add the new compute module into table that matches it with its SAM configuration.
-
Update table in PySAM's module_doc to describe the new SAM Configuration.
-
Add an Example or a Test to PySAM