Skip to content

Commit

Permalink
fixed pre simulation for optimization
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19503 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Mar 8, 2014
1 parent b68af41 commit 0d0aa16
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -219,13 +219,11 @@ static int pre_ipopt_sim(IPOPT_DATA_ *iData,SOLVER_INFO* solverInfo)
}

smallIntSolverStep(iData, solverInfo, t);
data->simulationInfo.terminal = 1;
sim_result.emit(&sim_result,data);
data->simulationInfo.terminal = 0;
rotateRingBuffer(iData->data->simulationData, 1, (void**) iData->data->localData);
++k;
}
iData->t0 = iData->data->localData[0]->timeValue;

/*ToDo*/
for(i=0; i< iData->nx; ++i)
{
Expand All @@ -236,8 +234,8 @@ static int pre_ipopt_sim(IPOPT_DATA_ *iData,SOLVER_INFO* solverInfo)
iData->Vmin[i] = iData->Vmax[i] = data->simulationInfo.inputVars[j]*iData->scalVar[i];
iData->v[i] = iData->Vmin[i];
}

optimizer_time_setings_update(iData);

return 0;
}

Expand Down

0 comments on commit 0d0aa16

Please sign in to comment.