Improving the management procedures in farms infected with the Porcine Reproductive and Respiratory Syndrome virus using PDP models

Pig meat production need to be built up in the future due to the increase of the human population worldwide. To address this challenge, there is plenty of room for improvement in terms of pig production efficiency that could be severely hampered by the presence of diseases. In this sense, Porcine Reproductive and Respiratory Syndrome Virus (PRRSV) is one of the most costly disease present in industrial pork production in Europe and North America. We have developed a model to analyze the effect of different management procedures to control this important virus in different epidemiological scenarios. Our results clearly suggest that no cross-fostering during lactation and the maintaining of litter integrity significantly decrease the number of sick and dead animals during the rearing period compared to scenarios where cross-fostering and no litter integrity are practiced. These results highlight the relevance of different management strategies to control PRRSV and quantify the effect of limiting cross-fostering and avoiding mixing animals from different litters in PRRSV positive farms to optimize animal production. Our findings will allow pig farmers to apply these management procedures to control this disease under field conditions in a very cost-effective way.

The results using this Box-Bhenken design previously described are detailed in the following The percentage of infected sows, and lethality are the parameters that have a significant effect on the percentage of sick animals at the end of the nursery and 3 fattening period. However, the probability of transmission of the disease during the lactation phase slightly affects during this phase.
Using the response surfaces, sensitivity has been studied in the three phases (L: lactation, T: transition and F: fattening of the pig) (Figures 1-3).   In the case of variations in the lethality value, the increase in sick animals does not practically vary during the transition and fattening period in the range of studied values.
In the lactation phase, it increases as the lethality increases, but the variations are very small.

Pig PDP model
A PDP model is formed by: 1. Number of environment 2. Membrane structure 3. Initial configuration

Number of environment
There is an environment for the delivery phase (environment 0 is labelled by 100) and 20 environments for the rest of the phases, one per batch (labelled by 100 + batch).

Membrane structure
In all environments there is a cell with the same structure.

Initial configuration
The processes performed in environment 0 are different from other environments, so the initial configuration will be also different.

Environment 0
Each mother is associated with an object , the indexes and indicate respectively the batch to which the mother belongs, the number of births she has performed and the number of births failed, either by having aborted or by having few live pigs.
allows selecting the mothers that belong to batch 1, this object evolves and at the end of the process for the mothers of the first batch has been transformed to that will allow to select the mothers of the next batch and so on until arriving at batch number 20. The object will evolve to object , starting the process again.
It is a counter that facilitates the synchronization of the model.
, objects associated with the mothers that are going to give birth, this object allows to simulate if the mother has successfully raised or not and the number of live piglets she has.
object that is used to ensure that the start warning of the phase 2 processes of the model reaches all the environments associated with each batch.
allows to control the cycle that is being carried out and the number of times that the mothers of each batch are covered in the year.

Environment
In the transition phase the males will be separated from the females, half of the pens will be for each sex. Half of the pens of the transition phase are associated with an object and all the pens of the phase of fatering an object . The object is associated with the mother, this object will be used in the transition phase.
The parameters used in the model are shown on Table S1. Phase 1: Birth Step 1 Object will generate as many objects as mothers have each batch . An object is generated for each mother that must be renewed. A copy of object is saved, and objects that store batch information are generated.
Step 2 The mothers who are going to start the reproduction process will enter the membrane 1.
Mothers who are covered and who also do not abort, generate objects that indicates that they have given birth successfully, that keeps information about the number of piglets and copies of the object that has evolved, Mothers who have not given birth successfully generate objects and a copy of the object . The object will only exist for mothers who have given birth successfully.
Evolution of the objects associated with the mothers that must be renewed.
Evolution of the object i that will be used to start the birth of the mothers of the next batch. It is necessary to have the object , because at the end of this phase the object evolves in the same membrane with positive charge.
Step 3 Fertility and misbirth Evolution of mothers who have given birth successfully. In the case that the number of piglets is small, a failure is added.
Mothers who have not given birth are added a fault.
They will generate as many objects as live piglets each mother has had.

Counter evolution
Step 4 Natural mortality It differentiates mothers who have given birth to those who have not done so successfully. When they die, the object is generated indicating that a free position remains and that it must be replaced by a new mother.

Counter evolution
Step 5 Manager: eliminate + new mothers step 1 Mothers who have reached the maximum number of births and have also had some failure during their productive life will be replaced, so they will evolve to objects.
Mothers who reach the maximum number of births have never had a failure evolve generating two objects, , the first keeps the information of the mother and the second opens the possibility that the mother is replaced. In the event that there are not enough new mothers to be replaced, this mother will be kept in the batch one more birth.
Mothers who have reached the maximum number of failures are eliminated.
Mothers who have not reached the maximum number of deliveries have had a number of important failures (but have not reached the maximum to be eliminated) evolve generating the object , in the case of missing young mothers to replace the that must be removed there is a possibility that one more delivery will remain in the system.
Mothers who do not reach the maximum number of births and the number of failures have not exceeded the limit value will remain in the batch.
The evolution of the objects associated with mothers who have not given birth successfully is similar to those who have given birth successfully. 13 Mothers who are not eliminated are passed to the next batch.
Young mothers are incorporated into the batch.
Evolution of the counter.
Step 6 Manager: new mothers step 2 In this step, there are still objects generated in the previous step and that have preference in the renovation that the objects the latter evolve to objects Evolution of the counter.
Step 7 Manager: new mothers In the case that in this step there are objects means that there are not enough young mothers to renew all those that should be eliminated from the batch, so that they will keep the best ones that had reached the conditions to be replaced. 14 Evolution of the counter.

Step 8 Preparation of mothers for a new birth
The objects associated with the mothers that are going to remain in the batch, go out to the skin membrane (labeled with the value 0) prepared to start a new reproductive cycle.
Objects associated with potentially renewable mothers that have not evolved, , are eliminated (mothers who have been renewed) In this step, if there are objects, or objects (young mothers that have not been used to replace batch mothers). These objects are eliminated.
The object was only generated for mothers who had given birth successfully. The object stores information of the batch, both evolve together to a new object that in subsequent steps will pass to the environment together with the piglets, where the rules of the piglet rearing process, transition phase and fattening will be carried out.
To finish a cycle, the reproduction process of all the mothers belonging to all the batches must be executed. When the reproduction process for the batch ends, the batch must be started, until the last batch is reached, at that moment there is a cycle change and the process for the batch 1 starts again.
When the last block of the last cycle to simulate is finished, as many objects as batch are generated, these objects will indicate that the processes of the lactation phase can be started.
The objects that have been generated in the different steps and that have not evolved are eliminated so that they do not interfere in the subsequent operation.

Counter evolution
Step 9 (Step 1) Sending objects to the environment associated with the batch.
Objects associated with the mothers and piglets leave the environment , they will move to the environment which is where the rules associated with the rest of the phases of the breeding and fattening process will be executed.
Elimination of leftover objects.
The objects that indicate the end of the birth phase must send the information to the different environments where the piglets and mothers are located so that in parallel they initiate the following phases. To ensure that the information will reach all environments, the objects evolve together

Counter evolution
Step 10 ( Step 2) Sending objects to the environment associated with the batc.
The index of the objects is associated to the batch to which it belongs, at this moment all the objects associated with mothers and piglets are going to move from the environment 0 to the environment associated with batch .
The object that keeps information the batch will go to the environment moving to the environment , like the rest of objects, the purpose of this object will be to change the polarity of the membrane 1 of the new environment, to be able to delete the objects whose mission has already ended.
The counter allows the object to be moved from membrane 1 to the skin membrane.
Step 11 ( Step 3) Sending objects to the environment associated with the batch.
Mothers and piglets enter the skin membrane of the new environment.
Mothers generate 20 objects of type or , subscript 1 indicates that the mother is infected, while 0 is healthy.
In the new environment you will find the objects belonging to mothers and piglets of the different simulated cycles, so you have to keep in the objects the cycle they belonged to, this can be done using the object .
The object is used to indicate the end of the process and as a counter to synchronize the model.

Counter evolution
Step

(Step 4) Start of the simulation of the delivery phase for a new batch
The counter along with the object evolve to start a new batch.
The cycle to which they belong is stored in the objects associated with the piglets and mothers.
Step 13 (Step 5) Removing objects Changing the polarity of the membrane 1.
object evolution in order to synchronize the model.

Phase 2: Lactation
There are two types of management: Cross fostering that allows to balance the litters weekly once.
Randomization, the pigs are randomly divided between the mothers that have given birth the first week and the two remaining ones can be balanced the litters (cross fostering) Step 1 When the object simultaneously enters the skin membrane of the environments , it indicates that it will start in parallel (in all batchs) the simulation of the lactation process corresponding to cycle . Objects are generated that will allow selecting the objects associated with the mothers and piglets to start the process. is a counter that will allow synchronizing the model. The objects save the cycle that is simulating the lactation phase.
Step 2 In the case of randomized, , the objects associated with the piglets, LC, enter the membrane 1, otherwise cross fostering evolve to objects of type L in the skin membrane itself.
Objects associated with mothers generate new objects in the case of random management.

Evolution counter
Setp 3 to 7 Piglets are assigned randomly to mothers who have given birth.
Step 8 In the case of choosing randomization in this step it has already finished, so the surplus objects that have been created for this purpose must be eliminated and the cross fostering started.
Step 9 The necessary objects are generated to start the cross fostering Step de 10 to 15 Enter the objects associated with the piglets in the membrane 1, the first index that kept the information of the cycle now goes to save the number of times that has changed mother, generates an object of type that will allow to count the number of piglets what each mother has.
The objects associated with the mothers evolve losing the index associated with the cycle.
If the mother is sick, objects are generated that will allow the infection of new individuals.
Evolution of the counter.
The number of piglets per mother is counted.
Step 16 The counter used for the specific part of fostering, evolves to the R counter that will be used in the common part to the two types of management.
Step 17 If the number of piglets that a mother has is higher than the average value, she releases the rest, , which can be adopted by other mothers.
On the opposite, if a mother does not reach the minimum value, she generates as many objects of the type as piglets she lacks to reach the value.
Evolution of the counter.
Step 18 Objects belonging to the surplus piglets, , are randomly selected and the information is stored in the give object, in case it is the case that the piglet is not adopted, it is returned to the mother from whom it has emerged.
Step 19 Free piglets are assigned to mothers who did not reach the average value.
Weekly die a number of piglets, this process is carried out using the object that is generated in this step.
Step 20 Elimination of objects left over if there were not enough piglets to be adopted.
Simulation of the process of mortality and return of piglets to mothers of origin, in case they have not been adopted.
Elimination of objects that are left over and evolution of the counter.
Step 21 Elimination of leftover objects.

Infection of piglets infected by sick mothers.
Step 22 to 26 24 In order to synchronize, having the same number of steps, the two types of management, only the meter evolves.
Elimination of leftover infectious objects.
Step 27 Up to this step all the processes belonging to the first week have been executed, now the ones of the following week must be started, if another cros fostering is carried out the object is generated, otherwise the object .
When the end of the lactation period is reached, objects are not generated. The one generated is the object Step 28 They leave the objects associated with piglets and mothers of the deepest membrane.
Evolution in the case of not having reached the end of the lactation phase.
Evolution in the case of having reached the end of the lactation phase.
Step 29 In the case of not having cross fostering the following week the counter is generated temporarily, otherwise it is followed by the counter R that is reinitialized.
Evolution in the case of end of a cycle and start of the next.
Evolution in the case of the end of the last cycle.

Removal of objects
Step 30 Evolution of objects to start the cross-fostering process again.
Step 31 Moment in which the processes are synchronized in the case of having or not done cross fostering a week.
Rules that are carried out at the end of the cycle, when the piglets reach 21 days of life and must start the transition phase. Each piglet is associated with an object of type that will be the one that evolved, objects are also generated that keep information respectively of the cycle, movements, disease and mother to which the pig belonged at the end of the piglet cycle. The objects that store the information of the weight of each animal.
Evolution of the objects associated with the mothers, this information will be transmitted to the transition phase to know the mothers who have completed the lactaction phase.

Elimination of objects.
Generation of the object indicating that the transition phase can already be started.

Phase 3: Transition phase
As happened in the lactation phase, all the environments receive simultaneously the object that indicates that the pigs that belong to cycle c of the 20 batches will initiate the transition phase.
Step 1 Two object objects are generated (counter) and , the second will allow selecting the pigs and knowing the mothers who had raised them.
Step 2 It is recorded in the object the mothers who had carried out the breastfeeding process.
Step 3 The objects and that had been generated to save the corresponding information at the end of the lactation phase are eliminated.
The objects , associated with mothers who had not performed the breastfeeding process, enter membrane 4, where a copy is kept for all mothers.
Management in the transition phase can be done in two ways: grouping the piglets by mothers or randomly, in both cases they will be separated by sex.

Case 1 Distribution of pens by mothers
Step 4 to 11 A pen is associated to a mother, objects are generated that will be used later so that the pigs of the mother go to pen .

Counter evolution
Step 12 Evolution of the counter to indicate that each pig can now be assigned its pen, each mother has been assigned a pen number that is where her piglets will go.
Step 13 Enter the objects assigned to the pigs of the cycle that is simulating in the membrane 1 to assign it in the next step the pen.
Step 14 A pen is assigned to each pig separating the males from the females. 29 Counter evolution

Case 2 Random distribution
Step 4 We will generate objects that store the information of each pen so that in a later step these objects will be randomly assigned to the pigs that have finished the lactation phase. Three types of objects are generated, , and , to get a distribution of pigs as similar as possible for each pen.
Enter the objects associated with the pigs in the membrane 2, which is where the transition process takes place.
Step 5 to 15 The object stores information of the pen assigned to each pig in its first index and in its second index if it is infected or not.

Evolution counter
Step 16 It sells the objects that have to be used and those that are not going to be used are eliminated.

Common part to the two types of management
Step 17 In a randomized way a state is assigned to the sick animal, they are infected animals in the previous phase. The disease may be in the incubation phase, in the transmission or recovery phase.

Counter evolution
Step 18 Elimination of unnecessary objects Daily simulation of the disease. Infected animals that do not transmit.
Infected animals that transmit the disease.
Animals that have completed the infective period can be recovered or killed.
Evolution of the counter.
Step 19 The infected animals that are in a pen can transmit the disease to animals of the pen itself or to nearby pens, the objects will be used to transmit the disease to pigs that are in the pen .
Counter evolution An object, , is generated that records the days that have passed in the transition phase Step 20 An infected object in contact with an already infected animal has no effect.
If the infectious object is in contact with a recovered animal, it has no effect Si el objeto infeccioso esta e contacto con un animal susceptible puede o no infectarlo.
When we have 42 objects of the type, it indicates that the phase for the simulated cycle has ended. 34 Evolution of the counter.
Step 21 Evolution of the objects related to the disease associated with each pig.
Step 22 Elimination of leftover objects and evolution of those who must continue with the process.
Step 23 It is associated with the objects associated with the animals , the objects associated with the health status of each one of them. First it is done for animals that are not sick.
Step 24 It is associated with the objects associated with the animals , the objects associated with the health status of each one of them. Now it is done for sick animals.
Step 25 The objects must leave the inner membrane, they have to reach the skin membrane that is where they will start the final fattening process.
Step 26 A weight is associated to each animal, at the same time that the objects are generated that keep all the necessary information to start the final phase, fattening.
Step 27 Preparation of the objects to start the final phase.

Phase 4: Fattening phase
The model in this last phase is similar to that of the previous phase, transition. The transition phase was carried out in the membrane 2, the fattening phase in the membrane3. It starts with the object , which is generated at the end of the previous phase.
Step 1 The first step is to generate objects that will allow the selection of the objects related to the pigs that must evolve and a counter to synchronize the model in this stage.
Step 2 The object that was used to record the weight and health status of each pig in the transition phase is eliminated.
The management can be done in two ways: grouping the animals according to the pen of origin or distribute them randomly.

Case 1: Distribution by pens
Step 2 It is accepted that the number of pens in the phase of fattening is double that in the transition phase, so that the pigs of a pen are divided in the phase of fattening between the pens and .

Case 2: Random distribution
Step 2 In this case, objects associated with the pens are generated. These objects will later be associated with objects related to animals.
The objects associated with the animals enter the membrane 3, where they will perform the fattening process.
Step 3 to 9 The animals are distributed by pens.
Counter equal in both cases (Step 2to9)

Common part
Step 10 In the case of random distribution, objects have been generated that have already carried out their mission, therefore we eliminate them.
Evolution of the objects associated with the animals that keep the sanitary state. Infected animals can be found in the incubation phase or in the transmission phase of the disease.
The animals at the end of the disease can recover or die. The unit of time with which the model works in this phase is 2 days.

Evolution counter
Step 11 Infectious elements evolve and are distributed within the farm, the contagion risk is greater than short distances from the contagion site.
Evolution of the counter that generates objects that records the number of days since the beginning of the fattening phase, and therefore indirectly the age of the animal.
Step 12 Phase of transmission of the disease.
When 60 objects of the type have accumulated, 120 days have passed and it is the moment when the animal finishes the fattening phase.
Step 13 The transmission of the disease has been made in the membrane labeled by 33, to follow the process these objects must leave this membrane.
The evolution of the counter depends on whether or not the end of the fattening phase has been reached.
Step 14 In the case of reaching the end of the fattening phase for pigs of batch , the system configuration must be restored in order to start the process for the animals of the following batch.
Step 15 Evolution of the objects that register the health status to objects , the first index keeps the pen in which the animal is found and the second the health status. 44 Evolution of the counter.
Step 16 Natural mortality Evolution of the counter, if the end of the cycle has been reached, objects will be generated that will allow the next cycle to start.
Step 17 The objects that keep the information of the sanitary status of the animal and the weight reached at the end of the fattening phase are generated.
Evolution of objects related to the simulated cycle.
Step 18 Elimination of leftover objects and preparation to start the next cycle until reaching the end of the model.