Configuration
The following functions allows to configure Vahana's behaviour:
Vahana.enable_asserts — Functionenable_asserts(enable::Bool)Vahana uses internal consistency checks that come at the cost of runtime performance. For example, agentstate verifies that the specified agent type matches the agent's ID, which creates overhead. These performance-impacting assertions can be disabled by calling enable_asserts(false).
The recommended workflow is to keep assertions enabled during model development, but disable them for production runs, such as before starting parameter space explorations.
Due to Julia's world age system, changes made by enable_asserts() will not take effect within the same function call where it is invoked. The new assertion behavior becomes active only after returning to the top level or in subsequently called functions. Call enable_asserts() at the top level or ensure there's a "world age barrier" before the assertions are expected to work.
Vahana.suppress_warnings — Functionsuppress_warnings(suppress::Bool)In some cases Vahana print some hints or warnings to the stdout. This can be suppressed by calling the suppress_warnings(true) function after importing Vahana.
Vahana.detect_stateless — Functiondetect_stateless(detect::Bool = true)Per default, Vahana expects that the :Stateless hint is set manually.
This design decision was made so as not to confuse users, since then, for example, the edges is not available.
This behaviour can be customized by calling detect_stateless before calling register_edgetype!.
Vahana.set_compression — Functionset_compression(level::Int, parallel_hdf5_compression = false)Set the compression level of HDF5 files.
However, by default, HDF5 datasets are not compressed when the used HDF5 library supports Parallel HDF5 due to encountered issues. While the necessary code to compress datasets in the Parallel HDF5 case is implemented, its activation via the parallelhdf5compression argument is considered experimental and should be used with awareness of potential risks and the specificities of the HDF5 implementation in use.