Skip to content

Commit

Permalink
Post merge build errors resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaredstork committed Sep 21, 2023
1 parent baa6994 commit 00b8592
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/libs/antares/study/area/scratchpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ AreaScratchpad::AreaScratchpad(const StudyRuntimeInfos& rinfos, Area& area) : ts

AreaScratchpad::~AreaScratchpad() = default;

bool AreaScratchpad::CheckForPositiveEnergy(const Matrix<double, Yuni::sint32>& matrix,
bool AreaScratchpad::CheckForPositiveEnergy(const Matrix<double, int32_t>& matrix,
const Matrix<double>::ColumnType& hours)
{
double value = 0.;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/area/scratchpad.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class AreaScratchpad final
double dispatchableGenerationMargin[168];

private:
bool CheckForPositiveEnergy(const Matrix<double, Yuni::sint32>& matrix,
bool CheckForPositiveEnergy(const Matrix<double, int32_t>& matrix,
const Matrix<double>::ColumnType& hours);
}; // class AreaScratchpad

Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/parts/hydro/datatransfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ bool DataTransfer::SupportForOldStudies(Study& study, const AnyString& folder, A
return ret;
}

void DataTransfer::AutoTransferPower(Matrix<double, Yuni::sint32>& matrix,
void DataTransfer::AutoTransferPower(Matrix<double, int32_t>& matrix,
const Matrix<double>::ColumnType& maxP)
{
uint hours = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/parts/hydro/datatransfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DataTransfer

bool LoadFromFolder(Study& study, const AnyString& folder, Area& area);
bool AutoTransferHours(Study& study, const AnyString& folder, Area& area);
void AutoTransferPower(Matrix<double, Yuni::sint32>& matrix,
void AutoTransferPower(Matrix<double, int32_t>& matrix,
const Matrix<double>::ColumnType& maxPower);
bool SupportForOldStudies(Study& study, const AnyString& folder, Area& area);

Expand Down
11 changes: 2 additions & 9 deletions src/libs/antares/study/parts/hydro/series.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ class DataSeriesHydro
*/
void checkMinGenTsNumber(Study& s, const AreaName& areaID);

private:
/*!
** \brief Support old studies due to new sets of data
*/
void AutoTransferData(Matrix<double, Yuni::sint32>& matrix,
const Matrix<double>::ColumnType& maxPower);

public:
/*!
** \brief Run-of-the-river - ROR (MW)
Expand Down Expand Up @@ -141,14 +134,14 @@ class DataSeriesHydro
**
** Merely a matrix of TimeSeriesCount * HOURS_PER_YEAR values
*/
Matrix<double, Yuni::sint32> maxgen;
Matrix<double, int32_t> maxgen;

/*!
** \brief Maximum Pumping (MW)
**
** Merely a matrix of TimeSeriesCount * HOURS_PER_YEAR values
*/
Matrix<double, Yuni::sint32> maxpump;
Matrix<double, int32_t> maxpump;

/*!
** \brief The number of time-series
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/scenario-builder/applyToMatrix.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool ApplyToMatrixPowerCredits(uint& errors,
const uint nbYears = data.timeseriesNumbersPowerCredits.height;
// The matrix m has only one column
assert(data.timeseriesNumbersPowerCredits.width == 1);
typename Matrix<uint32>::ColumnType& target = data.timeseriesNumbersPowerCredits[0];
typename Matrix<uint32_t>::ColumnType& target = data.timeseriesNumbersPowerCredits[0];

for (uint y = 0; y != nbYears; ++y)
{
Expand Down
4 changes: 2 additions & 2 deletions src/solver/simulation/sim_calcul_economique.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,13 @@ void SIM_RenseignementProblemeHebdo(const Study& study,
auto& maxgenmatrix = area.hydro.series->maxgen;
auto const& srcmaxgen
= maxgenmatrix[tsIndexPowerCredits < maxgenmatrix.width ? tsIndexPowerCredits : 0];
auto const& ContrainteDePmaxHydrauliqueHoraire = srcmaxgen[PasDeTempsDebut + j];
auto const& ContrainteDePmaxHydrauliqueHoraire = srcmaxgen[PasDeTempsDebut + hourInWeek];

auto& maxpumpmatrix = area.hydro.series->maxpump;
auto const& srcmaxpump
= maxpumpmatrix[tsIndexPowerCredits < maxpumpmatrix.width ? tsIndexPowerCredits
: 0];
auto const& ContrainteDePmaxPompageHoraire = srcmaxpump[PasDeTempsDebut + j];
auto const& ContrainteDePmaxPompageHoraire = srcmaxpump[PasDeTempsDebut + hourInWeek];

assert(&scratchpad);
assert((uint)hourInYear < scratchpad.ts.load.height);
Expand Down
2 changes: 1 addition & 1 deletion src/solver/simulation/timeseries-numbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ void drawAndStoreTSnumbersForNOTintraModal(const array<bool, timeSeriesCount>& i
uint nbTimeSeries = area.hydro.series->maxgen.width;
if (nbTimeSeries != 1)
{
area.hydro.series->timeseriesNumbersPowerCredits[0][year] = static_cast<uint32>(
area.hydro.series->timeseriesNumbersPowerCredits[0][year] = static_cast<uint32_t>(
(floor(study.runtime->random[seedTimeseriesNumbers].next() * nbTimeSeries)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bool createFile(const my_string& folder_path, const my_string& file_name)
}
}

void InstantiateMatrix(Matrix<double, Yuni::sint32>& matrix, double seed, uint type)
void InstantiateMatrix(Matrix<double, int32_t>& matrix, double seed, uint type)
{
for (uint i = 0; i < matrix.width; i++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ namespace fs = std::filesystem;

void createFolder(const my_string& path, const my_string& folder_name);
bool createFile(const my_string& folder_path, const my_string& file_name);
void InstantiateMatrix(Matrix<double, Yuni::sint32>& matrix, double seed, uint type);
void InstantiateMatrix(Matrix<double, int32_t>& matrix, double seed, uint type);
void InstantiateColumn(Matrix<double>::ColumnType& col, double seed, uint type);
void removeFolder(my_string& path, my_string& folder_name);
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class TimeSeriesHydroMinGen final : public ATimeSeries
class TimeSeriesHydroMaxGen final : public ATimeSeries
{
public:
using AncestorType = Renderer::Matrix<double, Yuni::sint32>;
using AncestorType = Renderer::Matrix<double, int32_t>;

TimeSeriesHydroMaxGen(wxWindow* control, Toolbox::InputSelector::Area* notifier) :
ATimeSeries(control, notifier)
Expand Down Expand Up @@ -367,7 +367,7 @@ class TimeSeriesHydroMaxGen final : public ATimeSeries
class TimeSeriesHydroMaxPump final : public ATimeSeries
{
public:
using AncestorType = Renderer::Matrix<double, Yuni::sint32>;
using AncestorType = Renderer::Matrix<double, int32_t>;

TimeSeriesHydroMaxPump(wxWindow* control, Toolbox::InputSelector::Area* notifier) :
ATimeSeries(control, notifier)
Expand Down

0 comments on commit 00b8592

Please sign in to comment.