Skip to content

Commit

Permalink
Release 8.8.6 (#2194)
Browse files Browse the repository at this point in the history
#2121

---------

Co-authored-by: Abdoulbari Zakir <[email protected]>
  • Loading branch information
payetvin and a-zakir authored Jun 28, 2024
1 parent 0573c5f commit 9fa753e
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 77 deletions.
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 8)
set(ANTARES_VERSION_REVISION 5)
set(ANTARES_VERSION_REVISION 6)

# Beta release
set(ANTARES_BETA 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,28 +191,27 @@ class BindingConstMarginCost

void yearEnd(unsigned int year, unsigned int numSpace)
{
if (!isInitialized())
return;

if (isInitialized())
{
// Compute statistics for the current year depending on
// the BC type (hourly, daily, weekly)
using namespace Data;
switch (associatedBC_->type())
{
case BindingConstraint::typeHourly:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromHourlyResults();
break;
case BindingConstraint::typeDaily:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromDailyResults();
break;
case BindingConstraint::typeWeekly:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromWeeklyResults();
break;
case BindingConstraint::typeUnknown:
case BindingConstraint::typeMax:
break;
case BindingConstraint::typeHourly:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromHourlyResults();
break;
case BindingConstraint::typeDaily:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromDailyResults();
break;
case BindingConstraint::typeWeekly:
pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromWeeklyResults();
break;
case BindingConstraint::typeUnknown:
case BindingConstraint::typeMax:
break;
}
}

// Next variable
NextType::yearEnd(year, numSpace);
}
Expand All @@ -233,53 +232,54 @@ class BindingConstMarginCost

void weekBegin(State& state)
{
if (!isInitialized())
return;

auto numSpace = state.numSpace;
// For daily binding constraints, getting daily marginal price
using namespace Data;
switch (associatedBC_->type())
{
case BindingConstraint::typeHourly:
case BindingConstraint::typeUnknown:
case BindingConstraint::typeMax:
return;

case BindingConstraint::typeDaily:
if (isInitialized())
{
int dayInTheYear = state.weekInTheYear * 7;
for (int dayInTheWeek = 0; dayInTheWeek < 7; dayInTheWeek++)
auto numSpace = state.numSpace;
// For daily binding constraints, getting daily marginal price
using namespace Data;
switch (associatedBC_->type())
{
pValuesForTheCurrentYear[numSpace].day[dayInTheYear]
-= state.problemeHebdo
->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[dayInTheWeek];
case BindingConstraint::typeHourly:
case BindingConstraint::typeUnknown:
case BindingConstraint::typeMax:
break;

dayInTheYear++;
case BindingConstraint::typeDaily:
{
int dayInTheYear = state.weekInTheYear * 7;
for (int dayInTheWeek = 0; dayInTheWeek < 7; dayInTheWeek++)
{
pValuesForTheCurrentYear[numSpace].day[dayInTheYear]
-= state.problemeHebdo
->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[dayInTheWeek];

dayInTheYear++;
}
break;
}
break;
}

// For weekly binding constraints, getting weekly marginal price
case BindingConstraint::typeWeekly:
{
uint weekInTheYear = state.weekInTheYear;
double weeklyValue
= -state.problemeHebdo->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[0];

pValuesForTheCurrentYear[numSpace].week[weekInTheYear] = weeklyValue;

int dayInTheYear = state.weekInTheYear * 7;
for (int dayInTheWeek = 0; dayInTheWeek < 7; dayInTheWeek++)
// For weekly binding constraints, getting weekly marginal price
case BindingConstraint::typeWeekly:
{
pValuesForTheCurrentYear[numSpace].day[dayInTheYear] = weeklyValue;
dayInTheYear++;
uint weekInTheYear = state.weekInTheYear;
double weeklyValue
= -state.problemeHebdo->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[0];

pValuesForTheCurrentYear[numSpace].week[weekInTheYear] = weeklyValue;

int dayInTheYear = state.weekInTheYear * 7;
for (int dayInTheWeek = 0; dayInTheWeek < 7; dayInTheWeek++)
{
pValuesForTheCurrentYear[numSpace].day[dayInTheYear] = weeklyValue;
dayInTheYear++;
}
break;
}
}
break;
}
}
NextType::weekBegin(state);
}

void hourBegin(unsigned int hourInTheYear)
Expand All @@ -290,17 +290,16 @@ class BindingConstMarginCost

void hourEnd(State& state, unsigned int hourInTheYear)
{
if (!isInitialized())
return;

auto numSpace = state.numSpace;
if (associatedBC_->type() == Data::BindingConstraint::typeHourly)
if (isInitialized())
{
pValuesForTheCurrentYear[numSpace][hourInTheYear]
-= state.problemeHebdo->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[state.hourInTheWeek];
auto numSpace = state.numSpace;
if (associatedBC_->type() == Data::BindingConstraint::typeHourly)
{
pValuesForTheCurrentYear[numSpace][hourInTheYear]
-= state.problemeHebdo->ResultatsContraintesCouplantes[bindConstraintGlobalIndex_]
.variablesDuales[state.hourInTheWeek];
}
}

NextType::hourEnd(state, hourInTheYear);
}

Expand Down Expand Up @@ -340,20 +339,21 @@ class BindingConstMarginCost
{
// Building syntheses results
// ------------------------------
if (!(precision & associatedBC_->yearByYearFilter()))
return;

// And only if we match the current data level _and_ precision level
if ((dataLevel & VCardType::categoryDataLevel) && (fileLevel & VCardType::categoryFileLevel)
&& (precision & VCardType::precision))
if (precision & associatedBC_->yearByYearFilter())
{
results.isPrinted = AncestorType::isPrinted;
results.isCurrentVarNA[0] = isCurrentOutputNonApplicable(precision);
results.variableCaption = getBindConstraintCaption();
// And only if we match the current data level _and_ precision level
if ((dataLevel & VCardType::categoryDataLevel) && (fileLevel & VCardType::categoryFileLevel)
&& (precision & VCardType::precision))
{
results.isPrinted = AncestorType::isPrinted;
results.isCurrentVarNA[0] = isCurrentOutputNonApplicable(precision);
results.variableCaption = getBindConstraintCaption();

VariableAccessorType::template BuildSurveyReport<VCardType>(
results, AncestorType::pResults, dataLevel, fileLevel, precision, false);
VariableAccessorType::template BuildSurveyReport<VCardType>(
results, AncestorType::pResults, dataLevel, fileLevel, precision, false);
}
}
NextType::buildSurveyReport(results, dataLevel, fileLevel, precision);
}

private:
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 6641 files

0 comments on commit 9fa753e

Please sign in to comment.