Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 4b2df5a

Browse files
ptaeuberOpenModelica-Hudson
authored andcommitted
Set variables back to start values before trying homotopy
Belonging to [master]: - #2166
1 parent 162cdb5 commit 4b2df5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SimulationRuntime/c/simulation/solver/initialization/initialization.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,13 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
239239
#endif
240240
if (adaptiveGlobal)
241241
data->callback->useHomotopy = 2;
242-
if(solveWithGlobalHomotopy)
242+
if(solveWithGlobalHomotopy) {
243243
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initialization problem without homotopy method. If homotopy is available the homotopy method is used now.");
244+
setAllParamsToStart(data);
245+
setAllVarsToStart(data);
246+
data->callback->updateBoundParameters(data, threadData);
247+
data->callback->updateBoundVariableAttributes(data, threadData);
248+
}
244249
}
245250

246251
/* If there is homotopy in the model and the equidistant global homotopy approach is activated

0 commit comments

Comments
 (0)