Skip to content

Commit

Permalink
[FIX] Solved unfeasible
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Sep 15, 2023
1 parent 634d415 commit 170f915
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/solver/hydro/daily/h2o_j_fonctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef __SOLVER_H2O_J_FONCTIONS__
#define __SOLVER_H2O_J_FONCTIONS__

DONNEES_MENSUELLES H2O_J_Instanciation(void);
DONNEES_MENSUELLES* H2O_J_Instanciation(void);

void H2O_J_OptimiserUnMois(DONNEES_MENSUELLES*);
void H2O_J_Free(DONNEES_MENSUELLES*);
Expand Down
14 changes: 7 additions & 7 deletions src/solver/hydro/daily/h2o_j_instanciation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#include "h2o_j_donnees_mensuelles.h"
#include "h2o_j_fonctions.h"

DONNEES_MENSUELLES H2O_J_Instanciation(void)
DONNEES_MENSUELLES* H2O_J_Instanciation(void)
{
DONNEES_MENSUELLES DonneesMensuelles;
DONNEES_MENSUELLES* DonneesMensuelles = new DONNEES_MENSUELLES;;

PROBLEME_HYDRAULIQUE& ProblemeHydraulique = DonneesMensuelles.ProblemeHydraulique;
PROBLEME_HYDRAULIQUE& ProblemeHydraulique = DonneesMensuelles->ProblemeHydraulique;

ProblemeHydraulique.NombreDeProblemes = 4;

Expand All @@ -44,10 +44,10 @@ DONNEES_MENSUELLES H2O_J_Instanciation(void)
NbJoursDUnProbleme[2] = 30;
NbJoursDUnProbleme[3] = 31;

DonneesMensuelles.TurbineMax.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles.TurbineMin.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles.TurbineCible.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles.Turbine.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles->TurbineMax.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles->TurbineMin.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles->TurbineCible.assign(NbJoursDUnProbleme[3], 0.);
DonneesMensuelles->Turbine.assign(NbJoursDUnProbleme[3], 0.);

int NombreDeProblemes = ProblemeHydraulique.NombreDeProblemes;

Expand Down
2 changes: 1 addition & 1 deletion src/solver/hydro/management/daily.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St
uint firstDay = study.calendar.months[simulationMonth].daysYear.first;
uint endDay = firstDay + daysPerMonth;

DONNEES_MENSUELLES problem = H2O_J_Instanciation();
DONNEES_MENSUELLES& problem = *H2O_J_Instanciation();
H2O_J_AjouterBruitAuCout(problem);
problem.NombreDeJoursDuMois = (int)daysPerMonth;
problem.TurbineDuMois = data.MOG[realmonth];
Expand Down

0 comments on commit 170f915

Please sign in to comment.