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

Test 8.6.x #1938

Closed
wants to merge 16 commits into from
Closed
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 .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install libraries
run: |
dnf install -y epel-release git cmake wget rpm-build
dnf install -y unzip libuuid-devel boost-test boost-devel gcc-toolset-9-toolchain
dnf install -y unzip libuuid-devel boost-test boost-devel gcc-toolset-9-toolchain zlib-devel

- name: Checkout
run: |
Expand Down
95 changes: 48 additions & 47 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,54 @@ jobs:
name: test-log
path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log

- name: Installer .deb creation
run: |
cd _build
cpack -G DEB

- name: .tar.gz creation
run: |
cd _build
cpack -G TGZ

- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install

- name: Installer archive upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz

- name: Installer deb upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.deb

publish_assets:
name: Publish assets
needs: build
runs-on: ${{needs.build.outputs.os}}
steps:
- name: Download all artifacts
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3


- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.deb"]'

# simtest
- name: Read simtest version
id: simtest-version
Expand Down Expand Up @@ -197,50 +245,3 @@ jobs:
batch-name: long-tests-3
os: ${{ matrix.test-platform }}

- name: Installer .deb creation
run: |
cd _build
cpack -G DEB

- name: .tar.gz creation
run: |
cd _build
cpack -G TGZ

- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install

- name: Installer archive upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz

- name: Installer deb upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.deb

publish_assets:
name: Publish assets
needs: build
runs-on: ${{needs.build.outputs.os}}
steps:
- name: Download all artifacts
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3


- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.deb"]'
84 changes: 42 additions & 42 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:
key: |
${{ hashFiles( 'vcpkg_manifest/vcpkg.json' ) }}-${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}-${{ matrix.triplet }}

- name: Setup Python 3.11
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
architecture: 'x64'
python-version: '3.11'
python-version: '3.12'

- name : Install deps with VCPKG
run: |
Expand Down Expand Up @@ -121,6 +121,46 @@ jobs:
shell: bash
run: rm -rf ${{ github.workspace }}/src/_build/_deps

- name: .zip creation
shell: bash
run: |
cd _build
cpack -G ZIP
export ZIP_NAME=$(ls *.zip)
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV

- name: Solver archive creation
shell: bash
run: |
cd _build
zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll

- name: NSIS Installer creation
shell: bash
run: |
rm -rf src/tests/resources/Antares_Simulator_Tests
rm -rf src/tests/resources/NonRegTests
cd _build
cpack -GNSIS
export NSIS_NAME=$(ls *.exe)
echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV

- name: Upload NSIS logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: NSISOutput.log
path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log

- name: Upload release assets
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_build/${{env.NSIS_NAME}}
_build/${{env.ZIP_NAME}}
_build/solver.zip

# simtest
- name: Read simtest version
id: simtest-version
Expand Down Expand Up @@ -163,43 +203,3 @@ jobs:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-3
os: ${{ matrix.test-platform }}

- name: .zip creation
shell: bash
run: |
cd _build
cpack -G ZIP
export ZIP_NAME=$(ls *.zip)
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV

- name: Solver archive creation
shell: bash
run: |
cd _build
zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll

- name: NSIS Installer creation
shell: bash
run: |
rm -rf src/tests/resources/Antares_Simulator_Tests
rm -rf src/tests/resources/NonRegTests
cd _build
cpack -GNSIS
export NSIS_NAME=$(ls *.exe)
echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV

- name: Upload NSIS logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: NSISOutput.log
path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log

- name: Upload release assets
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_build/${{env.NSIS_NAME}}
_build/${{env.ZIP_NAME}}
_build/solver.zip
37 changes: 34 additions & 3 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
Antares Changelog
=================

# v8.6.4 (11/2023)
## Bugfixes
* Fix Oracle Linux minizip build + actually run zip unit tests (#1744)
* Fix output variable PROFIT for thermal clusters (#1767)

# v8.6.3 (10/2023)
## Bugfixes
* Increase file size limit from 80Mo to 80Go when reading file. Fix issue on Windows

# v8.6.2 (08/2023)
## Bugfixes
* Backport [v8.4.3](#v843-082023) changes

8.6.1 (06/2023)
--------------------
## Bugfixes
* Fix major bug related to short-term storage & MRG. PRICE


8.6.0 (06/2023)
--------------------
## New features
Expand Down Expand Up @@ -37,9 +56,12 @@ Antares Changelog
## For developers
* Bumped OR-Tools 9.2 -> 9.5. CMake 3.18+ is required for build if building OR-Tools, and XPRESS 9.0 for execution (previously 8.13).


v8.5.0 (02/2022)
--------------------
# v8.5.1 (08/2023)

* Backport [v8.4.3](#v843-082023) changes

# v8.5.0 (02/2022)

## New features
* Curtailment Sharing Rule for Adequacy Patch #1062, including a scaling coefficient in hurdle costs #1155. This feature was contributed by RTE-i with support from RTE, ELIA and APG.
Expand All @@ -56,6 +78,15 @@ v8.5.0 (02/2022)
* Update docs to include CSR #1156
* Fix examples studies (invalid v8.3.0 -> v8.5.0) #1136

# v8.4.3 (08/2023)

## Features
* Increase file size limit from 80Mo to 80Go when reading file.

## Bugfix
* Fix "unhandled error" with big studies in zip mode. MPS files were too big and hit file size hard limit


v8.4.2 (01/2022)
--------------------

Expand All @@ -66,7 +97,7 @@ v8.4.2 (01/2022)
## GUI
* Allow more than 100 thermal clusters #1011
* Remove status bar count. The sum was sometimes wrong #1029
* Remove unused "District marginal prices" button from Advanced Parameters #1067
* Remove unused "District marginal prices" button from Advanced Parameters (#1067)

## Bugfix
* Fix overwritten MPS files when optimization/simplex-range=day #1041
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.projectName=Antares_Simulator
sonar.projectKey=AntaresSimulatorTeam_Antares_Simulator
sonar.organization=antaressimulatorteam
sonar.projectVersion=8.6.0
sonar.projectVersion=8.6.4

# =====================================================
# Properties that will be shared amongst all modules
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14) # FetchContent_MakeAvailable
# Version
set(ANTARES_VERSION_HI 8)
set(ANTARES_VERSION_LO 6)
set(ANTARES_VERSION_REVISION 0)
set(ANTARES_VERSION_REVISION 4)
set(ANTARES_VERSION_YEAR 2023)

project(antares
Expand Down
8 changes: 3 additions & 5 deletions src/ext/yuni/src/yuni/io/file/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ namespace IO
namespace File
{
// constants
enum
{
//! The maximum allowed size for a file in memory (Default: 80Mo)
sizeHardLimit = 83886080u, // 80Mo = 80 * 1024 * 1024
};
//! The maximum allowed size for a file in memory (Default: 80Go)
constexpr unsigned long long sizeHardLimit = 85899345920u; // 80Gb = 80 * 1024 * 1024 * 1024


/*!
** \brief Test if a node exists and is actually a file
Expand Down
10 changes: 6 additions & 4 deletions src/solver/optimisation/opt_gestion_des_couts_cas_lineaire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
#include "opt_fonctions.h"
#include "../aleatoire/alea_fonctions.h"

extern "C"
{
#include "spx_constantes_externes.h"
}

static void shortTermStorageCost(
int PremierPdtDeLIntervalle,
Expand All @@ -50,13 +53,13 @@ static void shortTermStorageCost(
double* linearCost)
{
SIM::SpreadGenerator spreadGenerator;
int pdtJour = 0;
for (int pays = 0; pays < NombreDePays; ++pays)
{
for (const auto& storage : shortTermStorageInput[pays])
{
for (int pdtHebdo = PremierPdtDeLIntervalle; pdtHebdo < DernierPdtDeLIntervalle;
pdtHebdo++)
for (int pdtHebdo = PremierPdtDeLIntervalle, pdtJour = 0;
pdtHebdo < DernierPdtDeLIntervalle;
pdtHebdo++, pdtJour++)
{
auto VarCurrent = CorrespondanceVarNativesVarOptim[pdtJour];
const int clusterGlobalIndex = storage.clusterGlobalIndex;
Expand All @@ -82,7 +85,6 @@ static void shortTermStorageCost(
linearCost[varWithdrawal] = storage.efficiency * cost;
}
}
pdtJour++;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/solver/variable/economy/profitByPlant.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ class ProfitByPlant : public Variable::IVariable<ProfitByPlant<NextT>, NextT, VC
auto* cluster = state.area->thermal.clusters[clusterIndex];
double hourlyClusterProduction
= thermal[area->index].thermalClustersProductions[clusterIndex];
double pMin = thermal[area->index].PMinOfClusters[clusterIndex];
// Thermal cluster profit
pValuesForTheCurrentYear[numSpace][cluster->areaWideIndex].hour[hourInTheYear]
= (hourlyClusterProduction - cluster->PthetaInf[hourInTheYear])
= (hourlyClusterProduction - pMin)
* (-areaMarginalCosts[hourInTheWeek]
- cluster->marginalCost
* cluster->modulation[Data::thermalModulationCost][hourInTheYear]);
Expand Down
3 changes: 3 additions & 0 deletions src/solver/writer/zip_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ void ZipWriter::addEntryFromFile(const std::string& entryPath, const std::string
case errReadFailed:
logs.error() << "Read failed '" << filePath << "'";
break;
case errMemoryLimit:
logs.error() << "Size limit hit for file '" << filePath << "'";
break;
default:
logs.error() << "Unhandled error";
break;
Expand Down
1 change: 0 additions & 1 deletion src/tests/src/libs/antares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ target_link_libraries(tests-matrix-load
set_target_properties(tests-matrix-load PROPERTIES FOLDER Unit-tests)

add_test(NAME load-matrix COMMAND tests-matrix-load)

set_property(TEST load-matrix PROPERTY LABELS unit)
15 changes: 15 additions & 0 deletions src/tests/src/libs/antares/writer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
add_executable(test-writer)

target_sources(test-writer PRIVATE test_zip_writer.cpp)

target_link_libraries(test-writer
PRIVATE
Boost::unit_test_framework
Antares::result_writer
test_utils_unit
MINIZIP::minizip
)

add_test(NAME writer COMMAND test-writer)

set_tests_properties(writer PROPERTIES LABELS unit)
Loading