@@ -883,6 +883,7 @@ int solve_nonlinear_system(DATA *data, threadData_t *threadData, int sysNumber)
883
883
884
884
infoStreamPrint (LOG_INIT , 0 , "[system %d] homotopy parameter lambda = %g" , sysNumber , data -> simulationInfo -> lambda );
885
885
nonlinsys -> solved = solveNLS (data , threadData , sysNumber );
886
+ if (!nonlinsys -> solved ) break ;
886
887
887
888
#if !defined(OMC_NO_FILESYSTEM )
888
889
if (ACTIVE_STREAM (LOG_INIT ))
@@ -992,10 +993,10 @@ int check_nonlinear_solution(DATA *data, int printFailingSystems, int sysNumber)
992
993
{
993
994
int index = nonlinsys [i ].equationIndex , indexes [2 ] = {1 ,index };
994
995
if (!printFailingSystems ) return 1 ;
995
- warningStreamPrintWithEquationIndexes (LOG_NLS , 1 , indexes , "nonlinear system %d fails: at t=%g" , index , data -> localData [0 ]-> timeValue );
996
+ warningStreamPrintWithEquationIndexes (LOG_NLS , 0 , indexes , "nonlinear system %d fails: at t=%g" , index , data -> localData [0 ]-> timeValue );
996
997
if (data -> simulationInfo -> initial )
997
998
{
998
- warningStreamPrint (LOG_NLS_V , 0 , "proper start-values for some of the following iteration variables might help" );
999
+ warningStreamPrint (LOG_INIT , 1 , "proper start-values for some of the following iteration variables might help" );
999
1000
}
1000
1001
for (j = 0 ; j < modelInfoGetEquation (& data -> modelData -> modelDataXml , (nonlinsys [i ]).equationIndex ).numVar ; ++ j ) {
1001
1002
int done = 0 ;
@@ -1006,18 +1007,18 @@ int check_nonlinear_solution(DATA *data, int printFailingSystems, int sysNumber)
1006
1007
if (!strcmp (mData -> realVarsData [k ].info .name , modelInfoGetEquation (& data -> modelData -> modelDataXml , (nonlinsys [i ]).equationIndex ).vars [j ]))
1007
1008
{
1008
1009
done = 1 ;
1009
- warningStreamPrint (LOG_NLS_V , 0 , "[%ld] Real %s(start=%g, nominal=%g)" , j + 1 ,
1010
+ warningStreamPrint (LOG_INIT , 0 , "[%ld] Real %s(start=%g, nominal=%g)" , j + 1 ,
1010
1011
mData -> realVarsData [k ].info .name ,
1011
1012
mData -> realVarsData [k ].attribute .start ,
1012
1013
mData -> realVarsData [k ].attribute .nominal );
1013
1014
}
1014
1015
}
1015
1016
if (!done )
1016
1017
{
1017
- warningStreamPrint (LOG_NLS_V , 0 , "[%ld] Real %s(start=?, nominal=?)" , j + 1 , modelInfoGetEquation (& data -> modelData -> modelDataXml , (nonlinsys [i ]).equationIndex ).vars [j ]);
1018
+ warningStreamPrint (LOG_INIT , 0 , "[%ld] Real %s(start=?, nominal=?)" , j + 1 , modelInfoGetEquation (& data -> modelData -> modelDataXml , (nonlinsys [i ]).equationIndex ).vars [j ]);
1018
1019
}
1019
1020
}
1020
- messageCloseWarning (LOG_NLS );
1021
+ messageCloseWarning (LOG_INIT );
1021
1022
return 1 ;
1022
1023
}
1023
1024
if (nonlinsys [i ].solved == 2 )
0 commit comments