Page 1 of 1

Discrete State Variables

Posted: Mon Dec 16, 2019 2:47 pm
by simreal
Hello,

When I search the api opensim 3.3, I found the introduction to ModelComponent interesting, especially these statements:

The throttle controls the motor torque output and therefore the behavior of the model. The input by the user to the throttle the motor (the controls) is necessary to specify the model dynamics at any instant and therefore are considered part of the State in Simbody as Discrete State Variables. In OpenSim they are simplify referred to as DiscreteVariables. The ModelComponent provides services to enable developers of components to define and access its DiscreteVariables.

As I am looking forward methods for extending the system states by introducing the throttle controls into system. But I have been blocked by defining the DiscreteVariables. Any suggestions for this problem?

Besides, I also wonder whether the function Model::computeStateVariableDerivatives() will adopt the extended states or not.

Your advice are much appreciated.

Thanks!

-Charles