Skip to content

Commit

Permalink
keep extrapolate inputs inside bounds
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22343 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Sep 17, 2014
1 parent 37e4753 commit 655b3c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SimulationRuntime/c/optimization/DataManagement/MoveData.c
Expand Up @@ -500,6 +500,7 @@ void res2file(OptData *optData, SOLVER_INFO* solverInfo, double *vopt){
for(k = 0, tmpv = 0.0; k < np; ++k){
tmpv += a[k]*vopt[k*nv + j];
}
tmpv = fmin(fmax(tmpv,optData->bounds.vmin[j]),optData->bounds.vmax[j]);
data->simulationInfo.inputVars[i] = (double)tmpv*vnom[j];
fprintf(pFile, "%lf ", (float)data->simulationInfo.inputVars[i]);
}
Expand Down

0 comments on commit 655b3c7

Please sign in to comment.