Page 1 of 1

Verbosity level

Posted: Tue Nov 07, 2023 9:08 am
by deyvidpi
Hi there,

This matters very little, but I've seen several examples where verbosity is set to 2:

Code: Select all

solver.set_verbosity(2)
However, from the source code it seems like there are only level 0 and 1:

Code: Select all

/// How much information should be spewed to the console?
/// 0: tropter and the underlying solver are silent.
/// 1: tropter is verbose, and the underlying solver uses its default
/// verbosity.
void set_verbosity(int value);

Code: Select all

void Solver::set_verbosity(int verbosity) {
TROPTER_VALUECHECK(verbosity == 0 || verbosity == 1,
        "verbosity", verbosity, "0 or 1");
m_verbosity = verbosity;
m_problem->set_verbosity(verbosity);
}
Am I not looking in the right place? If not, could you tell me about it?

Thank you again!

Re: Verbosity level

Posted: Tue Nov 07, 2023 3:16 pm
by nbianco
Hi David,

That code snippet is from the MocoTropterSolver, which only has two verbosity levels. MocoCasADiSolver (the default solver) has three verbosity levels: 0, 1, and 2 (or higher).

Here's where we set the verbosity level when configuring a MocoCasADiSolver: https://github.com/opensim-org/opensim- ... r.cpp#L252.

-Nick

Re: Verbosity level

Posted: Tue Nov 07, 2023 3:44 pm
by deyvidpi
Thabks Nick, it makes sense!