Skip to content

SimpleAdder.fmu example lacks Windows binaries and clear usage instructions #3788

Open
@maysam-gholampour

Description

@maysam-gholampour

In the example demonstrating how to import SimpleAdder.fmu, the FMU file only includes Linux binaries and lacks support for Windows platforms. This makes it incompatible for users working on Windows systems.

Image

I can provide a version that includes Windows binaries generated using OpenModelica, but I believe it would be safer and more consistent if the maintainers regenerated the FMU on their end.


💡 Suggestions

  1. Add a Warning Block
    Include a note in the documentation/example clarifying that users may need to generate their own FMU if they are on a different platform. You could also share the SimpleAdder.mo source file (which is already available) and point users to tools like OpenModelica for FMU export.

  2. Clarify FMU Path Requirements
    The current example assumes the FMU is in the test/fmi/fmus/ directory. However, many users may copy the example elsewhere. Please include a note block stating that users should:

    • Ensure a copy of SimpleAdder.fmu is placed in the working directory.

    • Modify the loadFMU path accordingly:

      fmu = loadFMU(joinpath(@__DIR__, "SimpleAdder.fmu"); type = :ME)
  3. Optional: Use ModelingToolkit Package Path
    If you prefer referencing the internal FMU in tests, this approach works:

    pkg_path = Base.identify_package("ModelingToolkit") |> Base.locate_package |> dirname |> dirname
    fmu = loadFMU(joinpath(pkg_path, "test", "fmi", "fmus", "SimpleAdder.fmu"); type = :ME)

    However, this is more suitable for internal testing and may be confusing for new users. Explicitly copying the FMU and setting the path is likely more user-friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions