Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo committed Sep 11, 2024
1 parent 9781726 commit 7b75ca0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/jupyter-src/modelica_conference_2021.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -701,7 +701,7 @@
"\n",
" display(fig)\n",
" \n",
" return displacements\n",
" return nothing\n",
"end"
]
},
Expand Down Expand Up @@ -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",
Expand All @@ -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"
]
},
Expand Down

0 comments on commit 7b75ca0

Please sign in to comment.