What() is:Model::getStateVariableSystemIndex : state variable not found.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Nicos Haralabidis
Posts: 188
Joined: Tue Aug 16, 2016 1:46 am

What() is:Model::getStateVariableSystemIndex : state variable not found.

Post by Nicos Haralabidis » Mon Oct 01, 2018 3:17 am

Dear users,

I have a Mex function in which I am currently passing in my states, controls and foot-ground contact model parameters. The function is intended to do the following:

1. Load model
2. Update contact-model parameters from user input
3. Initialise state
4. Set the time instant
5. Set the state variables from user input
6. Set the control variables from user input
7. Determine and extract state derivatives, applied joint torques and predicted GRFs

The function behaves as expected up until stage 5 (line 147 in the attached file), at which point I receive the following error message:
Unexpected Standard exception from MEX file.
What() is:Model::getStateVariableSystemIndex : state variable not found.


I have attached the code I am working with.

I am not sure why I receive this message but it suggests to me that it is not recognising the initialised state (line 135), and thus unable to identify the state I am indexing? I was previously initialising the system in the preamble immediately after defining the model - however I now need to update the contact model parameters prior to initialising the system within the body of the Mex function.

Any help/suggestions on overcoming this issue would be greatly appreciated!

Kind regards,

Nicos Haralabidis
Attachments
calc.cpp
(9.43 KiB) Downloaded 11 times

Tags:

POST REPLY