InstituteforDiseaseModeling/emodpy-typhoid

TYPHOID_SIM throws exception when settings cause infectiousness to exceed threshold in transmission calculations

Opened this issue · 2 comments

Repro step:
Run this example and increase coverage value from 0.25 to 0.5:
demographic_coverage=0.25,
it will crush with error in below comps:

COMPS: https://comps.idmod.org/#explore/Simulations?filters=ExperimentId=16fe986f-4b6a-ee11-aa0b-b88303911bc1&mode=list&orderby=DateCreated+desc&count=10&offset=0&resizer=502C972C0

OutOfRangeException: 
Exception in utils/Types.h at 60 in RangedFloat.
Variable value had value 1.00871432 which was inconsistent with range limit 1

Assets/Eradication() [0x6d8d23]
Assets/Eradication(_ZN6Kernel17DetailedExceptionC1EPKciS2_+0x2c5) [0x6d98f5]
Assets/Eradication(_ZN6Kernel19OutOfRangeExceptionC1EPKciS2_S2_ff+0x40) [0x6e0a80]
Assets/Eradication(_ZN6Kernel22IndividualHumanTyphoid6ExposeEPKNS_20IContagionPopulationEfNS_17TransmissionRoute4EnumE+0x12b9) [0x645c39]
Assets/Eradication(_ZNK6Kernel28MultiRouteTransmissionGroups17ExposeToContagionEPNS_11IInfectableEPKNS_29TransmissionGroupMembership_tEf+0x138) [0x570978]
Assets/Eradication(_ZN6Kernel22IndividualHumanTyphoid19ExposeToInfectivityEfPKNS_29TransmissionGroupMembership_tE+0x114) [0x646604]
Assets/Eradication(_ZN6Kernel15IndividualHuman6UpdateEff+0x219) [0x585639]
Assets/Eradication(_ZN6Kernel22IndividualHumanTyphoid6UpdateEff+0x25) [0x646805]
Assets/Eradication(_ZN6Kernel4Node6UpdateEf+0x1f9) [0x59adf9]
Assets/Eradication(_ZN6Kernel10Simulation6UpdateEf+0x1da) [0x5ae83a]
Assets/Eradication(_Z14StepSimulationPN6Kernel11ISimulationEf+0x16) [0x4f7bf6]
Assets/Eradication(_Z13RunSimulationIN6Kernel11ISimulationEEvRT_if+0x510) [0x4fa070]
Assets/Eradication(_ZN17DefaultController16execute_internalEv+0x82a) [0x4f843a]
Assets/Eradication(_Z21ControllerInitWrapperiPPcPN6IdmMpi16MessageInterfaceE+0x1b91) [0x687ee1]
Assets/Eradication(_Z14MPIInitWrapperiPPc+0x1e) [0x689c2e]
Assets/Eradication(main+0x30f) [0x4e14af]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x2aaaf06de555]
Assets/Eradication() [0x4e2c97]

application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0

Process finished with exit code 0

If outbreak coverage is less than 0.3, then it is OK:
https://comps.idmod.org/#explore/Experiments?filters=Id=08aa08cb-4a6a-ee11-aa0b-b88303911bc1&offset=0&count=80

emod-api 1.31.0.dev0
emod-typhoid 0.0.4.dev3
emodpy 1.22.0.dev3
emodpy-typhoid 0.0.2 c:\github\emodpy-typhoid

@shchen-idmod Typhoid_SIM deliberately has code to check whether the functions that do the transmission (exposure/acquisition) math have valid input values. This exception is potentially valid and indicates some combination of inputs is creating an invalid state. But I was encountering these types of exceptions and it wasn't obvious to me why.

I will look at these more closely with Jillian but it will require some work I think.