Yperidis / bvd_agent_based_model

A stochastic, agent-based epidemic model to simulate disease spread in a network of given nodes
MIT License
1 stars 2 forks source link

ICTs greater than max(rest time)+max(pregnancy time) #20

Open Yperidis opened 6 years ago

Yperidis commented 6 years ago

Issue occurred for strategy 8 running up to 5,000 steps with the Test.ini file default input. Likely causes at Cow.cpp, execute_BIRTH() and at TableBasedOutput.cpp, createCowDataPointForCow().

Yperidis commented 6 years ago

Most likely this happens due to the fact that we get the two messages "WARNING! CALF STATUS NO_CALF CALLED AT BIRTH! NON-PREGNANT COW IS CALLED FOR BIRTH." and "WARNING! BIRTH TRYING TO TAKE PLACE AT ABORTION CONDITIONS." during runtime. In other word, the execute_BIRTH() function is possibly accessed at right times, but exited due to the NO_CALF (meaning there is no embryo to be born) or abortion status (which does not count as a calving). Therefore, we should understand why the execute_BIRTH() is accessed with an abortion which should not count as a calving or NO_CALF status.

Yperidis commented 6 years ago

If indeed the problem is reduced to finding why the execute_BIRTH() is accessed with an abortion which should not count as a calving or NO_CALF status, then the access would have come only from the execute_event() function at Cow.cpp, triggered by the condition "Destination_Type::COW" from the execute_next_event() function of System.cpp, which in turns is called from the schedule_event() function in System.cpp which populates the priority queue.

JoernGe commented 6 years ago

This can be OK, if there is a stillbirth/abortion during pregnancy. Then the cow will be inseminated again and the ICT is greater than max(rest time)+max(pregnancy time). This happens in real cows, too

Yperidis commented 6 years ago

The stillbirth is determined after the error prompt of the birth function's call. So they are indeed counted as calvings. Moreover, what you say is true. But, still if in 5,000 days there are cows with up to 1,600 ICTs, that would mean that after some birth, the cow gave another after 1,600 days. This would mean that there were 5 abortions in a row, all counting as births (i.e. above the threshold of 240 days of carriage and below 280 days, at which the birth would count as a calving) until the next successful birth. It is possible stochastically, but it seems to me rather unlikely and that it shouldn't be happening.