Suppress output from Forward Tool?
Posted: Wed Sep 18, 2013 11:54 am
Hi All,
I am working on an optimization study making use of the Matlab interface to the API. When my script loads the model and initializes it, there is some information written to the screen (truncated for brevity):
--------------------------------------------------
Loaded model Arm26_Optimize.osim
Finished addToSystem for Bodies.
Calling addToSystem for Joint ...
-
-
-
--------------------------------------------------
Computing the value of my objective function requires running a forward simulation, which I am doing using the Forward Tool. When the Forward Tool runs, some additional information is written to the screen (again, truncated):
--------------------------------------------------
MODEL: arm26_optimize
ANALYSES (0)
BODIES (3)
body[0] = ground (mass: 0) (inertia: 0 0 0 0 0 0 0 0 0)
-
-
-
--------------------------------------------------
While it is all useful information, is there any way to suppress this output? I am especially interested in suppressing the output from the Forward Tool, as that runs hundreds of times during a single optimization, filling the screen with the same thing over-and-over.
In trying to solve this issue I found out how to control the writing of the simulation results files (tool.setPrintResultFiles(true/false)), but not the information that goes to the screen. In the Doxygen I found setVerboseLevel under Tool, but I could not get that to work with the Forward Tool (seems it may not be intended to, based on methodsview(ForwardTool)).
So, my primary questions are whether I can suppress the output from the Forward Tool in Matlab, and if not, what alternative are there for running forward simulations from within Matlab?
Thanks in advance for any suggestions!
Brian
I am working on an optimization study making use of the Matlab interface to the API. When my script loads the model and initializes it, there is some information written to the screen (truncated for brevity):
--------------------------------------------------
Loaded model Arm26_Optimize.osim
Finished addToSystem for Bodies.
Calling addToSystem for Joint ...
-
-
-
--------------------------------------------------
Computing the value of my objective function requires running a forward simulation, which I am doing using the Forward Tool. When the Forward Tool runs, some additional information is written to the screen (again, truncated):
--------------------------------------------------
MODEL: arm26_optimize
ANALYSES (0)
BODIES (3)
body[0] = ground (mass: 0) (inertia: 0 0 0 0 0 0 0 0 0)
-
-
-
--------------------------------------------------
While it is all useful information, is there any way to suppress this output? I am especially interested in suppressing the output from the Forward Tool, as that runs hundreds of times during a single optimization, filling the screen with the same thing over-and-over.
In trying to solve this issue I found out how to control the writing of the simulation results files (tool.setPrintResultFiles(true/false)), but not the information that goes to the screen. In the Doxygen I found setVerboseLevel under Tool, but I could not get that to work with the Forward Tool (seems it may not be intended to, based on methodsview(ForwardTool)).
So, my primary questions are whether I can suppress the output from the Forward Tool in Matlab, and if not, what alternative are there for running forward simulations from within Matlab?
Thanks in advance for any suggestions!
Brian