46 double OutputLow = fControllerLow->
Output(Time);
47 double OutputHigh = fControllerHigh->
Output(Time);
50 fTarget = fControllerTarget->
Output(Time);
52 if(fInput < fTarget) {
63 FILE *fich = fopen(FileWAM,
"r");
64 fsetpos(fich, &filepos);
66 fscanf(fich,
"%lf ", &fTarget);
67 fscanf(fich,
"%d ", &fControllerLowID);
68 fscanf(fich,
"%d ", &fControllerHighID);
71 fscanf(fich,
"%d ", &ctrl);
73 fTargedControlled =
false;
75 fTargedControlled =
true;
76 fControllerTargetID = ctrl;
83 fgetpos(fich, &filepos);
90 fControllerLow = Controller[fControllerLowID - 1];
91 fControllerHigh = Controller[fControllerHighID - 1];
93 fControllerTarget = Controller[fControllerTargetID - 1];
97 int nvars = 0, var = 0;
99 FILE *fich = fopen(FileWAM,
"r");
100 fsetpos(fich, &filepos);
102 fscanf(fich,
"%d ", &nvars);
103 for(
int i = 0; i < nvars; i++) {
104 fscanf(fich,
"%d ", &var);
110 std::cout <<
"Resultados medios en Controlador " << fID <<
" no implementados " << std::endl;
114 fgetpos(fich, &filepos);
119 int nvars = 0, var = 0;
121 FILE *fich = fopen(FileWAM,
"r");
122 fsetpos(fich, &filepos);
124 fscanf(fich,
"%d ", &nvars);
125 for(
int i = 0; i < nvars; i++) {
126 fscanf(fich,
"%d ", &var);
132 std::cout <<
"Resultados instantaneos en Controlador " << fID <<
" no implementados " << std::endl;
136 fgetpos(fich, &filepos);
145 medoutput << Label.c_str();
155 insoutput << Label.c_str();
203 #pragma package(smart_init)
void ResultadosMediosController()
void AcumulaResultadosMediosController(double Actual)
void ResultadosInstantController()
std::vector< TSensor * > FSensor
Array with the pointers of the sensor inputs.
double Output(double Time)
void LeeResultadosInsControlador(const char *FileWAM, fpos_t &filepos)
void LeeController(const char *FileWAM, fpos_t &filepos)
void ImprimeResultadosInsControlador(stringstream &insoutput)
void CabeceraResultadosInsControlador(stringstream &insoutput)
std::string PutLabel(int idx)
Returns an integer.
iVector FSensorID
Array with the ID of the sensor inputs.
stResMediosCtrl FResMediosCtrl
Struct with the average results of the controllers.
stResInstantCtrl FResInstantCtrl
Struct with the average results of the controllers.
void ImprimeResultadosMedControlador(stringstream &medoutput)
void AsignaObjetos(TSensor **Sensor, TController **Controller)
virtual double Output(double Time)=0
void LeeResultadosMedControlador(const char *FileWAM, fpos_t &filepos)
void CabeceraResultadosMedControlador(stringstream &medoutput)