Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OR-Tools Integration & C++17 upgrade #1035

Open
wants to merge 122 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
74e6e73
add or-tools to ssc
dguittet Apr 24, 2023
1696543
ortools_test working
dguittet Jun 13, 2023
e9845c0
or_tools test
dguittet Jun 13, 2023
a1c5e56
Merge branch 'develop' into ortools
dguittet Jun 13, 2023
d4d7992
update for latest gtest
dguittet Aug 28, 2023
ae828af
update windows build
dguittet Sep 5, 2023
9659782
update build for windows
dguittet Sep 5, 2023
48a0636
or-tools in CI
dguittet Sep 18, 2023
61515c5
or-tools in CI
dguittet Sep 18, 2023
019a817
or-tools in CI
dguittet Sep 18, 2023
0f30dc9
fix ci.yml
dguittet Sep 18, 2023
0f79487
fix paths ci.yml
dguittet Sep 18, 2023
ff83c30
fix cmake
dguittet Sep 18, 2023
07fd932
fix min_up_down_params permissive
dguittet Sep 18, 2023
786632a
fix min_up_down_params permissive
dguittet Sep 18, 2023
60ea590
use curl for macosx
dguittet Sep 18, 2023
7e31e70
fix curl cmd
dguittet Sep 18, 2023
efcc7e6
update shared/CMakeLists for XPRESS
dguittet Sep 21, 2023
8c624ba
delete Eigen3 and run all tests
dguittet Sep 21, 2023
b9cf977
Merge branch 'ortools' of https://github.com/NREL/ssc into ortools
dguittet Sep 21, 2023
3505065
USE_XPRESS in CMakeLists
dguittet Sep 21, 2023
7a29650
rename test
dguittet Sep 21, 2023
2c28f80
fix PvYield test
dguittet Sep 21, 2023
63d0a0a
update XPRESS in CMakeLists
dguittet Sep 21, 2023
8d7e946
Merge branch 'ortools' of https://github.com/nrel/ssc into ortools
dguittet Sep 21, 2023
3ab34a2
Merge branch 'develop' into ortools
dguittet Sep 26, 2023
3be8f42
Merge branch 'develop' into ortools
dguittet Oct 10, 2023
f6f9a10
Merge branch 'develop' into ortools
dguittet Oct 10, 2023
f68af28
Merge branch 'develop' into ortools
dguittet Oct 19, 2023
592383e
Merge branch 'develop' into ortools
dguittet Nov 16, 2023
731d913
Merge branch 'develop' into ortools
dguittet Jan 31, 2024
e552c57
run ortools at the end of generic system for testing
dguittet Jan 31, 2024
242ad56
Merge branch 'patch' into ortools
dguittet Apr 3, 2024
6f3cfe3
Merge branch 'develop' into ortools
dguittet Apr 3, 2024
b6c8964
Merge branch 'patch' into ortools
dguittet Apr 22, 2024
20b3f1c
update CMake for Windows
dguittet Apr 26, 2024
1da87c7
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambigu…
dguittet Apr 26, 2024
9e75692
Revert "https://developercommunity.visualstudio.com/t/error-c2872-byt…
dguittet Apr 26, 2024
cd1e8ec
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambigu…
dguittet Apr 26, 2024
2895d03
Merge branch 'c17_std_byte' into ortools
dguittet Apr 26, 2024
0af910e
CI update OR-tools download for mac arm64
dguittet Apr 30, 2024
ceba4c8
Merge branch 'ortools' of https://github.com/nrel/ssc into ortools
dguittet Apr 30, 2024
b97d924
CI update OR-tools download for mac arm64
dguittet Apr 30, 2024
ce16060
update battery tests
dguittet Apr 30, 2024
1c22f83
update battery test
dguittet May 1, 2024
10110a0
Merge branch 'patch' into c17_std_byte
dguittet May 2, 2024
c004673
update CMake and reading OR-tools input file
dguittet May 3, 2024
d1b77ad
initial fix to overinflated sell rates on tier changes
brtietz May 3, 2024
db3c6d1
Setting up Solesca tests for SOL-853 branch
sjanzou May 6, 2024
8796095
Merge remote-tracking branch 'origin/patch' into SOL-853
sjanzou May 6, 2024
db5d852
Testing SOL-853 branch from Solesca
sjanzou May 6, 2024
a52d40c
add mac intel and try windows runner
dguittet May 6, 2024
dbdeabd
windows build
dguittet May 6, 2024
4253ae5
windows ci
dguittet May 6, 2024
900f359
windows ci
dguittet May 6, 2024
b044226
windows ci
dguittet May 6, 2024
f4452dc
windows ci
dguittet May 6, 2024
ce50f0b
windows ci
dguittet May 6, 2024
3060a2e
windows ci
dguittet May 6, 2024
f266b91
windows ci
dguittet May 6, 2024
e66bcfa
windows ci
dguittet May 6, 2024
255f215
windows ci
dguittet May 6, 2024
fd91767
windows ci
dguittet May 6, 2024
b243ced
Update ci.yml
dguittet May 6, 2024
46214d9
Update ci.yml
dguittet May 6, 2024
68938c0
Merge branch 'ortools' of https://github.com/NREL/ssc into ortools
dguittet May 6, 2024
4758077
Update ci.yml
dguittet May 6, 2024
91f7e63
Merge branch 'ortools' into c17_std_byte
dguittet May 6, 2024
39ef963
Revert "Merge branch 'ortools' into c17_std_byte"
dguittet May 6, 2024
210512c
Merge branch 'c17_std_byte' into ortools
dguittet May 6, 2024
b5535d9
Update ci.yml
dguittet May 6, 2024
1f807e7
Merge branch 'c17_std_byte' into ortools
dguittet May 6, 2024
68ee2a5
Update ci.yml
dguittet May 7, 2024
372f954
Update ci.yml
dguittet May 7, 2024
b7a7e30
Update ci.yml
dguittet May 7, 2024
cb33476
Update ci.yml
dguittet May 7, 2024
420b10a
Update ci.yml
dguittet May 7, 2024
5e65487
Update ci.yml
dguittet May 7, 2024
4da9e5b
Update ci.yml
dguittet May 7, 2024
58780bb
Update ci.yml
dguittet May 7, 2024
edaf4b3
Update ci.yml
dguittet May 7, 2024
6bfbf88
Update ci.yml
dguittet May 7, 2024
851b1da
Update ci.yml
dguittet May 7, 2024
e29a0a0
Update ci.yml
dguittet May 7, 2024
07a98bd
Update ci.yml
dguittet May 7, 2024
ee3e396
Update ci.yml
dguittet May 7, 2024
857d8a2
change inv_tdc from array to matrix and set enable_mismatch_vmax_calc…
sjanzou May 8, 2024
4e785ad
Update ci.yml
dguittet May 8, 2024
f320c7a
fix deprecation warnings in ci.yml
dguittet May 8, 2024
22743a2
Merge branch 'ci_runners' of https://github.com/nrel/ssc into ci_runners
dguittet May 8, 2024
c056e08
Update ci.yml
dguittet May 8, 2024
c2121ed
Update ci.yml
dguittet May 8, 2024
34b68fa
Update ci.yml
dguittet May 8, 2024
6666f82
python avail check for windbosse
dguittet May 8, 2024
8613649
update test
dguittet May 9, 2024
8b36fba
Merge branch 'patch' into SOL-853
sjanzou May 14, 2024
ca66d07
Merge branch 'patch' of https://github.com/NREL/ssc into sam_1738_cor…
brtietz May 17, 2024
1669ffb
update versions
dguittet May 23, 2024
39e40c7
Add Solesca tests to ssc and match results
sjanzou May 27, 2024
9313268
Re-enable all ssc tests before making pull request
sjanzou May 28, 2024
475689d
Add while loops to handle load and generation profiles that pass thro…
brtietz May 28, 2024
bd05a7b
Merge pull request #1165 from NREL/SOL-853
sjanzou May 29, 2024
9967f3e
reorder
dguittet May 29, 2024
22029e8
find_package ZLIB
dguittet May 29, 2024
6825d95
Merge pull request #1168 from NREL/sam_1738_correct_net_billing_sell_…
brtietz May 29, 2024
fd4eec4
Merge branch 'patch' into ortools
dguittet May 29, 2024
08729a4
add GTEST caching and update CMake Windows
dguittet May 30, 2024
1d37c43
update or-tools ci
dguittet May 30, 2024
10c42f1
Merge branch 'ci_runners' into ortools
dguittet May 30, 2024
036a374
or-tools windows
dguittet May 30, 2024
9f9b591
fix or-tools tar
dguittet May 30, 2024
99f6010
fix dir
dguittet May 30, 2024
1f85737
fix dirs
dguittet May 30, 2024
a5a2a8d
build or-tools windows
dguittet Jun 3, 2024
44d1577
fix ZLIB
dguittet Jun 3, 2024
f948a37
stable or-tools
dguittet Jun 4, 2024
857249a
Batt Thermal (#1164)
dguittet Jun 5, 2024
716020b
add temp dirs
dguittet Jun 7, 2024
d312aad
update input path
dguittet Jun 7, 2024
dcba0c6
add find_package for SCIP
dguittet Jun 10, 2024
5a3a943
Merge branch 'patch' into ortools
dguittet Jun 11, 2024
31a8712
Merge branch 'develop' into ortools
dguittet Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
184 changes: 140 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
GTEST_REF: b85864c64758dec007208e56af933fc3f52044ee

jobs:
build-on-ubuntu:
Expand All @@ -26,24 +27,53 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV
ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}/
key: ortools-ubuntu

- name: Download OR-Tools
if: steps.cachedortools.outputs.cache-hit != 'true'
run: |
sudo apt update
sudo apt install -y build-essential cmake lsb-release
cd $GITHUB_WORKSPACE
wget -q https://github.com/google/or-tools/releases/download/v9.9/or-tools_amd64_ubuntu-23.04_cpp_v9.9.3963.tar.gz
tar -xvf or-tools_amd64_ubuntu-23.04_cpp_v9.9.3963.tar.gz
mkdir or-tools
mv or-tools*/* or-tools

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
with:
path: ${{env.GTEST}}/
key: gtest-ubuntu

- name: Clone Gtest
uses: actions/checkout@v2
if: steps.cachedgtest.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: google/googletest
path: googletest
ref: b85864c64758dec007208e56af933fc3f52044ee
ref: ${{env.GTEST_REF}}

- name: build Gtest
if: steps.cachedgtest.outputs.cache-hit != 'true'
run: |
export
mkdir ${GTEST}/build
cd ${GTEST}/build
cmake -DCMAKE_CXX_FLAGS=-std=c++11 ..
make

- name: Checkout SSC
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ssc

Expand All @@ -52,7 +82,7 @@ jobs:
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DCMAKE_INSTALL_PREFIX=${ORTOOLSDIR}

- name: Build
# Build your program with the given configuration
Expand All @@ -68,7 +98,7 @@ jobs:
${SSCDIR}/build/test/Test

- name: Upload Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Linux Shared Libraries
path: |
Expand All @@ -95,15 +125,49 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV
ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}/
key: ortools-${{ matrix.os }}

- name: download OR-Tools for Arm64
if: ${{ matrix.os == 'macos-latest' && steps.cachedortools.outputs.cache-hit != 'true'}}
run: |
cd $GITHUB_WORKSPACE
curl -LJO https://github.com/google/or-tools/releases/download/v9.9/or-tools_arm64_macOS-14.3.1_cpp_v9.9.3963.tar.gz
tar -xvf or-tools_arm64*.tar.gz
mkdir or-tools
mv or-tools*/* or-tools
- name: download OR-Tools for Intel
if: ${{ matrix.os == 'macos-14-large' && steps.cachedortools.outputs.cache-hit != 'true'}}
run: |
cd $GITHUB_WORKSPACE
curl -LJO https://github.com/google/or-tools/releases/download/v9.9/or-tools_x86_64_macOS-14.3.1_cpp_v9.9.3963.tar.gz
tar -xvf or-tools_x86_64*tar.gz
mkdir or-tools
mv or-tools*/* or-tools

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
with:
path: ${{env.GTEST}}/
key: ortools-${{ matrix.os }}
- name: Clone Gtest
uses: actions/checkout@v2
if: steps.cachedgtest.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: google/googletest
path: googletest
ref: b85864c64758dec007208e56af933fc3f52044ee
ref: ${{env.GTEST_REF}}

- name: build Gtest
if: steps.cachedgtest.outputs.cache-hit != 'true'
run: |
export
mkdir ${GTEST}/build
Expand All @@ -112,7 +176,7 @@ jobs:
make

- name: Checkout SSC
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ssc

Expand All @@ -121,7 +185,7 @@ jobs:
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=0
cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=0 -DCMAKE_INSTALL_PREFIX=${ORTOOLSDIR}

- name: Build
# Build your program with the given configuration
Expand All @@ -134,11 +198,11 @@ jobs:
run: |
set -e
${SSCDIR}/build/test/Test
shell: bash
shell: bash

- name: Upload Artifacts
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Mac Arm Shared Libraries
path: |
Expand All @@ -147,7 +211,7 @@ jobs:

- name: Upload Artifacts
if: ${{ matrix.os != 'macos-latest' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: SSC Mac Intel Shared Libraries
path: |
Expand All @@ -159,7 +223,7 @@ jobs:

steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.12
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Test cmake version
Expand All @@ -172,50 +236,82 @@ jobs:
echo "GTEST=$GTEST" >> $GITHUB_ENV
SSCDIR=$GITHUB_WORKSPACE/ssc
echo "SSCDIR=$SSCDIR" >> $GITHUB_ENV

ORTOOLSDIR=$GITHUB_WORKSPACE/or-tools/install
echo "ORTOOLSDIR=$ORTOOLSDIR" >> $GITHUB_ENV

- name: Get cached OR-Tools
uses: actions/cache@v4
id: cachedortools
with:
path: ${{env.ORTOOLSDIR}}/
key: ortools-windows

- name: Clone OR-Tools
if: steps.cachedortools.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: google/or-tools
path: or-tools
# ref: 87ac305ace23e1d77beec597c9a714b86082e9ee

- name: Build OR-Tools
if: steps.cachedortools.outputs.cache-hit != 'true'
shell: bash
run: |
cd or-tools
cmake -S . -B build -DBUILD_DEPS=ON -DUSE_COINOR=OFF -DUSE_HIGHS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_DOC=OFF -DINSTALL_DOC=OFF -DUSE_XPRESS=OFF -DCMAKE_INSTALL_PREFIX=${ORTOOLSDIR}
cmake --build build --config Release --target install -v -j 4

- name: Get cached GTest
uses: actions/cache@v4
id: cachedgtest
with:
path: ${{env.GTEST}}/
key: gtest-windows

- name: Clone Gtest
uses: actions/checkout@v2
if: steps.cachedgtest.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: google/googletest
path: googletest
ref: b85864c64758dec007208e56af933fc3f52044ee
ref: ${{env.GTEST_REF}}

- name: build Gtest
if: steps.cachedgtest.outputs.cache-hit != 'true'
shell: bash
# Need to build both Release and Debug for the SSC CMake below
run: |
export
mkdir ${GTEST}/build
cd ${GTEST}/build
cmake -Dgtest_force_shared_crt=ON ..
cmake --build . --config Release -j4
cmake --build . --config Debug -j4

- name: Checkout SSC
uses: actions/checkout@v2
with:
path: ssc
# - name: Checkout SSC
# uses: actions/checkout@v4
# with:
# path: ssc

- name: Configure CMake
shell: bash
# Configure cmake to build ssc tests but not tools
run: |
mkdir ${SSCDIR}/build
cd ${SSCDIR}/build
cmake .. -DSAM_SKIP_TOOLS=1
cmake --build . --config Release -j4
cp ssc/Release/* test/Release
# - name: Configure CMake
# shell: bash
# # Configure cmake to build ssc tests but not tools
# run: |
# mkdir ${SSCDIR}/build
# cd ${SSCDIR}/build
# cmake .. -DSAM_SKIP_TOOLS=1
# cmake --build . --config Release -j4
# cp ssc/Release/* test/Release

- name: Test
shell: bash
# Turn off fast fail for when the landbosse tests write to cerr
run: |
cd ${SSCDIR}/build/test/Release
./Test.exe
# - name: Test
# shell: bash
# # Turn off fast fail for when the landbosse tests write to cerr
# run: |
# cd ${SSCDIR}/build/test/Release
# ./Test.exe

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: SSC Windows Shared Libraries
path: |
${{env.SSCDIR}}\build\ssc\Release\ssc.dll
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: SSC Windows Shared Libraries
# path: |
# ${{env.SSCDIR}}\build\ssc\Release\ssc.dll
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ bld/
build/
cmake-build-debug/
cmake-build-release/
CMakeFiles
CMakeCache.txt
test/Test

# Visual Studio 2015 cache/options directory
Expand Down Expand Up @@ -344,6 +346,7 @@ build_osx/Test
build_linux/Test
build_linux/config.status
linux_test\.txt
build2

nlopt/config.h
nlopt/config.status
Expand All @@ -360,3 +363,5 @@ ssc/ssc\.exp
ssc/sscd\.exp

build_android/lib_oldssc.zip

or-tools