Coder Social home page Coder Social logo

fdzhang / fmi4j Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ntnu-ihb/fmi4j

0.0 0.0 0.0 60.61 MB

FMI4j is a software package for dealing with Functional Mockup Units (FMUs) on the JVM

License: MIT License

C++ 10.60% C 3.75% Java 46.79% Kotlin 38.85%

fmi4j's Introduction

FMI4j

License: MIT contributions welcome

CI Gitter

FMI4j is a software package for dealing with Functional Mock-up Units (FMUs) on the Java Virtual Machine (JVM), written in Kotlin.

FMI4j supports import of both FMI 1.0 and 2.0 for Co-simulation. For Model Exchange version 2.0 is supported.

Compared to other FMI libraries targeting the JVM, FMI4j is considerably faster due to the fact that we use JNI instead of JNA. Considering FMI-import, a significant speedup (2-5x) compared to other open-source FMI implementations for the JVM should be expected.

Maven artifacts are available through Central


FMI import

class Demo {
    
    void main(String[] args) {
        
        Fmu fmu = Fmu.from(new File("path/to/fmu.fmu")); //URLs are also supported
        FmuSlave slave = fmu.asCoSimulationFmu().newInstance();

        slave.simpleSetup();
        
        double t = 0;
        double stop = 10;
        double stepSize = 1.0/100;
        while(t <= stop) {
            if (!slave.doStep(t, stepSize)) {
                break;
            }
            t += stepSize;
        }
        slave.terminate(); //or close, try with resources is also supported
        fmu.close();
        
    }
    
}

Would you rather build FMUs using a JVM language? Check out FMU4j!
Or maybe build FMUs using Python? Check out PythonFMU!
Or would you rather simulate FMUs using C++? Check out FMI4cpp!
Need to distribute your FMUs? FMU-proxy to the rescue!
Need a complete co-simulation framework with SSP support? Check out Vico

fmi4j's People

Contributors

markaren avatar gitter-badger avatar eidekrist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.