Change Log

v1.2.1

New feature

  • Added workaround for strings in structs stored to a HDF5-file. Check the documentation of create_string_converter for details.

v1.2

Breaking changes

  • The all_ranks default value for num_agents changed to true.

New features

  • The functions all_agentids and all_edges allows to get the ids of all agents or the edges on the rank or the complete simulation.

  • The functions write_metadata, write_sim_metadata, read_sim_metadata and read_metadata allows to attach Metadata to the simulation or individual parts of the model.

  • Instead of writing structs for Parameters and Globals it is now also possible to use register_param! and register_global!.

  • Random cells or positions of a grid can be obtained via random_pos and random_cell

  • The function cellid allows to retrieve the id of a cell on a given position.

  • The functions remove_edges! allows to remove edges between to agents, or all edges to an agent.

  • The new function rastervalues can be sometimes a useful shorter version then calc_rasterstate.

  • New functions set_log_path allows to set the path for log files.

  • The keyword with_edge of the function apply allows to restrict the called agents to those agents that have an edge of type with_edge. - The new :Independet hint can be given to agent types if agents of this type never access the state of other agents of this type. This allows Vahana to directly modify the state of an agent in its transition functions without having to copy all agents of that type.

  • The new hint :Independent can be given to agent types if agents of this type never access the state of other agents of this type. This allows Vahana to change the state of an agent directly in the corresponding vector in a transition functions without copying all agents of this type.

  • For neighborstates, neighborstates_flexible, neighborids and edgestates there are now also functions that return an iterator for of states/ids instead of a vector these states/ids. They have the same function name, extended with _iter, e.g. neighborstates_iter.

  • The function add_agent_per_process! allows you to add a single agent of an agent type to each process of a parallel simulation.

  • New function modify_global! which is a combination of set_global! and get_global.

Improvements

  • read_snapshot! can be also used to read data that was written via calls to write_agents, write_edges etc..

  • calc_rasterstate tries to retrieve the returned type automatically by default.

  • When show_agent is called with an id, it is no longer necessary to give also the agent type.

  • Improved error messages.

  • Julia 1.11 introduced a breaking change in Stateful Iterators. Vahana's edge iterators have now been adapted to accommodate this breaking change.

Performance Improvements

  • move_to! improvements.

  • Removed an unnecessary memcpy of edges for the case that the type is in the add_existing argument, but not in the read argument of a transition function.

Fixes

  • When edges were removed as a consequence of removing agents, this change was not written to the hdf5 file until also other changes to the edges of this type happen.

  • In a parallel simulation, sometime not all edges were written to the hdf5 file.

  • Fixed a compability issue with Microsofts MPI implementation.

  • log folder was also created when no log file was written.

  • show_agent didn't work for all agent hint combinations.

  • It was necessary (and not documented) that add_raster! was called from all ranks. Now it is possible to call it only from rank 0 (like add_agent! etc.).

v1.1

New features

  • New functions set_hdf5_path allows to set the path for hdf5 files.

Improvements

  • Removed usage of Base.memcpy! do be compatible with Julia 1.10.

  • Improved error messages.

Performance Improvements

Fixes

  • Empty arrays where not supported for parameters or globals when they where writted to a hdf5 file.