Simulating Models Using EKL Scripting and Retrieving the Results

You can use EKL (Engineering Knowledge Language) to simulate a model, and then retrieve the results for further use in scripting.

In this scenario, you use the EKL scripting to simulate a model in the first part of the scenario, and in the second part you retrieve results for further use in scripting.

This task shows you how to:


Before you begin: Do the following to create a library with a model to simulate:
  1. Create a library with the name MyTestLib. See Create a Modelica Library.
  2. In that library, create a model MyModelTest. See Create a New Class or Extend from an Existing Class Using the New Class Command.
  3. Open the model and use the Modelica Editor to insert the following Modelica text:
    Real x(start=7);
    equation
    der(x)=-x;
    See Displaying and Editing Modelica Text for working with the Modelica Editor.
  4. Set up the virtual execution, for example, what algorithm, start time, and stop time to use in the simulation. See Setting up a Simulation.
    Note: You can override the start time and stop time in the script.
See Also
About Knowledge Handling Features in Dymola Behavior Modeling