Skip to content

Commit

Permalink
v0.12.0 (ThummeTo#172)
Browse files Browse the repository at this point in the history
* added information readme/docu

* Fmi3 refactor reworked (ThummeTo#165)

* added FMI3_JLD2.jl

* V0.11.0 (#157)

* adjustments for implicite solvers

* major refactoring

* fixed dtmin issue (#159)

* fixed dtmin issue

* version inc

* Docstrings dec22 (#158)

* Updated FMI.jl

* Updated FMI.jl

* Update FMI.jl

* Updated FMI.jl

* Updated FMI.jl

* Updated FMI.jl

* Updated

* Updated

* Update Doc-String

* Update Doc-String

* Update Doc-String

* Update library.md

* Update libraray.md

* Update libraray.md

* Update library.md

* Update src/FMI.jl

* Updtate Doc-String FMI2_additional

* Update Doc-String FMI2_plot

* Updtate Doc-String FMI2_additional

* Update Doc-String and library.md

* Update library.md

* Update library.md

Co-authored-by: adribrune <[email protected]>
Co-authored-by: Adrian Brune <[email protected]>
Co-authored-by: adribrune <[email protected]>

* Update the repo structure (#160)

* Update the repo structure

* Bug fix

* Bug fix in examples

* Bug fix

* Run the examples in parallel (#162)

* v0.11.2 (ThummeTo#163)

* fixed testa

* added test for execution config, fixed bug with freeInstance

* compatibility to new FMI3 topology

* added FMI3 tests

* add fmi3 version of files

* add missing deps

* tests changes

* made most of the tests work

* first changes for fixing sim

* minor changes

* fix tests for fmi 3

* fix stuff lost in merge

* update tests

* mmore work on tests

* finish tests

* bump version

* add warning for ME simulation

---------

Co-authored-by: ThummeTo <[email protected]>
Co-authored-by: adribrune <[email protected]>
Co-authored-by: Adrian Brune <[email protected]>
Co-authored-by: adribrune <[email protected]>
Co-authored-by: Johannes Stoljar <[email protected]>

* docs(FMI): fix typo for `deperecated` (ThummeTo#169)

* fixed test

* added warning for failed simulation

* allow string return code from solver

* cleaned dependencies, adapted to new SciMLBase.Retcode

* cleaned dependencies

* divided test action into latest and LTS

* run examples on latest

* cleane dup

---------

Co-authored-by: JoKircher <[email protected]>
Co-authored-by: adribrune <[email protected]>
Co-authored-by: Adrian Brune <[email protected]>
Co-authored-by: adribrune <[email protected]>
Co-authored-by: Johannes Stoljar <[email protected]>
Co-authored-by: Sathvik Bhagavan <[email protected]>
  • Loading branch information
7 people authored Mar 8, 2023
1 parent 7d3b6d2 commit 2d22ae1
Show file tree
Hide file tree
Showing 28 changed files with 3,817 additions and 1,691 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Example.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Examples
name: Examples v1 (latest)

on:
workflow_dispatch:
Expand All @@ -20,7 +20,7 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest]
file-name: [manipulation, modelica_conference_2021, multiple_instances, multiprocessing, multithreading, parameterize, simulate]
julia-version: ['1.7']
julia-version: ['1.8']
julia-arch: [x64]
experimental: [false]

Expand All @@ -44,7 +44,7 @@ jobs:
env:
FILE: examples/src/${{ matrix.file-name }}.ipynb
run: |
jupyter nbconvert --ExecutePreprocessor.kernel_name="julia-1.7" --to notebook --inplace --execute ${{ env.FILE }}
jupyter nbconvert --ExecutePreprocessor.kernel_name="julia-1.8" --to notebook --inplace --execute ${{ env.FILE }}
jupyter nbconvert --to script ${{ env.FILE }}
jupyter nbconvert --to markdown ${{ env.FILE }}
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/TestLTS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test v1.6 (LTS)

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- 'src/**'
- 'test/**'
- '.github/workflows/Test.yml'
- 'Project.toml'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.6']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]

steps:
# Checks-out your repository
- name: Check out repository
uses: actions/checkout@v3

# Set up Julia
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Set up cache
- name: "Set up cache"
uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
# Build package
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1

# Run the tests
- name: "Run tests"
uses: julia-actions/julia-runtest@v1

# Preprocess Coverage
- name: "Preprocess Coverage"
uses: julia-actions/julia-processcoverage@v1

# Run codecov
- name: "Run CodeCov"
uses: codecov/codecov-action@v3
with:
file: lcov.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: Test v1 (latest)

on:
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: ['1.6', '1']
julia-version: ['1']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]
Expand Down
14 changes: 6 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name = "FMI"
uuid = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
authors = ["TT <[email protected]>", "LM <[email protected]>", "JK <[email protected]>"]
version = "0.11.3"
version = "0.12.0"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FMIExport = "31b88311-cab6-44ed-ba9c-fe5a9abbd67a"
FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"

[compat]
ChainRulesCore = "1.15.0"
DiffEqCallbacks = "2.24.0"
DifferentialEquations = "7.5.0"
DiffEqCallbacks = "2.26.0"
DifferentialEquations = "7.7.0"
FMIExport = "0.1.0"
FMIImport = "0.14.0"
ForwardDiff = "0.10.0"
FMIImport = "0.15"
ProgressMeter = "1.7.0"
Requires = "1.3.0"
SciMLBase = "1.59.0"
SciMLBase = "1.89.0"
julia = "1.6"
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
[*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](http://fmi-standard.org/)): load or create, parameterize, simulate and plot FMUs seamlessly inside the Julia programming language!

[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMI.jl/dev)
[![Run Tests](https://github.com/ThummeTo/FMI.jl/actions/workflows/Test.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Test.yml)
[![Run Examples](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml)
[![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)
[![Examples (latest)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Example.yml)
[![Build Docs](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/ThummeTo/FMI.jl/actions/workflows/Documentation.yml)
[![Coverage](https://codecov.io/gh/ThummeTo/FMI.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ThummeTo/FMI.jl)
[![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)
Expand Down Expand Up @@ -107,5 +108,12 @@ Tobias Thummerer, Johannes Stoljar and Lars Mikelsons. 2022. **NeuralFMU: presen

Tobias Thummerer, Johannes Tintenherr, Lars Mikelsons. 2021 **Hybrid modeling of the human cardiovascular system using NeuralFMUs** Journal of Physics: Conference Series 2090, 1, 012155. [DOI: 10.1088/1742-6596/2090/1/012155](https://doi.org/10.1088/1742-6596/2090/1/012155)

## Notes for contributors
Contributors are welcome. Before contributing, please read, understand and follow the [Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac).
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:
- **#1 Compliance with standard:** It is the highest priority to be compliant with the FMI standard ([fmi-standard.org](http://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.
- **#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.
- **#3 Usability:** The library should be as usable as possible, as long as being fully compliant with the FMI standard.

## Interested in Hybrid Modelling in Julia using FMUs?
See [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl).
1 change: 1 addition & 0 deletions docs/src/examples/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The examples are:

- [__Simulate__](https://thummeto.github.io/FMI.jl/dev/examples/simulate/): Showing how you can simulate a CS-FMU and a ME-FMU.
- [__Parameterize__](https://thummeto.github.io/FMI.jl/dev/examples/parameterize/): A short example explaining how to parameterize a FMU before simulation.
- [__Inputs__](https://thummeto.github.io/FMI.jl/dev/examples/inputs/): A short example explaining how to simulate a FMU with inputs.
- [__Multiple instances__](https://thummeto.github.io/FMI.jl/dev/examples/multiple_instances/): Showing the use of multiple instances.
- [__Modelica conference 2021__](https://thummeto.github.io/FMI.jl/dev/examples/modelica_conference_2021/): Showing the different variants of simulating an FMU.
- [__Manipulation__](https://thummeto.github.io/FMI.jl/dev/examples/manipulation/): Showing how to redefine a library function.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ If you want to force a specific simulation mode, you can use `fmiSimulateME` (fo

## Simulate arbitrary time intervals
You can simply simulate arbitrary time intervals by passing a `startTime` unequal zero to `fmi2SetupExperiment`.
Because many FMUs don't support `startTime != 0.0` and will throw an error or warning, a time shifting feature inside *FMI.jl* performs all necessary steps in the background - all corresponding commands like e.g. `fmi2SetTime` or `fmi2NewDiscreteStates` act like the desired time interval is simulated.
If you don't want this feature (maybe because you are simulating time-dependent systems), you may use the execution configuration `myFMU.executionConfig.autoTimeShift=false` while providing a `startTime != 0.0`.
Because many FMUs don't support `startTime != 0.0` and will throw an error or warning, a time shifting feature inside *FMI.jl* can be used, that performs all necessary steps in the background - corresponding commands like e.g. `fmi2SetTime` or `fmi2NewDiscreteStates` act like the desired time interval is simulated.
This feature is disabled by default, but can be activated in the execution configuration using `myFMU.executionConfig.autoTimeShift=true` while providing a `startTime != 0.0`.

## Performance
**In- and Out-of-Place:** Many commands in *FMI.jl* are available in in-place and out-of-place semantics. Of course, in-place-calls are faster, because they don't need to allocate new memory at every call (for the return values).
Expand Down
Loading

0 comments on commit 2d22ae1

Please sign in to comment.