Home » Eclipse Projects » Spatiotemporal Epidemiological Modeler (STEM) » Disease model adaption
|
Re: Disease model adaption [message #754887 is a reply to message #754862] |
Fri, 04 November 2011 19:14 |
Stefan Edlund Messages: 127 Registered: July 2009 Location: IBM |
Senior Member |
|
|
Hi Matthias,
good questions. First of all, we'd like to offer to work with you if there is any new functionality needed to handle your cattle farm scenario. I was discussing with Jamie and here are the options we can think of right now:
Let's say we want to model Germany where we right now only have data for admin level 1 (states)
1. Create containment edges from the existing admin 1 regions (states) to the nodes in your new graph containing cattle farms. This is intuitive since the cattle farms are located inside states. A node in your cattle farm graph (a farm) would be admin level 2 and would contain both cattle and humans (farmers) and migration edges could be used between farms to transport cattle around. Here is the tricky part though. You would also need to create another graph of human population at admin level 2 for regions where there are no farms and break down the human population in the states into those regions. The reason is that for any given country, we only do modeling at the highest resolution available and if you add admin level 2 farms via contentment edges the multi-population disease would not do any modeling in the admin level 1 states. STEM always assumes you have the complete picture so if you have some admin level 2 nodes, it thinks you have all of them.
2. Model your cattle farms just like we do states, i.e. add containment edges to the Germany node from your farms, then add edges to the states to indicate "physical adjacency" to those states.
3. (Simplest). Don't create any new nodes at all for your cattle farms. For each state in Germany, determine how many cattle there are and create a graph that contains labels only with cattle population data and attach to the states. Migration edges would still be used to move cattle around between states. Maybe this is not the most realistic scenario since I believe you would want to model direct transportation between farms, so if this is the case you would need to model the farms explicitly like in option 1.
Regards,
/ Stefan
|
|
| | | | | |
Re: Disease model adaption [message #756928 is a reply to message #756294] |
Tue, 15 November 2011 15:04 |
Matthias Filter Messages: 75 Registered: July 2009 |
Member |
|
|
Hi,
Jan and I discussed the proposed solution again and we think that it is already close to what is needed. So here is what we think:
1) Modeling cattle => meat: we agree that it might be necessary to create a new type of population model which extends the demographic one (let's call it "generic population model"). To keep it as generic as possible (see Sondra's comment) we would propose that the "generic population model" generator should allow:
- to create "subgroups" within a population (as in the demographic one)
- specify subgroup-specific birth and death-rates
- specify transition factors between subgroup, i.e. a rate at which a member of one subgroup will become a member of the others (somehow similiar to the "aging" effect)
(those factors related to "slaughter house capacity" and "production rate" are in our opinion a bit too specific and it seems for us also possible to describe those aspects also with just the generic transition factors)
2) Consumption of meat / interventions: the subgroup specific death rates could be sufficient to model that
3) cattle feed model: good idea, but currently not top priority for us
BUT, we see one other obstacle:
We think we need a new "generic" multipopulation disease model as well:
Currently both subgroups of our animal/meat population model would be assigned to the same disease model type, if we would use the available multi-population disease models that are implemented. But for meat we can only think of using a SI-model. So we think it would be helpful to create a truely generic multipopulation disease model as well, where you can assign e.g. a SIR-model to the animal subgroup and a SI model to the meat subgroup. Ideally within such a disease model it would be possible to specify each single possible disease transmission rate explicitely, e.g. S_animal to S_meat, S_animal to I_meat (relevant as you have cross-contamination during the slaughtering process), I_animal to S_meat (relevant as you have disinfection or heating steps during slaughtering and processing), I_animal to I_meat (the most likely case) etc.. This type of "generic" multipopulation disease model would also be necessary to describe the disease transmission via eating of meat. E.g. there will be nodes that contain the animal population (with subgroup animals (equals to 0) and meat) and the human population with demographic subgroups. Here again you have the situation that the disease model of the meat subgroup is not necessarily the same as the one in the human population.
What do you think, does that make sense to you?
Matthias
|
|
|
Re: Disease model adaption [message #757010 is a reply to message #756928] |
Wed, 16 November 2011 00:42 |
James Kaufman Messages: 240 Registered: July 2009 |
Senior Member |
|
|
Thank you Matthias. I think we are in fairly close agreement. A few comments on your points below.
1) Modeling cattle => meat: we agree on a new type of generic population model:
- to create "subgroups" within a population
- specify subgroup-specific birth and death-rates (should be no problem)
- specify transition factors between subgroup, I agree that to begin with this can be a constant generic rate. In the future I think we will want to add the option of an algorithm so this generic transition rate can depend on other things. For example, the type of node as you originally suggested.
2) Consumption of meat / interventions: the subgroup specific death rates could be sufficient to model that Yes indeed.
3) cattle feed model: good idea, but currently not top priority for us OK
BUT, we see one other obstacle:
We think we need a new "generic" multi-population disease model as well:
Currently both subgroups of our animal/meat population model would be assigned to the same disease model type, if we would use the available multi-population disease models that are implemented. But for meat we can only think of using a SI-model. So we think it would be helpful to create a truly generic multi-population disease model as well, ...
This is not problem but I think there may be a way to do everything you want with the existing multi-population disease model. For example, even if you pick the SIR Multi-population disease model, you could always set Recovery rate to precisely zero to get SI for just one compartment (it already allows you to specify rates as vectors and matrices. However, we can certainly extend to a new class if necessary.
[Updated on: Wed, 16 November 2011 20:17] Report message to a moderator
|
|
| |
Re: Disease model adaption [message #757161 is a reply to message #757157] |
Wed, 16 November 2011 20:36 |
James Kaufman Messages: 240 Registered: July 2009 |
Senior Member |
|
|
Ahh, quite right. I understand the problem.
Let's do one bugzilla entry for everything (new population and new disease)
perhaps call it Foodborn Disease/Population model framework or something generic as we may want to add other requirements.
Please let me know if the following describes what you want. We implement two new disease models (DMD). In this example, DMD1 applies to the living cattle demographic group. Let's call it an SEIR E-coli for sake of argument. It knows about cattle and meat but the compartments only include living cattle.
DMD2, a separate instance, would be an SI E-coli that infects only meat.
The ONLY difference between these two new models and our existing multi-population models would be in the transition code. When cattle are converted to meat, S and R states map to S state meat. I states map to I state meat with some probability. What would happen to the E state cattle (if we use that)? Would it map to I or to S (or split with some other probability)?
One other question. Is there a dosage effect with E-Coli. If, for example, meat is has only a trace of E-Coli does that make it less likely to infect humans? Would the contamination grow with time as the meat ages? The reason I ask is that the 'I' state really means 'Infectious' as in shedding microparasites so others can be exposed on some type of contact. 'E' could be treated as 'Infected' but not yet 'Infectious'. If there is a threshold or dosage effect with a food borne disease then we might be able to use the E state in the food as well. Does this happen?
[Updated on: Wed, 16 November 2011 20:38] Report message to a moderator
|
|
| | | |
Re: Disease model adaption [message #757360 is a reply to message #757330] |
Thu, 17 November 2011 22:54 |
Stefan Edlund Messages: 127 Registered: July 2009 Location: IBM |
Senior Member |
|
|
A few comments. I see some limitation with using the aging demographic population model. First, the only way cattle transition from one population group to another (e.g. cattle->meat) is via aging, so that means as soon as a cow reaches a certain age it is slaughtered and turned into meat. This sounds somewhat limited, we wouldn't be able vary the meat production rate for instance. Secondly, I understand we wanted to turn a single cow into something like 100 products of meat (From Jan's problem description). I can see the importance of this since meat from a single cow can be transported to many different places and infect people. The aging demographic pop model would only turn a single cow into a single product of meat.
How about something like this:
1. We create a new "Cattle Population Model" (or replace Cattle with a generic word for animals turned into food). It is just like the standard population model with the addition of one parameter "slaughter rate". It's similar to the background death rate, the distinction being animals being slaughtered versus dying from other reasons. In slaughterhouse regions slaughter rate would typically be much higher than background death rate (seems like a waste otherwise).
2. We create a new "Meat Population Model". It would have three parameters: Population identifier for the animal turned into meat, consumption rate (similar to death rate) and scaling factor. The scaling factor is used to determine how many products of meat to create from a single cattle being slaughtered.
3. There is no need to create a new disease model for cattle, we can use the existing SI, SIR or SEIR models.
4. We create a new "Meat disease model" extending the SI model. The already existing parameter "Population Identifier" is the identifier of the meat. We also need to know the population identifier of the animal. To calculate how the S and I compartment changes, we locate the disease label for the animal. If it's of type SI, it's trivial. If the meat population model says that X units of meat was produced in this time step we divide up X into the S and I compartment in equal proportions to the current animal population state. I understand there might be some adjustment to the I compartment here since not all sick animals are turned into infected meat, but that can be adjusted for either via a parameter or (as suggested) a fixed value. If the animal is of type SIR it's also trivial, S+R goes into S, I goes into I. For SEIR animal models, we might need more expert help.
Implementation wise, the "communication" mechanism between population models and disease models is via an EMF object called Exchange and an EMF enumerator ExchangeType. It is attached to any delta value that is created and it essentially breaks down the components that went into calculation of the delta. We would need to extend this object with a new type "SLAUGHTERED" to make sure the meat population model can figure how how to add new meat product.
Is this powerful enough to handle the modeling we want to do?
/ Stefan
|
|
| | | |
Re: Disease model adaption [message #758114 is a reply to message #757670] |
Mon, 21 November 2011 22:11 |
Matthias Filter Messages: 75 Registered: July 2009 |
Member |
|
|
Hi all,
to be honest I have some problems to get it all sorted out. So I try to test it on a different scenario:
Brucellosis in cows, disease transmission via milk to humans:
node 1: farm with 100 cows, milk production per day: 1000 l
node 2: cheese producing company: 50000 l milk comes in per day, 1000 kg cheese out per day
node 3: area node: 1000 human, 200 kg cheese in per day, 200 kg cheese out (eaten)
Disease model cows: SIR
Disease model milk: SI (rate set to 0)
Disease model cheese: SI (rate set to 0)
Disease model human: SIR
So how do we proceed?
1: Create three nodes (1= farm, 2= cheese producer, 3=area node)
2: Create four separate populations (cows, milk, cheese, human) each with standard population model, each with "birth" and "death" rate
3: Create migration edges for milk from node 1 to node 2 and for cheese from node 2 to node 3
4. Assign specific disease models to each population
5. Assign a specific "exchange decorator" on nodes 1 that deal with the disease transmission from infected animals into the milk (SIR to SI) and the milk production
6. Assign a specific "exchange decorator" on nodes 2 that deal with the transformation of milk into cheese (and SI to SI transition considering effects of processing)
7. Assign a specific "exchange decorator" on nodes 3 that deal with consumption of contaminated cheese (= SI to SIR transition)
So in the sample above the "exchange" between the populations happened within a node. If the "exchange decorator" could be applied on an edge as well then one could describe also the transformation of population members in one node into a different population in a different node, which could be useful for certain scenarios as well.
So with respect to that exercise above, I think the decorator idea could work out perfectly fine. What this means with respect to implementation efforts I can not judge. Did I miss anything?
|
|
| | |
Re: Disease model adaption [message #758381 is a reply to message #758194] |
Tue, 22 November 2011 23:18 |
Stefan Edlund Messages: 127 Registered: July 2009 Location: IBM |
Senior Member |
|
|
First, let me get back to Jan-Fredrik's question. It is possible to use a single multi-population disease model between cattle and meat, but since there is no mass-action term (e.g. S*I) involved where infected cattle infects susceptible meat (as defined in the transmission rate matrix) I don't think it would work. Rather infected animals turn directly into infected meat, like in an exchange that Jamie described.
I think the "Exchange decorator" is similar to the new disease model I described in step 4. Generalized, it could also be used in step 2 to turn cattle into meat. However, there are technical obstacles that needs to be overcome if we were to go down this path. Most importantly, there can only be one instance of a decorator determining how the state of a disease changes (the delta calculation) in a single time step for a given population. So in Matthias scenario above where first a disease model is assigned to each population (cow,milk,cheese,human), then a set of exchange decorators determine the transitions of the disease between populations, we'd end up calculating the delta twice for a population and one of the results would be overwritten and thrown away.
Let me be clear on how things work in STEM now so we are all on the same page and so we can also see what we have to work with. There are essentially two calls that happens for each decorator in each time step:
1. For each decorator (i.e. population model, disease model, or perhaps a new exchange decorator), call calculateDelta()
2. For each decorator, call applyExternalDeltas()
In the first step, the calculateDelta method does the math to figure out how the state of a disease (or population) changes for a single time step in each node. It puts this information into a deltaValue variable attached to the node (actually attached to a label on the node). Also attached to the deltaValue is a list that breaks down the components that went into calculation of the delta value. So for instance, a disease model would put information into the list that in this time step, X number of people died as a result of being infected by the disease. A population model would put information into the list that in this time step, X number of people were born, Y number of people died, Z number of people migrated to Scotland and K number of people arrived from Norway .
In the second step, each decorator adjust its own calculated delta value on each node to take into consideration external events. This is where the list is being used. A disease model for instance would read the list attached to a (matching) population model delta value and determine that in this time step, X people were born so it adds X people into the S compartment (typically if children are born susceptible). A population model reads the associated list from a (matching) disease model delta value and determines that Y people died from the infection, so it adjust its delta to reduce the total count of the population. In the end things balance out and all numbers should agree (which is important, a disease model and a population model cannot disagree on the total number of people around!).
So when I said that that a single decorator can only be used to determine what the delta value is, it doesn't mean that it cannot take into consideration other external events. External events currently handled are births, deaths, migration and aging.
So if we want to use the existing algorithms for food mediated diseases (and I think we should to the extend possible) perhaps something like this would work:
1. We create a new type of exchange decorator. The exchange decorator simply says from population P1 and compartment X, create new population members for population P2 in compartment Y using some scaling factor Z. This is generic enough to handle the production of meat from cattle, and the production of infected meat from infected cattle.
2. We extend the list of external events to include a new type, maybe calling it PRODUCTION perhaps. The exchange decorator adds to the list of the delta value calculated for the source (e.g. cattle) an instance of PRODUCTION.
3. In the applyExternalDeltas method, we recognize the PRODUCTION type event, determines (from the exchange decorator itself) how to modify the calculated delta. So a population model for meat would recognize the PRODUCTION external event and so would a disease model for meat.
This is generic enough to handle all kinds of food production, meat, harvesting or chickens laying eggs.
The only thing we can't model is varying the production rates or infectivity (e.g. an infected factory) in each region. The exchange decorator doesn't have any memory (e.g. own labels) to store this information in each node. But there's nothing preventing us from creating labels if needed.
Cheers,
/ Stefan
|
|
| |
Re: Disease model adaption [message #758625 is a reply to message #758609] |
Wed, 23 November 2011 23:07 |
Stefan Edlund Messages: 127 Registered: July 2009 Location: IBM |
Senior Member |
|
|
Hi, sure EXCHANGE might work. Like in exchanging a cow for meat or crop for flour. Exchanging a chicken for eggs however doesn't sounds right . Perhaps there's an even better term, I was thinking production but I'm open to other suggestions.
Actually, now that I think some more about it I believe we only need to add the EXCHANGE to the list in the target, since the target is the only one where the delta is changed (the source is never touched). So when an exchange is detected in the target, we consult the exchange decorator to determine the source to use and create new meat/crop/egg/milk instances from it.
Yes, a trigger could modify the exchange decorator but it would do so globally and not at a regional level. Globally there would always be the same number of products of meat produced from a cow for instance, and the only thing that varies regionally are the number of cows processed / day in a factory.
There's not much changes in your scenario, except I wouldn't assign a location for each exchange decorator. If you have 1000 milk farms in your scenario you wouldn't want to create 1000 exchange decorators cow->milk! But feel free to disagree if you want. I also think the infection from cheese to human could be modeled using a multi-population disease model. Here's how I would try to flesh out more detail to your description with some example numbers:
1: Create three nodes (1= farm, 2= cheese producer, 3=area node)
2: Create four separate populations (cows, milk, cheese, human) each with standard population model, each with "birth" and "death" rate. Initially put 100 cows and 1000 milk in node 1, 1000 milk and 10,000 cheese in node 2 and 10,000 cheese and 100 human in node 3. Set birth/death rate for cows/humans to realistic numbers in your scenario. Set death rate for milk to 1 (the "life expectancy" of milk is one day in the cheese factory), birth rate to 0 in node 2. Similarly set the death rate for cheese to 1 in node 3, birth rate to 0 (all cheese is consumed daily).
3: Create migration edges for milk from node 1 to node 2 and for cheese from node 2 to node 3. The migration rate is 1, ensuring all milk and cheese are transported and consumed daily.
4. Assign specific disease models to each population. SIR for cow, SI for milk. I believe the disease model for human/cheese would be a multi-population SIR, so cheese would be SIR but with 0 recovery rate.
5. Create a specific "exchange decorator" that moves 10 times the count of cows into the count of milk. Create another specific "exchange decorator" that moves 10 times (S+R) of cows into S of milk, and 10 times I of cows into I of milk.
6. Create a specific "exchange decorator" that moves 10 times the count of milk into the count of cheese. Create another specific "exchange decorator" that moves 10 times S of milk into S of cheese, and 10 times I of milk into I of cheese.
7. I believe consumption of contaminated cheese could be modeled using multi-population SIR disease model. There's a mass-action term like the transmission rate becomes consumption rate then the new number of sick cases depends on the number of bad cheese times the number of susceptible humans times the consumption rate. I'm sure this is an oversimplification, but for sure there's no "exchange" going on between cheese and humans as in the other cases.
This is getting pretty complex
Stefan
|
|
|
Re: Disease model adaption [message #758627 is a reply to message #758625] |
Wed, 23 November 2011 23:33 |
Stefan Edlund Messages: 127 Registered: July 2009 Location: IBM |
Senior Member |
|
|
Oh, just one more thing. The disease models for milk and cheese (SI, multi-population SIR models) would be used to model any cross-contamination that might take place in the factories between products of milk (milk to milk) and cheese (cheese to cheese). Transmission rate would be 0 if there no chance of cross-contamination. One limitation is that there's equal chance of cross contamination between cheese in region 2 and 3.
[Updated on: Wed, 23 November 2011 23:38] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Dec 30 14:44:08 GMT 2024
Powered by FUDForum. Page generated in 0.04975 seconds
|