Model arguments can not be used in non-tunable expressions

63 ビュー (過去 30 日間)
Chris van der Ploeg
Chris van der Ploeg 2019 年 8 月 1 日
編集済み: Hritika Suneja 2020 年 4 月 7 日
Hi,
When compiling a model of us, it gives the following error:
Invalid setting in 'Parameter_estimations' for parameter 'InitialCondition'. Caused by: Model arguments can not be used in non-tunable expressions. The expression '[0 Parstruct.P]' in parameter 'InitialCondition' of 'Parameter_estimations' can not be tuned but it refers to variables (Parstruct (model argument)). For more information about non-tunable expressions, see the documentation. The generated code will inline the numeric value of the expression '[0 Parstruct.P]' (used in parameter 'InitialCondition' of 'Parameter_estimations') because the expression has one or more unsupported operators (see the documentation). The code for this block will not use the tunable variables (Parstruct (model argument)).
We use a set of referenced models which inherit their parameter structure (in this case Parstruct) by using a mask as model workspace and assigning the structure in the mask of the referenced model. Whenever we want to build code for, i.e., ROS or DSPACE, the above error occurs. How can we solve this?

回答 (1 件)

Hritika Suneja
Hritika Suneja 2020 年 4 月 7 日
編集済み: Hritika Suneja 2020 年 4 月 7 日
Model arguments in a referenced model are specifically designed to allow instances of referenced model to be tuned. It appears that your model uses some of these arguments in non-tunable situations and is the reason for that error. These non-tunable parameters have to be defined as global non-tunable parameters to be used in the referenced model. The following might help you to get a better idea.

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by