How to get the variable names in a sub system?

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

How to get the variable names in a sub system?

Post by Jiang Ping » Sat Sep 03, 2016 11:32 pm

hi,

I found the size of vector z in GeneralForceSubsystem was 3. I want to know
what are the three elements in the z vector. Is there any method to get the
variable names in vector z?

</Subsystem>
<Subsystem index=3 name=GeneralForceSubsystem version=0.0.1>
<DISCRETE VARS TODO>
<Vector name=q size=0>
<Vector name=u size=0>
<Vector name=z size=3>
<Vector name=uWeights size=0>
<Vector name=zWeights size=3>
</Subsystem>

thanks in advance,
Jiang

User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

Re: How to get the variable names in a sub system?

Post by Jiang Ping » Sun Sep 04, 2016 12:04 am

UPdate

I solved problem by using "getDiscreteVariable(state, DiscreteVariableIndex(0)).getTypeName()".

best regards,
Jiang

POST REPLY