Page 1 of 1

Manager() Logs Suppression

Posted: Wed Jan 22, 2020 4:11 am
by vinaym815
Hello everyone.

Is there a way to suppress the message "Integration failed due to the following reason: EventHandlerRequestedTermination" from appearing into the terminal. It is a custom event created by me.

Thank you.

Re: Manager() Logs Suppression

Posted: Wed Jan 22, 2020 10:46 am
by aymanh
Hello,

If this message comes from an exception being thrown then I don't think you'd want to suppress it! I'm not aware of a mechanism to suppress messages in simbody at the moment, we're working on one for OpenSim but it would not help here since this comes from the lower level simbody library.

Hope this helps,
-Ayman

Re: Manager() Logs Suppression

Posted: Wed Jan 22, 2020 1:38 pm
by chrisdembia
I'm surprised that an EventHandler requesting to stop integration would be considered a failure. Are you sure you are using the EventHandler correctly?

Re: Manager() Logs Suppression

Posted: Wed Jan 22, 2020 7:54 pm
by vinaym815
Dear Ayman Habib and Christopher Dembia, thank you for the clarification
chrisdembia wrote:
Wed Jan 22, 2020 1:38 pm
I'm surprised that an EventHandler requesting to stop integration would be considered a failure. Are you sure you are using the EventHandler correctly?
I wanted to stop the simulation once a coordinate goes outside its range. Inspired by the Sky Higher Jump examplehttps://simtk-confluence.stanford.edu:8 ... ource+Code, I wrote the following code https://github.com/vinaym815/OpenSimExa ... ure.cpp#L8. How would you suggest I modify it to avoid the error message?

Kind regards
Vinay

Re: Manager() Logs Suppression

Posted: Wed Jan 22, 2020 10:02 pm
by chrisdembia
Ah sorry I think that is the correct way to terminate.

Re: Manager() Logs Suppression

Posted: Thu Jan 23, 2020 3:22 am
by tkuchida
Would redirecting cout to stringstream work, as is done here: https://github.com/opensim-org/opensim- ... el.cpp#L58?