From 7b75ca0d1ad270919a466ad5fa08e0ce184fbcea Mon Sep 17 00:00:00 2001 From: TT Date: Wed, 11 Sep 2024 20:29:25 +0200 Subject: [PATCH] fix --- examples/jupyter-src/modelica_conference_2021.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/jupyter-src/modelica_conference_2021.ipynb b/examples/jupyter-src/modelica_conference_2021.ipynb index 1144224a..aa15d5db 100644 --- a/examples/jupyter-src/modelica_conference_2021.ipynb +++ b/examples/jupyter-src/modelica_conference_2021.ipynb @@ -622,7 +622,7 @@ }, "outputs": [], "source": [ - "function plot_friction_model(realSimData, netBottom, forces) \n", + "function plot_friction_model!(realSimData, netBottom, forces) \n", " linestyles = [:dot, :solid]\n", " \n", " velReal = getValue(realSimData, \"mass.v\")\n", @@ -680,7 +680,7 @@ }, "outputs": [], "source": [ - "function plot_displacement_model(realSimData, netTop, displacements, tSave, displacement)\n", + "function plot_displacement_model!(realSimData, netTop, displacements, tSave, displacement)\n", " linestyles = [:dot, :solid]\n", " \n", " posReal = getValue(realSimData, \"mass.s\")\n", @@ -701,7 +701,7 @@ "\n", " display(fig)\n", " \n", - " return displacements\n", + " return nothing\n", "end" ] }, @@ -910,7 +910,7 @@ "source": [ "for run in 1:numRuns\n", "\n", - " global forces\n", + " global forces, displacements\n", " \n", " optim = Adam(10.0^(-3+1-run)) # going from 1e-3 to 1e-4\n", "\n", @@ -932,14 +932,14 @@ " netBottom = Chain(layersBottom...)\n", " transferFlatParams!(netBottom, paramsNet, 7)\n", " \n", - " plot_friction_model(realSimData, netBottom, forces) \n", + " plot_friction_model!(realSimData, netBottom, forces) \n", " \n", " # displacement model extraction\n", " layersTop = neuralFMU.model.layers[1:1]\n", " netTop = Chain(layersTop...)\n", " transferFlatParams!(netTop, paramsNet, 1)\n", "\n", - " displacements = plot_displacement_model(realSimData, netTop, displacements, tSave, displacement)\n", + " plot_displacement_model!(realSimData, netTop, displacements, tSave, displacement)\n", "end" ] },