From 947233f53a1902aed4b8b6e40fe80bc162c76bf6 Mon Sep 17 00:00:00 2001 From: TT Date: Tue, 3 Sep 2024 21:25:36 +0200 Subject: [PATCH] remark for tutorials --- examples/src/inputs.ipynb | 18 ++++++++++-------- examples/src/manipulation.ipynb | 2 ++ examples/src/parameter_optimization.ipynb | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/src/inputs.ipynb b/examples/src/inputs.ipynb index 5c79b873..2cd2e25a 100644 --- a/examples/src/inputs.ipynb +++ b/examples/src/inputs.ipynb @@ -8,6 +8,8 @@ "# Simulate an FMU with inputs\n", "Tutorial by Tobias Thummerer\n", "\n", + "🚧 This tutorial is under revision and will be replaced by an up-to-date version soon 🚧\n", + "\n", "## License" ] }, @@ -115,7 +117,7 @@ "outputs": [], "source": [ "# we use an FMU from the FMIZoo.jl\n", - "fmu = fmiLoad(\"SpringPendulumExtForce1D\", \"Dymola\", \"2022x\"; type=:ME) # load FMU in ME-Mode (\"Model Exchange\")" + "fmu = loadFMU(\"SpringPendulumExtForce1D\", \"Dymola\", \"2022x\"; type=:ME) # load FMU in ME-Mode (\"Model Exchange\")" ] }, { @@ -125,7 +127,7 @@ "source": [ "#### Simulate as Model-Exchange\n", "\n", - "In the function `fmiSimulate()` the FMU is simulated with an adaptive step size but with fixed save points `tSave`. In addition, the start and end time are specified. Note, that the dynamics of the input variables are not considered by the steps ize control of the solver, so it is highly recommended to limit the solver step size with the keyword argument `dtmax` if the input is more dynamic than the system." + "In the function `simulate()` the FMU is simulated with an adaptive step size but with fixed save points `tSave`. In addition, the start and end time are specified. Note, that the dynamics of the input variables are not considered by the steps ize control of the solver, so it is highly recommended to limit the solver step size with the keyword argument `dtmax` if the input is more dynamic than the system." ] }, { @@ -147,12 +149,12 @@ "end \n", "\n", "# simulate while setting inputs\n", - "data_extForce_t = fmiSimulate(fmu, (tStart, tStop); # FMU, start and stop time\n", - " saveat=tSave, # timepoints for the ODE solution to be saved\n", - " inputValueReferences=[\"extForce\"], # the value references that should be set (inputs)\n", - " inputFunction=extForce_t, # the input function to be used\n", - " dtmax=1e-2, # limit max step size to capture inputs\n", - " showProgress=false) # disable progress bar\n", + "data_extForce_t = simulate(fmu, (tStart, tStop); # FMU, start and stop time\n", + " saveat=tSave, # timepoints for the ODE solution to be saved\n", + " inputValueReferences=[\"extForce\"], # the value references that should be set (inputs)\n", + " inputFunction=extForce_t, # the input function to be used\n", + " dtmax=1e-2, # limit max step size to capture inputs\n", + " showProgress=false) # disable progress bar\n", "plot(data_extForce_t)" ] }, diff --git a/examples/src/manipulation.ipynb b/examples/src/manipulation.ipynb index 5df47fd6..571bc09b 100644 --- a/examples/src/manipulation.ipynb +++ b/examples/src/manipulation.ipynb @@ -7,6 +7,8 @@ "# Manipulate a function\n", "Tutorial by Tobias Thummerer, Johannes Stoljar\n", "\n", + "🚧 This tutorial is under revision and will be replaced by an up-to-date version soon 🚧\n", + "\n", "## License" ] }, diff --git a/examples/src/parameter_optimization.ipynb b/examples/src/parameter_optimization.ipynb index 6d204bf2..08d3804c 100644 --- a/examples/src/parameter_optimization.ipynb +++ b/examples/src/parameter_optimization.ipynb @@ -137,8 +137,8 @@ "outputs": [], "source": [ "# we use an FMU from the FMIZoo.jl\n", - "fmu = fmiLoad(\"SpringPendulum1D\", \"Dymola\", \"2022x\"; type=:ME)\n", - "fmiInfo(fmu)" + "fmu = loadFMU(\"SpringPendulum1D\", \"Dymola\", \"2022x\"; type=:ME)\n", + "info(fmu)" ] }, { @@ -177,10 +177,10 @@ " x0 = [s0, v0]\n", "\n", " # simulate with given start stae and parameters\n", - " sol = fmiSimulate(fmu, (tStart, tStop); x0=x0, parameters=paramDict, saveat=tSave)\n", + " sol = simulate(fmu, (tStart, tStop); x0=x0, parameters=paramDict, saveat=tSave)\n", "\n", " # get state with index 1 (the position) from the solution\n", - " s_res = fmiGetSolutionState(sol, 1; isIndex=true) \n", + " s_res = getState(sol, 1; isIndex=true) \n", "\n", " return s_res\n", "end\n",