@@ -908,30 +908,31 @@ int initialization(DATA *data, const char* pInitMethod, const char* pOptiMethod,
908908 initSample (data , data -> simulationInfo .startTime , data -> simulationInfo .stopTime );
909909 initDelay (data , data -> simulationInfo .startTime );
910910
911+ /* initialize all relations that are ZeroCrossings */
912+ storePreValues (data );
913+ overwriteOldSimulationData (data );
914+
911915
912916 if (initMethod == IIM_SYMBOLIC )
913917 retVal = symbolic_initialization (data );
914- else
915- {
916- /* initialize all relations that are ZeroCrossings */
917- storePreValues (data );
918- overwriteOldSimulationData (data );
919- updateDiscreteSystem (data );
920-
921- /* and restore start values and helpvars */
922- restoreExtrapolationDataOld (data );
923- syncPreForHelpVars (data ); /* resetAllHelpVars(data); */
924- storeRelations (data );
925- storePreValues (data );
926-
927- /* select the right initialization-method */
928- if (initMethod == IIM_NONE )
929- retVal = 0 ;
930- else if (initMethod == IIM_NUMERIC )
931- retVal = numeric_initialization (data , optiMethod );
932- else
933- THROW ("unsupported option -iim" );
918+ updateDiscreteSystem (data );
919+
920+ /* and restore start values and helpvars */
921+ restoreExtrapolationDataOld (data );
922+ syncPreForHelpVars (data ); /* resetAllHelpVars(data); */
923+ storeRelations (data );
924+ storePreValues (data );
925+
926+ /* select the right initialization-method */
927+ if (initMethod == IIM_NONE )
928+ retVal = 0 ;
929+ else if (initMethod == IIM_NUMERIC )
930+ retVal = numeric_initialization (data , optiMethod );
931+ else if (initMethod == IIM_SYMBOLIC ) {
932+ retVal = symbolic_initialization (data );
934933 }
934+ else
935+ THROW ("unsupported option -iim" );
935936 INFO (LOG_SOTI , "### SOLUTION OF THE INITIALIZATION ###" );
936937 INDENT (LOG_SOTI );
937938 printAllVars (data , 0 , LOG_SOTI );
0 commit comments