At the moment, data in the model are all represented as simple single- or multi-dimensional arrays., essentially a mapping from the format of the input data files. This makes it difficult to understand the meaning of many of the operations in the code, as they depend on understanding the significance of particular row and column indices in the data structures.
The key thing with all of the objects below is to produce them as outputs constructed from the input files at the start of the application. It will then be possible to improve the semantics of all of the subsequent code by re-expressing it in of these domain-specific objects.
Health Board
It's expected that the data structures would be expressed as classes, with the core data structure being the Health Board/Region/Admin unit. This data structure should include:
The population of the region
The age breakdown of the region
A numeric identifier for the region (should be unique)
A description of the region as a string (for readability in output files - not used for processing)
Age group
Essentially an enumerated type, dividing a population into segments.
Contact matrices
Should be expressed as a to/from pair in terms of age groups, giving the probabilities linking transmission etc. between population segments.
Note: One intermediate solution is to bridge the gap with judicious use of typedefs and using declarations to improve the expressiveness of the code (Zarebski, 2020)
At the moment, data in the model are all represented as simple single- or multi-dimensional arrays., essentially a mapping from the format of the input data files. This makes it difficult to understand the meaning of many of the operations in the code, as they depend on understanding the significance of particular row and column indices in the data structures.
We need to develop data structures with better semantics. This https://github.com/ScottishCovidResponse/SCRCIssueTracking/issues/9#issuecomment-624712403 is an excellent starting point, as it describes clearly the significant data items feeding into the application.
The key thing with all of the objects below is to produce them as outputs constructed from the input files at the start of the application. It will then be possible to improve the semantics of all of the subsequent code by re-expressing it in of these domain-specific objects.
Health Board
It's expected that the data structures would be expressed as classes, with the core data structure being the Health Board/Region/Admin unit. This data structure should include:
Age group
Essentially an enumerated type, dividing a population into segments.
Contact matrices
Should be expressed as a to/from pair in terms of age groups, giving the probabilities linking transmission etc. between population segments.
Note: One intermediate solution is to bridge the gap with judicious use of typedefs and using declarations to improve the expressiveness of the code (Zarebski, 2020)