Skip to content

Commit

Permalink
minor modifications to dummy-tutorial, updated readme doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo committed Nov 4, 2024
1 parent fe2f8b7 commit 7e78ab7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest] # ubuntu-latest
file-name: [Export-BouncingBall]
file-name: [Export]
julia-version: ['1.10'] # 1.9
julia-arch: [x64]
experimental: [false] # true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## What is FMIExport.jl?
[*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl) is a free-to-use software library for the Julia programming language which allows for the export of FMUs ([fmi-standard.org](http://fmi-standard.org/)) from any Julia-Code. [*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl) is completely integrated into [*FMI.jl*](https://github.com/ThummeTo/FMI.jl).

[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://ThummeTo.github.io/FMIExport.jl/dev)
[![Dev Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://thummeto.github.io/FMI.jl/dev/)
[![Test (latest)](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/TestLatest.yml/badge.svg)](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/TestLatest.yml)
[![Test (LTS)](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/TestLTS.yml/badge.svg)](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/TestLTS.yml)
[![Run Examples](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/Example.yml/badge.svg)](https://github.com/ThummeTo/FMIExport.jl/actions/workflows/Example.yml)
Expand Down
2 changes: 1 addition & 1 deletion examples/FMI2/BouncingBall/src/BouncingBall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fmu_save_path = joinpath(tmpDir, "BouncingBall.fmu")

fmu = FMIBUILD_CONSTRUCTOR()
using FMIBuild: saveFMU # <= this must be excluded during export, because FMIBuild cannot execute itself (but it is able to build)
saveFMU(fmu, fmu_save_path; debug=true, compress=false) # <= this must be excluded during export, because fmi2Save would start an infinte build loop with itself (debug=true allows debug messages, but is slow during execution!)
saveFMU(fmu, fmu_save_path; debug=true, compress=false) # <= this must be excluded during export, because fmi2Save would start an infinite build loop with itself (debug=true allows debug messages, but is slow during execution!)

### some tests ###
# using FMI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"source": [
"# Create a Bouncing Ball FMU\n",
"\n",
"Tutorial by Johannes Stoljar, Tobias Thummerer, Simon Exner | Last edit: October 29 2024\n",
"Tutorial by Tobias Thummerer, Simon Exner | Last edit: October 29 2024\n",
"\n",
"### This is a placeholder example; it will be changed or replaced soon\n",
"🚧 This is a placeholder example, it will be changed or replaced soon. It is not meant to be tutorial at the current state! See the [examples folder](https://github.com/ThummeTo/FMIExport.jl/tree/main/examples/FMI2) for examples. 🚧\n",
"\n",
"## License"
]
Expand All @@ -36,40 +36,6 @@
"This Julia Package FMIExport.jl is motivated by the export of simulation models in Julia. Here the FMI specification is implemented. FMI (Functional Mock-up Interface) is a free standard ([fmi-standard.org](https://fmi-standard.org)) that defines a container and an interface to exchange dynamic models using a combination of XML files, binaries and C code zipped into a single file. The user is able to create own FMUs (Functional Mock-up Units)."
]
},
{
"cell_type": "markdown",
"id": "be2ac71e-a3b0-4bc3-91d9-a4f0ec2a4377",
"metadata": {},
"source": [
"## Target group\n",
"\n",
"The example is primarily intended for users who work in the field of simulations. The example wants to show how simple it is to export FMUs in Julia."
]
},
{
"cell_type": "markdown",
"id": "7e21f7c8-d9d7-4259-9729-a69c6605b26d",
"metadata": {},
"source": [
"## Introduction to the example\n",
"\n",
"This example shows how to export a FMU from julia-code. It uses the BouncingBall FMU, that can be found on the main branch of FMIExport in [examples/FMI2/BouncingBall](https://github.com/ThummeTo/FMIExport.jl/tree/main/examples/FMI2/BouncingBall). This notebook will show you how to export it."
]
},
{
"cell_type": "markdown",
"id": "18e579c8-31c9-4753-8079-4bb1f082439b",
"metadata": {},
"source": [
"## Installation prerequisites\n",
"\n",
"| | Description | Command | Alternative |\n",
"|:----|:----------------------------------|:--------------------------|:-----------------------------------------------|\n",
"| 1. | Enter Package Manager via | ] | |\n",
"| 2. | Install FMIExport via | add FMIExport | add \"https://github.com/ThummeTo/FMIExport.jl\" |\n",
"| 3. | Install FMIBuild via | add FMIBuild | add \"https://github.com/ThummeTo/FMIBuild.jl\" |"
]
},
{
"cell_type": "markdown",
"id": "c354487b-99e1-4428-ad6f-cc535008df78",
Expand Down Expand Up @@ -97,7 +63,7 @@
"id": "a42e20da-526a-4d13-aeb4-6c758fc38003",
"metadata": {},
"source": [
"next we have to define where to put the generated files"
"Next we have to define where to put the generated files:"
]
},
{
Expand All @@ -117,7 +83,7 @@
"id": "8fb29e5a-0384-499c-807b-302a49193c95",
"metadata": {},
"source": [
"Remember, that we use the FMU-source stored at [examples/FMI2/BouncingBall](https://github.com/ThummeTo/FMIExport.jl/tree/main/examples/FMI2/BouncingBall). If you execute this notebook locally, make shure to ajust the fmu_source_path to where your FMU-Package resides. **It is important, that an absolute path is provided!** For this notebook to work in the automated bulid pipeline, this absolute path is obtained by the following instructions. If you run this example locally, you can provide the path manually, just make shure you use the correct directory seperator or just use just use julias `joinpath` function."
"Remember, that we use the FMU-source stored at [examples/FMI2/BouncingBall](https://github.com/ThummeTo/FMIExport.jl/tree/main/examples/FMI2/BouncingBall). If you execute this notebook locally, make shure to adjust the fmu_source_path to where your FMU-Package resides. **It is important, that an absolute path is provided!** For this notebook to work in the automated bulid pipeline, this absolute path is obtained by the following instructions. If you run this example locally, you can provide the path manually, just make shure you use the correct directory seperator or just use just use julias `joinpath` function."
]
},
{
Expand Down Expand Up @@ -145,7 +111,7 @@
"id": "625f5898-c269-4146-8284-c1bd0e005819",
"metadata": {},
"source": [
"TODO The following codecell contains *workardound* code that will be obsolete with the next release"
"The following codecell contains *workardound* code that will be obsolete with the next release. This is just to check the CI-Pipeline!"
]
},
{
Expand Down Expand Up @@ -286,9 +252,7 @@
"id": "95a4ce82-9320-4776-b382-d9fe650d8d83",
"metadata": {},
"source": [
"TODO? It is questionable if this is the job of the library or the user... Currently it is not implemented and therefor the job of the user\n",
"\n",
"We need to make shure the fmu_source_package is instantiated"
"We need to make shure the fmu_source_package is instantiated:"
]
},
{
Expand Down Expand Up @@ -317,7 +281,7 @@
"source": [
"That is all the preperation, that was necessary. Now we can export the FMU. \n",
"\n",
"TODO The following codecell contains *workardound* code that will need to be modified with the next release"
"The following codecell contains *workardound* code that will need to be modified with the next release."
]
},
{
Expand Down Expand Up @@ -355,9 +319,9 @@
"id": "1f982a2c-f7e6-45b9-a7d0-2e315ee0404e",
"metadata": {},
"source": [
"One current limitation of Julia-FMUs is, that they can not be imported back into Julia, as it is currently not allowed having two Julia-sys-images existing at the same time within the same process. (The Julia FMU comes bundeled with its own image) \n",
"One current limitation of Julia-FMUs is, that they can not be imported back into Julia, as it is currently not allowed having two Julia-sys-images existing at the same time within the same process. (The Julia FMU comes bundeled with its own image).\n",
"\n",
"TODO Therefore we will test our generated FMU in Python unsing FMPy."
"Therefore we will test our generated FMU in Python unsing FMPy."
]
}
],
Expand Down

0 comments on commit 7e78ab7

Please sign in to comment.