v2.0.0
v2.0.0
Version 2 of TITAN includes a major refactor and reorganization of the code base, the ability to use the model without HIV, and changes to the parameters to better capture their use in the model.
Breaking Changes
- Params
demographics
rearranged to reflect the actual classes the value is used at (as opposed to having it available at all levels) -sex_type
key introduced and some items moved underdrug_type
(hiv, haart, death rate, num partners). E.g.demographics.black.MSM.hiv.init
is nowdemographics.black.sex_type.MSM.drug_type.NonInj.hiv.init
aids
key in demographics moved underhiv
drug_type
now has sub-keyppl
instead ofinit
, params checking enforces theppl
s for a race/sex_type/drug_type combination must add to oneprep
in the demographics hadcoverage
changed totarget
and an explicitinit
key addedhaart
adherence changed to boolean adherent, this affectshaart
andhaart_scaling
paramsmsmw
feature renamed toexternal_exposure
, new params added to make it more abstractpca
feature retired and refactored into thepca
interaction and theknowledge
exposure
HIVModel
renamedTITAN
as the model no longer is explicitly an HIV model (though most available features explicitly use HIV at this time)- Base setting retired, those values now must be explicitly included in the setting or params
- All agent attributes are saved with the population, no longer an option to just save core attributes
- Standardized naming of reporting fields and removed reports other than the basic report
- The columns in the report are dependent on the features/exposures enabled in the parameters
New Features
- Exposures are the class of objects that can be transmitted in the model, currently
hiv
andknowledge
- Interactions are the types of interactions that agents can have in the model, currently
sex
,injection
, andpca
- Features are interventions or similar events which affect the state of the agent, currently
external_exposure
(formerlymsmw
),haart
,high_risk
,incar
,partner_tracing
,prep
,random_trial
,syringe_services
,vaccine
- Random trial has been abstracted to allow treatments (
prep
orknowledge
) to be administered independently of the enrollment type (all
,bridge
,random
,eigenvector
) - New settings added: Mississippi and NYC
prep
target can be treated as a probability instead of a numeric target withtarget_as_prob
set totrue
modified_weibull
added to available distribution types
Technical Notes
- See the docs sections on exposures, interactions, and features for details on the required API and how to implement a new one
mypy
can't statically determine that features and exposures validly exist on an agent, so the comment# type: ignore[attr-defined]
is added to those lines to appease itmodel.py
is now agnostic to any exposures, interactions, or features so can be used as a base for any combination of those items- Each exposure, feature, and interaction file should be a standalone representation of that topic in the repository - there remain a few places where this could be improved, but the goal of standalone files should be used as a guiding principal in development