Hello,
I have a module called Utils (see KiteViewer/Utils.jl at sim · ufechner7/KiteViewer · GitHub).
It provides a function se() that returns a struct of simulation settings. These
settings are loaded from a YAML file.
Now I want to use different settings depending on the system that I am simulating.
But the project to use must be known BEFORE I load the module Utils.
The reason is that the settings contain the constant “segments” which defines
the size of static vectors I use for the simulation.
My current plan is to use a file project.txt witch contains the name of the
settings file that shall be loaded.
And if I change the settings during runtime the program shall update this file and
then it would re-start itself.
Is there a better way to achieve the desired behavior:
- using statically sized arrays for the simulation
- reload the program when the project and thus the size changes?
I a bit afraid that restarting might be pretty slow because it might cause a lot of recompilation.
Uwe