Skip to content

Commit

Permalink
Add a helpful note about initial guesses
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbianco committed Feb 5, 2025
1 parent 1930f6c commit 192635c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OpenSim/Examples/Moco/example3DWalking/example3DWalking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ void trackWalking(Model model) {
solver.resetProblem(problem);
// When MocoTrack::initialize() is called, the solver is created with a
// default guess. Since we've updated the problem and changed the
// transcription scheme, it is a good idea to generate a new guess.
// transcription scheme, it is a good idea to generate a new guess. In this
// case, generating a new guess is crucial for the optimization to converge.
// Always check your initial guess before running an optimization!
solver.setGuess(solver.createGuess());

// Solve!
Expand Down

0 comments on commit 192635c

Please sign in to comment.