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

Illustration
Shashank Mehta - 2023-07-24T14:48:53+00:00
Question: How can I set a initial value for input parameters in FMU?

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.

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

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"

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!