Dynamics of HIV-TB co-infection with detection as optimal intervention strategy