error when exporting simulink model as variable step FMU

I am trying to export a simulink model containing Simscape multibody networks with variable step solver.
Here is the run info:
"Setting System Target to FMU 'Co-Simulation' for model 'ScaleBike_NoPend_V3'.
Setting Hardware Implementation > Device Type to 'MATLAB Host' for model 'ScaleBike_NoPend_V3'.
Model 'ScaleBike_NoPend_V3' is deployment diagram. variable step FMU export is not supported for this model architecture."
I used MATLAB R2024b, but the same error occured when exporting with R2024a.
The model looks like:
The Solver is Ode45(variable step) with tolerance of 1e-3.
The Code generation configuration: the target file is fmu2cs.tlc and tool chain used to compile is MinGW64|Cmake/Ninja(64-bit Windows). Fixed-step fmu export could be done successfully with this configuration.

1 件のコメント

Yukthi S
Yukthi S 2024 年 12 月 10 日
Hi, Can you share the Simulink model you are working with and reproduction steps to reproduce the error?

サインインしてコメントする。

回答 (1 件)

一凡
一凡 2024 年 12 月 10 日
編集済み: 一凡 2024 年 12 月 11 日

0 投票

Here is the simulink model and initialization code.
Run the init_car_params.m first and export the model next, then the error will occur.

1 件のコメント

Yukthi S
Yukthi S 2024 年 12 月 10 日
I followed the reproduction steps and I got the error given below. Can you have a look into it and share all the relevant files?
Error:['ScaleBike_NoPend_V3']: The following errors were found in the model ScaleBike_NoPend_V3.
Caused by:
['ScaleBike_NoPend_V3/bike/body_link/Visual1']: The parameter Geometry/File Name is a file that does not exist. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/frontfork_link/Visual1']: The parameter Geometry/File Name is a file that does not exist. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/frontfork_link/Visual1']: Inertia cannot be computed from geometry. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/frontsuspension_link/Visual1']: The parameter Geometry/File Name is a file that does not exist. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/frontsuspension_link/Visual1']: Inertia cannot be computed from geometry. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/rearsuspension_link/Visual']: The parameter Geometry/File Name is a file that does not exist. Resolve this issue in order to simulate the model.
['ScaleBike_NoPend_V3/bike/rearsuspension_link/Visual']: Inertia cannot be computed from geometry. Resolve this issue in order to simulate the model.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreate Standalone FMU についてさらに検索

製品

リリース

R2024b

質問済み:

2024 年 12 月 10 日

編集済み:

2024 年 12 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by