フィルターのクリア

How can I set a initial value for input parameters in FMU?

27 ビュー (過去 30 日間)
Shashank Mehta
Shashank Mehta 2023 年 6 月 13 日
コメント済み: Julian 2024 年 4 月 8 日
I want to co-simulate the FMU in PowerFactory and want to assign initial value for the parameters, how can I do it while creating an FMU.

採用された回答

Satwik
Satwik 2023 年 6 月 14 日
When you create an FMU (Functional Mock-up Unit), you can define parameters with initial values in the FMU description file (modelDescription.xml). This file includes metadata about the FMU, such as the name of the model, the type of solver used, and the number and types of inputs and outputs.
Here's an example of how you can define a parameter with an initial value in the FMU xml description file:
<ScalarVariable
name="myParameter"
valueReference="1"
variability="parameter"
initial="1.0" />
  3 件のコメント
Julian
Julian 2024 年 4 月 8 日
You have to unzip the .fmu file to see the ModelDescription.xml.
Julian
Julian 2024 年 4 月 8 日
@Satwik is there a way to set the initial values of variables in <ModelVariable><start> attribute when exporting the FMU with FMI version 3.0? Changing the ModelDescription.xml after exporting it as Standalone FMU seems not to be the best practice to me.

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by