Skip to content

Commit 4bc2403

Browse files
authored
Merge branch 'v0.14.0' into doc-fixes
2 parents d215c0d + 4fd9d39 commit 4bc2403

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+811
-6807
lines changed

Project.toml

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
name = "FMI"
22
uuid = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
33
authors = ["TT <tobias.thummerer@informatik.uni-augsburg.de>", "LM <lars.mikelsons@informatik.uni-augsburg.de>", "JK <josef.kircher@student.uni-augsburg.de>"]
4-
version = "0.13.3"
4+
version = "0.14.0"
55

66
[deps]
7-
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
8-
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
97
FMIExport = "31b88311-cab6-44ed-ba9c-fe5a9abbd67a"
108
FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194"
119
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
12-
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
13-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
14-
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
1510

1611
[compat]
17-
DifferentialEquations = "7.7.0 - 7.13"
18-
Downloads = "1"
19-
FMIExport = "0.3.0"
20-
FMIImport = "0.16.0"
12+
FMIExport = "0.4.0"
13+
FMIImport = "1.0.0"
2114
LinearAlgebra = "1"
22-
ProgressMeter = "1.7.0 - 1.9"
23-
Requires = "1.3.0"
24-
ThreadPools = "2.1.1"
2515
julia = "1.6"

README.md

+51-30
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,42 @@
22
# FMI.jl
33

44
## What is FMI.jl?
5-
[*FMI.jl*](https://github.com/ThummeTo/FMI.jl) is a free-to-use software library for the Julia programming language which integrates the **F**unctional **M**ock-Up **I**nterface ([fmi-standard.org](https://fmi-standard.org/)): load or create, parameterize, differentiate, simulate and plot FMUs seamlessly inside the Julia programming language!
5+
[*FMI.jl*](https://github.com/ThummeTo/FMI.jl) is a free-to-use software library for the Julia programming language which integrates the **F**unctional **M**ock-Up **I**nterface ([fmi-standard.org](https://fmi-standard.org/)): load or create, parameterize, differentiate, linearize, simulate and plot FMUs seamlessly inside the Julia programming language!
66

7-
[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMI.jl/dev)
8-
[![Test (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLatest.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLatest.yml)
9-
[![Test (LTS)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLTS.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLTS.yml)
10-
[![FMI2 Cross Checks (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/CrossChecks.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/CrossChecks.yml)
11-
[![Examples (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml)
12-
[![Build Docs](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml)
13-
[![Run PkgEval](https://github.com/ThummeTo/FMI.jl/actions/workflows/Eval.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Eval.yml)
14-
[![Coverage](https://codecov.io/gh/ThummeTo/FMI.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ThummeTo/FMI.jl)
15-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
16-
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
7+
| | |
8+
|---|---|
9+
| Documentation | [![Build Docs](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml) [![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMI.jl/dev) |
10+
| Examples | [![Examples (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml) |
11+
| Tests | [![Test (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLatest.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLatest.yml) [![Test (LTS)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLTS.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/TestLTS.yml) [![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl) |
12+
| FMI cross checks| [![FMI2 Cross Checks](https://github.com/ThummeTo/FMI.jl/actions/workflows/CrossChecks.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/CrossChecks.yml) |
13+
| Package evaluation| [![Run PkgEval](https://github.com/ThummeTo/FMI.jl/actions/workflows/Eval.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Eval.yml) |
14+
| Code coverage | [![Coverage](https://codecov.io/gh/ThummeTo/FMI.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ThummeTo/FMI.jl) |
15+
| Collaboration | [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac) |
1716

17+
## Breaking Changes in FMI.jl (starting from v0.14.0 until release of v1.0.0)
18+
If you want to migrate your project from [*FMI.jl*](https://github.com/ThummeTo/FMI.jl) < v1.0.0 to >= v1.0.0, you will face some breaking changes - but they are worth it as you will see! We decided to do multiple smaller breaking changes starting with v0.14.0, instead of one big one. Some of them are already implemented (checked), some are still on the todo (unchecked) but will be implemented before releasing v1.0.0.
19+
20+
- [x] Many functions, that are not part of the FMI-standard, had the prefix `fmi2...` or `fmi3...`. This was corrected. Now, only functions that are defined by the standard itself, like e.g. `fmi2Instantiate` are allowed to keep the prefix. Other methods, like `fmi2ValueReferenceToString`, that where added to make this library more comfortable, are now cleaned to be more the Julia way: `valueReferenceToString`. If your code errors, the corresponding function might have lost it's prefix, so try this first.
21+
22+
- [x] Wrapper functions where removed, because that is not the Julia way. In most cases, this will not affect your code.
23+
24+
- [x] [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl) and [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) were divided into [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl), [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) and [*FMIBase.jl*](https://github.com/ThummeTo/FMIBase.jl). [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl) now holds the pure standard definition (C-types and -functions), while [*FMIBase.jl*](https://github.com/ThummeTo/FMIBase.jl) holds everything that is needed on top of that in [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) as well as in [*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl).
25+
26+
- [ ] Updated all library tests for a better code coverage.
27+
28+
- [ ] We tried to document every function, if you find undocumented user-level functions, please open an issue or PR.
29+
30+
- [ ] Allocations, type stability and code format where optimized and are monitored by CI now.
31+
32+
- [ ] Dependencies are reduced a little, to make the libraries more light-weight.
33+
34+
- [ ] RAM for allocated FMUs, their instances and states, is now auto-released. For maximum performance/safety you can use FMUs in blocks (like file reading/writing).
35+
36+
- [ ] New low-level interfaces are introduced, that fit the SciML-ecosystem. For example, a FMU can still be simulated with `simulate(fmu)`, but one can also decide to create a `prob = FMUProblem(fmu)` (like an `ODEProblem`) and use `solve(prob)` to obtain a solution. Keywords will be adapted to have a fully consistent interface with the remaining SciML-ecosystem.
37+
38+
- [ ] Optimization for new Julia LTS v1.10, removing code to keep downward compatibility with old LTS v1.6.
39+
40+
🎉 After all listed features are implemented, v1.0.0 will be released! 🎉
1841

1942
## How can I use FMI.jl?
2043
1\. Open a Julia-REPL, switch to package mode using `]`, activate your preferred environment.
@@ -36,16 +59,16 @@
3659
using FMI, Plots
3760

3861
# load and instantiate a FMU
39-
fmu = fmiLoad(pathToFMU)
62+
fmu = loadFMU(pathToFMU)
4063

4164
# simulate from t=0.0s until t=10.0s and record the FMU variable named "mass.s"
42-
simData = fmiSimulate(fmu, (0.0, 10.0); recordValues=["mass.s"])
65+
simData = simulate(fmu, (0.0, 10.0); recordValues=["mass.s"])
4366

4467
# plot it!
4568
plot(simData)
4669

4770
# free memory
48-
fmiUnload(myFMU)
71+
unloadFMU(myFMU)
4972
```
5073

5174
## What is currently supported in FMI.jl?
@@ -56,21 +79,21 @@ fmiUnload(myFMU)
5679
| | **FMI2.0.3** | | **FMI3.0** | | **SSP1.0** | |
5780
|-----------------------------------|--------------|--------|------------|--------|------------|--------|
5881
| | Import | Export | Import | Export | Import | Export |
59-
| CS | ✔️✔️ | 🚧 | ✔️ | 📅 | 📅 | 📅 |
60-
| ME (continuous) | ✔️✔️ | ✔️✔️ | 🚧 | 📅 | 📅 | 📅 |
61-
| ME (discontinuous) | ✔️✔️ | ✔️✔️ | 🚧 | 📅 | 📅 | 📅 |
82+
| CS | ✔️✔️ | 🚧 | ✔️✔️ | 📅 | 📅 | 📅 |
83+
| ME (continuous) | ✔️✔️ | ✔️✔️ | ✔️✔️ | 📅 | 📅 | 📅 |
84+
| ME (discontinuous) | ✔️✔️ | ✔️✔️ | ✔️✔️ | 📅 | 📅 | 📅 |
6285
| SE | 🚫 | 🚫 | 🚧 | 📅 | 🚫 | 🚫 |
63-
| Explicit solvers | ✔️✔️ | ✔️✔️ | ✔️ | 📅 | 📅 | 📅 |
64-
| Implicit solvers (autodiff=false) | ✔️✔️ | 🚧 | ✔️ | 📅 | 📅 | 📅 |
65-
| Implicit solvers (autodiff=true) | ✔️✔️ | 🚧 | 🚧 | 📅 | 📅 | 📅 |
66-
| get/setState | ✔️✔️ | 📅 | ✔️ | 📅 | 🚫 | 🚫 |
67-
| getDirectionalDerivatives | ✔️✔️ | 📅 | ✔️ | 📅 | 🚫 | 🚫 |
68-
| getAdjointDerivatives | 🚫 | 🚫 | ✔️ | 📅 | 🚫 | 🚫 |
86+
| Explicit solvers | ✔️✔️ | ✔️✔️ | ✔️✔️ | 📅 | 📅 | 📅 |
87+
| Implicit solvers (autodiff=false) | ✔️✔️ | ✔️✔️ | ✔️✔️ | 📅 | 📅 | 📅 |
88+
| Implicit solvers (autodiff=true) | ✔️ | ✔️✔️ | ✔️ | 📅 | 📅 | 📅 |
89+
| get/setState | ✔️✔️ | 📅 | ✔️✔️ | 📅 | 🚫 | 🚫 |
90+
| getDirectionalDerivatives | ✔️✔️ | 📅 | ✔️✔️ | 📅 | 🚫 | 🚫 |
91+
| getAdjointDerivatives | 🚫 | 🚫 | ✔️✔️ | 📅 | 🚫 | 🚫 |
6992
| FMI Cross Checks | ✔️✔️ | 📅 | 📅 | 📅 | 🚫 | 🚫 |
7093

71-
✔️✔️ supported & tested
94+
✔️✔️ supported & CI-tested
7295

73-
✔️ beta supported (implemented), but untested
96+
✔️ beta supported: implemented, but not CI-tested
7497

7598
🚧 work in progress
7699

@@ -86,14 +109,15 @@ To keep dependencies nice and clean, the original package [*FMI.jl*](https://git
86109
- [*FMI.jl*](https://github.com/ThummeTo/FMI.jl): High level loading, manipulating, saving or building entire FMUs from scratch
87110
- [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl): Importing FMUs into Julia
88111
- [*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl): Exporting stand-alone FMUs from Julia Code
112+
- [*FMIBase.jl*](https://github.com/ThummeTo/FMIBase.jl): Common concepts for import and export of FMUs
89113
- [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl): C-code wrapper for the FMI-standard
90114
- [*FMISensitivity.jl*](https://github.com/ThummeTo/FMISensitivity.jl): Static and dynamic sensitivities over FMUs
91115
- [*FMIBuild.jl*](https://github.com/ThummeTo/FMIBuild.jl): Compiler/Compilation dependencies for FMIExport.jl
92116
- [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl): Machine Learning with FMUs
93117
- [*FMIZoo.jl*](https://github.com/ThummeTo/FMIZoo.jl): A collection of testing and example FMUs
94118

95119
## What Platforms are supported?
96-
[*FMI.jl*](https://github.com/ThummeTo/FMI.jl) is tested (and testing) under Julia Versions *1.6 LTS* (64-bit) and *latest* (64-bit) on Windows *latest* (64-bit) and Ubuntu *latest* (64-bit). Mac and Julia (32-bit) should work, but untested. For the best performance, we recommend using Julia >= 1.7.
120+
[*FMI.jl*](https://github.com/ThummeTo/FMI.jl) is tested (and testing) under Julia Versions *1.6 LTS* (64-bit) and *latest* (64-bit) on Windows *latest* (64-bit, 32-bit) and Ubuntu *latest* (64-bit). Mac (64-bit, 32-bit) and Ubuntu (32-bit) should work, but untested. For the best performance, we recommend using Julia >= 1.7, even if we support and test for the official LTS (1.6.7).
97121

98122
## How to cite?
99123
Tobias Thummerer, Lars Mikelsons and Josef Kircher. 2021. **NeuralFMU: towards structural integration of FMUs into neural networks.** Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel (Ed.). Proceedings of 14th Modelica Conference 2021, Linköping, Sweden, September 20-24, 2021. Linköping University Electronic Press, Linköping (Linköping Electronic Conference Proceedings ; 181), 297-306. [DOI: 10.3384/ecp21181297](https://doi.org/10.3384/ecp21181297)
@@ -108,7 +132,4 @@ Contributors are welcome. Before contributing, please read, understand and follo
108132
During development of new implementations or optimizations on exisitng code, one will have to make design decissions that influence the library performance and usability. The following priorization should be the basis for decision-making:
109133
- **#1 Compliance with standard:** It is the highest priority to be compliant with the FMI standard ([fmi-standard.org](https://fmi-standard.org/)). Identifiers described in the standard must be used. Topologies should follow the specification as far as the possibilities of the Julia programming language allows.
110134
- **#2 Performance:** Because [*FMI.jl*](https://github.com/ThummeTo/FMI.jl) is a simulation tool, performance is very important. This applies to the efficient use of CPU and GPU, but also the conscientious use of RAM and disc space.
111-
- **#3 Usability:** The library should be as usable as possible, as long as being fully compliant with the FMI standard.
112-
113-
## Interested in Hybrid Modelling in Julia using FMUs?
114-
See [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl).
135+
- **#3 Usability:** The library should be as usable as possible and feel "the Julia way" (e.g. by using multiple dispatch instead of the "C coding style"), as long as being fully compliant with the FMI standard.

docs/src/assets/FMI_JL_family.pdf

-376 Bytes
Binary file not shown.

docs/src/assets/FMI_JL_family.png

153 KB
Loading

0 commit comments

Comments
 (0)