{"id":21287680,"url":"https://github.com/ntnu-ihb/fmi4j","last_synced_at":"2025-07-15T21:48:26.582Z","repository":{"id":41565933,"uuid":"111925016","full_name":"NTNU-IHB/FMI4j","owner":"NTNU-IHB","description":"FMI4j is a software package for dealing with Functional Mockup Units (FMUs) on the JVM","archived":false,"fork":false,"pushed_at":"2023-01-04T15:56:55.000Z","size":62042,"stargazers_count":36,"open_issues_count":5,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-11T14:27:17.415Z","etag":null,"topics":["co-simulation","fmi","fmi-standard","fmu","java","kotlin","model-exchange"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NTNU-IHB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-24T14:07:34.000Z","updated_at":"2025-03-30T17:06:23.000Z","dependencies_parsed_at":"2023-02-02T18:01:30.708Z","dependency_job_id":null,"html_url":"https://github.com/NTNU-IHB/FMI4j","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/NTNU-IHB/FMI4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTNU-IHB%2FFMI4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTNU-IHB%2FFMI4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTNU-IHB%2FFMI4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTNU-IHB%2FFMI4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NTNU-IHB","download_url":"https://codeload.github.com/NTNU-IHB/FMI4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTNU-IHB%2FFMI4j/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265462544,"owners_count":23770047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["co-simulation","fmi","fmi-standard","fmu","java","kotlin","model-exchange"],"created_at":"2024-11-21T12:14:50.528Z","updated_at":"2025-07-15T21:48:26.561Z","avatar_url":"https://github.com/NTNU-IHB.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FMI4j\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/NTNU-IHB/FMI4j/issues)\n\n[![CI](https://github.com/NTNU-IHB/FMI4j/workflows/Build/badge.svg)](https://github.com/NTNU-IHB/FMI4j/actions)\n[![Gitter](https://badges.gitter.im/NTNU-IHB/FMI4j.svg)](https://gitter.im/NTNU-IHB/FMI4j?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n\nFMI4j is a software package for dealing with Functional Mock-up Units (FMUs) on the Java Virtual Machine (JVM), written in [Kotlin](https://kotlinlang.org/). \n\nFMI4j supports import of both [FMI](http://fmi-standard.org/) 1.0 and 2.0 for **Co-simulation**. For  **Model Exchange** version 2.0 is supported. \u003cbr/\u003e\n\nCompared to other FMI libraries targeting the JVM, FMI4j is **considerably faster** due to the fact that we use JNI instead of JNA. \nConsidering FMI-import, a significant speedup (2-5x) compared to other open-source FMI implementations for the JVM should be expected. \n\nMaven artifacts are available through [Central](https://search.maven.org/search?q=g:info.laht.fmi4j)\n\n***\n\n### \u003ca name=\"api\"\u003e\u003c/a\u003e FMI import\n\n```java\n\nclass Demo {\n    \n    void main(String[] args) {\n        \n        Fmu fmu = Fmu.from(new File(\"path/to/fmu.fmu\")); //URLs are also supported\n        FmuSlave slave = fmu.asCoSimulationFmu().newInstance();\n\n        slave.simpleSetup();\n        \n        double t = 0;\n        double stop = 10;\n        double stepSize = 1.0/100;\n        while(t \u003c= stop) {\n            if (!slave.doStep(t, stepSize)) {\n                break;\n            }\n            t += stepSize;\n        }\n        slave.terminate(); //or close, try with resources is also supported\n        fmu.close();\n        \n    }\n    \n}\n```\n\nWould you rather build FMUs using a JVM language? Check out [FMU4j](https://github.com/markaren/FMU4j)! \u003cbr\u003e\nOr maybe build FMUs using Python? Check out [PythonFMU](https://github.com/NTNU-IHB/PythonFMU)! \u003cbr\u003e\nOr would you rather simulate FMUs using C++? Check out [FMI4cpp](https://github.com/NTNU-IHB/FMI4cpp)! \u003cbr\u003e\nNeed to distribute your FMUs? [FMU-proxy](https://github.com/NTNU-IHB/FMU-proxy) to the rescue! \u003cbr\u003e\nNeed a complete co-simulation framework with SSP support? Check out [Vico](https://github.com/NTNU-IHB/Vico) \u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntnu-ihb%2Ffmi4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntnu-ihb%2Ffmi4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntnu-ihb%2Ffmi4j/lists"}