JFMI - A Java Wrapper for the Functional Mock-up InterfaceSee jfmi1.0.2 for downloads.
The Functional Mock-up Interface (FMI) is an emerging standard with the objective to make it easy to share modeling components between various simulation tools and environments.
A Functional Mock-up Unit (FMU) is a file that contains functionality that may be invoked either via co-simulation or model exchange. Typically, a FMU file has a .fmu extension. A FMU file is a zip file that contains a file named modelDescription.xml and one or more platform-dependent shared libraries.
JFMI is a Java wrapper for FMI.
See org/ptolemy/fmi/driver/FMUCoSimulation.java and org/ptolemy/fmi/driver/FMUModelExchange.java for simple examples that read in .fmu files and invoke methods in the the platform-dependent shared libraries.
Sample .fmu files may be found in fmu/cs and fmu/me. for the following architectures: darwin64, linux32, linux64, win32 and win64. These files were generated using a port of the FMUSDK which may be found at http://github.com/cxbrooks/fmusdk.
FMI documentation may be found at http://www.modelisar.com/fmi.html
To build, download and install Apache ant from https://ant.apache.org/ cd to org/ptolemy/fmi and run ant:
cd org/ptolemy/fmi ant
To run an example under Mac OS or Linux, try:
cd org/ptolemy/fmi java -classpath ../../../lib/jna.jar:../.. \ org.ptolemy.fmi.driver.FMUCoSimulation \ fmu/cs/bouncingBall.fmu 1.0 0.1 true c results.csv
Then look at the contents of the results.csv file.
JFMI was developed under a Department of Energy Contract for the Building Controls Virtual Test Bed (BCVTB).
Additional support was provided by Ptolemy II, which is supported
by the following organizations:
This work was supported in part by the Center for Hybrid and Embedded Software Systems (CHESS) at UC Berkeley, which receives support from the National Science Foundation (NSF awards #0720882 (CSR-EHS: PRET), #0931843 (CPS: Large: ActionWebs), and #1035672 (CPS: Medium: Ptides)), the U. S. Army Research Laboratory (ARL #W911NF-11-2-0038), the Air Force Research Lab (AFRL), the Multiscale Systems Center (MuSyC), one of six research centers funded under the Focus Center Research Program, a Semiconductor Research Corporation program, the TerraSwarm Research Center, one of six centers supported by the STARnet phase of the Focus Center Research Program (FCRP) a Semiconductor Research Corporation program sponsored by MARCO and DARPA. and the following companies: Bosch, National Instruments, and Toyota.
- David Broman (UC Berkeley)
- Christopher Brooks (UC Berkeley)
- Edward A. Lee (UC Berkeley)
- Thierry Stephane Nouidui (Lawrence Berkeley National Laboratory)
- Stavros Tripakis (UC Berkeley)
- Michael Wetter (Lawrence Berkeley National Laboratory)
This package is delivered without support. However, the BCVTB mailing list at https://groups.google.com/group/bcvtb maybe be used for questions.
JFMI is released under the following license:
Copyright (c) 2012-2013 The Regents of the University of California. All rights reserved.
Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
JFMI includes the work of others:
- The Java Native Access (JNA) package, which is released under LGPL, see lib/jna-license.htm
- FMUSDK, which is released with a BSD license, see org/ptolemy/fmi/driver/fmusdk-license.htm
- JUnit, which is released with a Common Public License, see lib/junit-license.htm
- April 28, 2013:
This release fixes a bug involving reading strings and building shared libraries under Windows.
- March 10, 2013:
This release fixes a bug involving reading booleans and adds a facility that builds shared libraries at runtime.
- June 18, 2012: JFMI 1.0 released.