-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Motivation / Current Behaviour
The TestingScheme is currently one of the most expensive parts of the main simulation loop. There is also a lot of dynamic data (vectors). There are significant performance gains possible.
Enhancement description
- Use bitset (one bit per location type/infection state/age) instead of vector for TestingCriteria. There is a fixed number of location types, infection states, etc. No need for a dynamic container.
- Only one TestingCriteria per TestingScheme. Removes more dynamic data.
- We should also think about not running all TestingSchemes in all cases, check location first maybe?
Each of the first two changes is ~5% runtime. The first change is always good. the gain for the second change depends on how often there are testingschemes with multiple criterias. Right now there is always only one Criteria anyway. If this leads to many more TestingSchemes, it may not improve performance. But the code is still much simpler.
The third change needs to be discussed. But the potential gain is huge, not running the schemes or only running them conditionally potentially decreases runtime by 50%.
An almost finished implementation of the first two changes is here: 629-parallelize-abm-optimize-testing
Additional context
No response
Checklist
- Attached labels, especially loc:: or model:: labels.
- Linked to project
Metadata
Metadata
Assignees
Labels
Type
Projects
Status