Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ yes | conda install conda-build
yes | conda activate base
conda update -n base -c defaults conda

for PYTHONVER in 3.9 3.10 3.11 3.12 3.13
for PYTHONVER in 3.9 3.10 3.11 3.12 3.13 3.14
do
export PYTHONVER
conda-build conda --output-folder=$DIST_DIR --python=$PYTHONVER --prefix-length=0 || exit
Expand Down
29 changes: 23 additions & 6 deletions build_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,47 @@ export SSCDIR=/io/ssc
export SAMNTDIR=/io/sam
export PYSAMDIR=/io/pysam

if [ "$(uname -m)" = "aarch64" ]; then
ORTOOLS=or-tools_aarch64_AlmaLinux-8.10_cpp_v9.14.6206
else
ORTOOLS=or-tools_x86_64_AlmaLinux-8.10_cpp_v9.14.6206
export CC=gcc
export CXX=g++
fi

export ORTOOLSDIR=/${ORTOOLS}
mkdir ${ORTOOLSDIR}
curl -L https://github.com/google/or-tools/releases/download/v9.14/${ORTOOLS}.tar.gz -o ${ORTOOLS}.tar.gz
tar xvzf ${ORTOOLS}.tar.gz -C ${ORTOOLSDIR} --strip-components=1

mkdir -p /io/build_linux_ssc
cd /io/build_linux_ssc
rm -rf *
cmake ${SSCDIR} -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=1 -DSAM_SKIP_TESTS=1 ../ssc || exit
cmake ${SSCDIR} -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=1 -DSAM_SKIP_TESTS=1 -DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_PREFIX_PATH="$ORTOOLSDIR" -Dabsl_DIR="$ORTOOLSDIR\lib\cmake\absl" -Dutf8_range_DIR="$ORTOOLSDIR\lib\cmake\utf8_range" -Dortools_DIR="$ORTOOLSDIR\lib\cmake\ortools" ../ssc || exit
cmake --build . --target shared -j 6 || exit
cmake --build . --target ssc -j 6 || exit

mkdir -p /io/build_linux_sam
cd /io/build_linux_sam
rm -rf *
cmake ${SAMNTDIR}/api -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=1 -DSAM_SKIP_AUTOGEN=1 ../sam/api || exit
cmake ${SAMNTDIR}/api -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=1 -DSAM_SKIP_AUTOGEN=1 -DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_PREFIX_PATH="$ORTOOLSDIR" -Dabsl_DIR="$ORTOOLSDIR\lib\cmake\absl" -Dutf8_range_DIR="$ORTOOLSDIR\lib\cmake\utf8_range" -Dortools_DIR="$ORTOOLSDIR\lib\cmake\ortools" ../sam/api || exit
make -j 6 || exit

cd $PYSAMDIR
for PYTHONENV in cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313
for PYTHONENV in cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313 cp314-cp314
do
yes | /opt/python/$PYTHONENV/bin/pip install -r tests/requirements.txt
yes | /opt/python/$PYTHONENV/bin/pip install auditwheel
yes | /opt/python/$PYTHONENV/bin/pip uninstall NREL-PySAM
/opt/python/$PYTHONENV/bin/python setup.py install || exit
/opt/python/$PYTHONENV/bin/python -m pytest -s tests
/opt/python/$PYTHONENV/bin/python setup.py bdist_wheel || exit
WHEEL=$(ls dist/nrel_pysam-*-$PYTHONENV-*linux*.whl)
auditwheel repair "$WHEEL" -w dist/wheelhouse/
REPAIRED_WHEEL=$(ls dist/wheelhouse/nrel_pysam-*-$PYTHONENV-*linux*.whl)
yes | /opt/python/$PYTHONENV/bin/pip install "$REPAIRED_WHEEL"
/opt/python/$PYTHONENV/bin/python -m pytest -s tests/test_dispatch_optimization.py
retVal=$?
if [ $retVal -ne 0 ]; then
echo "Error in Tests"
exit 1
fi
/opt/python/$PYTHONENV/bin/python setup.py bdist_wheel
done
33 changes: 24 additions & 9 deletions build_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,35 @@
rm -rf ${SAMNTDIR}/../cmake-build-release
mkdir -p ${SAMNTDIR}/../cmake-build-release
cd ${SAMNTDIR}/../cmake-build-release || exit
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=1 -DSAM_SKIP_AUTOGEN=0

if [ "$(python3 -c "import platform; print(platform.processor())")" = "arm" ]
then
cmake -DCMAKE_BUILD_TYPE=Release \
-DSAM_SKIP_AUTOGEN=0 -DSAMAPI_EXPORT=1 \
-DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_PREFIX_PATH="$ORTOOLSDIR" \
-Dabsl_DIR="$ORTOOLSDIR/lib/cmake/absl" -Dutf8_range_DIR="$ORTOOLSDIR/lib/cmake/utf8_range" \
-Dortools_DIR="$ORTOOLSDIR/lib/cmake/ortools" ..
else
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=12 \
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk \
-DCMAKE_CXX_FLAGS="-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/usr/include/c++/v1" \
-DSAM_SKIP_AUTOGEN=1 -DSAMAPI_EXPORT=1 \
-DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_PREFIX_PATH="$ORTOOLSDIR" \
-Dabsl_DIR="$ORTOOLSDIR/lib/cmake/absl" -Dutf8_range_DIR="$ORTOOLSDIR/lib/cmake/utf8_range" \
-Dortools_DIR="$ORTOOLSDIR/lib/cmake/ortools" ..
fi
cmake --build . --target SAM_api -j 6

# Building the PyPi and Anaconda packages
# requires Anaconda installed with an environment per Python version from 3.6 to 3.10
# named pysam_build_3.6 pysam_build_3.7 pysam_build_3.8, etc


cd $PYSAMDIR || exit
source $(conda info --base)/etc/profile.d/conda.sh
rm -rf build
rm -rf dist/*

for PYTHONENV in pysam_build_3.9 pysam_build_3.10 pysam_build_3.11 pysam_build_3.12 pysam_build_3.13
for PYTHONENV in pysam_build_3.9 pysam_build_3.10 pysam_build_3.11 pysam_build_3.12 pysam_build_3.13 pysam_build_3.14
do
conda activate $PYTHONENV
yes | pip install -r tests/requirements.txt
Expand All @@ -47,13 +62,13 @@ done
cd ..
if [ "$(python3 -c "import platform; print(platform.processor())")" = "arm" ]
then
docker pull quay.io/pypa/manylinux2014_aarch64
# # docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux2014_aarch64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_aarch64 /io/pysam/build_manylinux.sh || exit
docker pull quay.io/pypa/manylinux_2_28_aarch64
# docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux_2_28_aarch64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_aarch64 /io/pysam/build_manylinux.sh || exit
else
docker pull quay.io/pypa/manylinux2014_x86_64
# docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /io/pysam/build_manylinux.sh || exit
docker pull quay.io/pypa/manylinux_2_28_x86_64
# docker run --rm -dit -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 /bin/bash
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 /io/pysam/build_manylinux.sh || exit
fi

rename -s linux manylinux2014 $PYSAMDIR/dist/*-linux_*
Expand Down
4 changes: 2 additions & 2 deletions build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mkdir %SSCDIR%\..\build_pysam
cd %SSCDIR%\..\build_pysam

REM skip api_autogen since the files should not need to be regenerated
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 -DSAM_SKIP_TOOLS=1 -DSAM_SKIP_TESTS=1 -DSAM_SKIP_AUTOGEN=0 -DSAMAPI_EXPORT=1 ..
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DSAM_SKIP_TOOLS=1 -DSAM_SKIP_TESTS=1 -DSAM_SKIP_AUTOGEN=0 -DSAMAPI_EXPORT=1 DUSE_XPRESS=0 -DUSE_COINOR=1 -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PREFIX_PATH="%ORTOOLSDIR%" -Dabsl_DIR="%ORTOOLSDIR%\lib\cmake\absl" -Dutf8_range_DIR="%ORTOOLSDIR%\lib\cmake\utf8_range" -Dortools_DIR="%ORTOOLSDIR%\lib\cmake\ortools"..
devenv /build Release system_advisor_model.sln /Project SAM_api
if errorlevel 1 (
echo Error in Build
Expand All @@ -15,7 +15,7 @@ cd %PYSAMDIR%
echo y | rmdir build /s
echo y | del dist\*

FOR %%i IN (pysam_build_3.9 pysam_build_3.10 pysam_build_3.11, pysam_build_3.12 pysam_build_3.13) DO (
FOR %%i IN (pysam_build_3.9 pysam_build_3.10 pysam_build_3.11, pysam_build_3.12 pysam_build_3.13 pysam_build_3.14) DO (
call deactivate
call activate %%i
echo y | pip install -r tests/requirements.txt
Expand Down
53 changes: 49 additions & 4 deletions docs/lists/configs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,34 @@ PVWatts-Battery -- Commercial Owner

Configuration name for defaults: *"PVWattsBatteryCommercial"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battwatts`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Cashloan`
:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Cashloan`

PVWatts-Battery -- Merchant Plant
---------------------------------------------------------------------------------

PVWatts system model with battery storage. Merchant plant with constant DSCR and ancillary services revenue, reserve accounts and depreciation allocations.

Configuration name for defaults: *"PVWattsBatteryMerchantPlant"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Merchantplant`

PVWatts-Battery -- Partnership Flip with Debt
---------------------------------------------------------------------------------

PVWatts system model with battery storage. Developer/investor partnership flip PPA structure with debt.

Configuration name for defaults: *"PVWattsBatteryLeveragedPartnershipFlip"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Levpartflip`

PVWatts-Battery -- Partnership Flip without Debt
---------------------------------------------------------------------------------

PVWatts system model with battery storage. Developer/investor partnership flip PPA structure without debt.

Configuration name for defaults: *"PVWattsBatteryAllEquityPartnershipFlip"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Equpartflip`

PVWatts-Battery -- Residential Owner
---------------------------------------------------------------------------------
Expand All @@ -1004,7 +1031,25 @@ PVWatts-Battery -- Residential Owner

Configuration name for defaults: *"PVWattsBatteryResidential"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Belpe`, :doc:`../modules/Battwatts`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Cashloan`
:doc:`../modules/Pvwattsv8`, :doc:`../modules/Belpe`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Cashloan`

PVWatts-Battery -- Sale Leaseback
---------------------------------------------------------------------------------

PVWatts system model with battery storage. Sale leaseback partnership PPA structure.

Configuration name for defaults: *"PVWattsBatterySaleLeaseback"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Saleleaseback`

PVWatts-Battery -- Single Owner
---------------------------------------------------------------------------------

PVWatts system model with battery storage. Single owner PPA with constant DSCR and IRR target year, reserve accounts and depreciation allocations.

Configuration name for defaults: *"PVWattsBatterySingleOwner"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Singleowner`

PVWatts-Battery -- Third Party - Host / Developer
---------------------------------------------------------------------------------
Expand All @@ -1013,7 +1058,7 @@ PVWatts-Battery -- Third Party - Host / Developer

Configuration name for defaults: *"PVWattsBatteryHostDeveloper"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battwatts`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/HostDeveloper`
:doc:`../modules/Pvwattsv8`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/HostDeveloper`

PVWatts-Battery -- Third Party Owner - Host
---------------------------------------------------------------------------------
Expand All @@ -1022,7 +1067,7 @@ PVWatts-Battery -- Third Party Owner - Host

Configuration name for defaults: *"PVWattsBatteryThirdParty"*

:doc:`../modules/Pvwattsv8`, :doc:`../modules/Belpe`, :doc:`../modules/Battwatts`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Thirdpartyownership`
:doc:`../modules/Pvwattsv8`, :doc:`../modules/Belpe`, :doc:`../modules/Battery`, :doc:`../modules/Grid`, :doc:`../modules/Utilityrate5`, :doc:`../modules/Thirdpartyownership`

Parabolic Trough --
---------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/Hcpv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ Functions
.. autoclass:: PySAM.Hcpv.Hcpv
:members:

SolarResourceData Group
------------------------
SolarResourceInformation Group
-------------------------------

.. autoclass:: PySAM.Hcpv.Hcpv.SolarResourceData
.. autoclass:: PySAM.Hcpv.Hcpv.SolarResourceInformation
:members:

PVWatts Group
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/Pvsamv1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ The variables listed below are interdependent with other variables. If you chang

- inv_ds_paco

- inv_num_mppt

- inv_pd_eff

- inv_pd_paco
Expand Down Expand Up @@ -283,6 +281,10 @@ The variables listed below are interdependent with other variables. If you chang

- subarray1_modules_per_string

- subarray1_nmodx

- subarray1_nmody

- subarray1_nstrings

- subarray2_enable
Expand Down
Loading
Loading