Skip to content

Commit

Permalink
- BUGFIX: initial guess for radau/lobatto solver
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15905 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Apr 24, 2013
1 parent ee966ce commit aadfa51
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions SimulationRuntime/c/simulation/solver/radau.c
Expand Up @@ -393,15 +393,11 @@ static int initKinsol(KINODE *kinOde)
{
for(i=0;i<nStates;i++,k++)
{
if(nlp->a != NULL)
xeq[k] = nlp->x0[i] + nlp->a[j]*nlp->f0[i]*h;
else
xeq[k] = nlp->x0[i] + nlp->f0[i]*h;

xeq[k] = nlp->x0[i];
seq[k] = 1.0/(fabs(xeq[k]) + 1e-6);
xlow[k] = xeq[k] - nlp->min[i];
xup[k] = xeq[k] - nlp->max[i];
tmp = 1.0/(fabs(nlp->x0[i] - xeq[k]) + 1e-6);
seq[k] = tmp;

}
}

Expand Down

0 comments on commit aadfa51

Please sign in to comment.