Skip to content

Default values of AgeGroupGotoSchool/Work ABM parameters #869

@dabele

Description

@dabele

Motivation / Current Behaviour

The default values for AgegroupGotoSchool/Work parameters are unsafe for small numbers of age groups. There could be wrong memory accesses if the age groups in the default values don't exist. They are also not great defaults for e.g. a large number of age groups. Usage is awkward, since all age groups have to be set to false before setting the desired age groups.

Enhancement description

Set a better default for the parameters (probably all age groups false).
Fix unit tests and benchmarks by explicitly setting the parameters.
Maybe CustomIndexArray can be extended to allow for a convenient syntax to set multiple entries to the same value, e.g. parameters.get<AgegroupGotoSchool>()[{Agegroup(1), Agegroup(2)}] = true;

Additional context

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Labels

class::improvementCleanup that doesn't affect functionalityloc::backendThis issue concerns the C++ backend implementation.model::abmThis issue concerns any kind of agent-based model.prio::lowThe priority of this task is low. It is an interesting item but with low priority.

Type

No type

Projects

Status

Done (Total) 💯

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions