Paramsasargs
The code now takes parameters via a "Run.jl" script. This removes the need to reload the module every time a parameter changes, since they are no longer global constants. All the functions that used to depend on global-constant parameters now take them in as a struct of Composite Type Params
. A new setparams
function has been created in "src/init.jl" to construct the struct. Additional quality-control of input have been added with this change of interaction mode. Source files have also been renamed to be clearer. Comments have been updated accordingly. The explicit passing and unpacking (via @unpack
) of parameters also make the source code easier to read, modify, and test.
TESTS: Both this branch and the master branch produced the same results (using the same random seed).
ISSUES: The speed takes an approximately 10% hit in this branch, amounting to about 10 minutes of additional run-time (out of about 100 minutes for the master-branch version) in the standard test cases. Continual work is needed to identify sources of inefficiencies. However, the new mode of user input is far safer and cleaner, and outweighs the (probably non-permanent) performance hit.
TODO: Focus on the changes made in tight loops, and check if the modifications opened up some type instability.