ModelParameters.jl
ModelParameters.jl copied to clipboard
Add `Const` wrapper that acts just like a `Param` but explicitly isnt one
Its common to want to switch some parameters to constants during modelling. Currently thats kind of annoying, I often comment out the Param definition.
If we had Const wrappers that acted just like Param except they were not flattened into the parameter list, switching would be easy, and the code would be pretty nice to read. We could also explicitly show the table of Const values and have a consts function that would get them all.
Yeah, I have actually implemented this myself in my own packages multiple times 😅
Is this related to #39 or is the idea for Const to not be an AbstractParam?
Yeah this time not an AbstractParam - just another wrapper type that works in exactly the same way otherwise. So you can just swap Param to Const. But e.g. it wont get optimised, and wont get interactive sliders in MakieModel.
You could also get them all to put in table/csv, just separately to the Param, we could make some helpers for that.