Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stem-dev] Food Production

Thanks for all the suggestions.

First I would like to explain why I prefer to model consumption with a
TransformationDecorator. For the scenarios Matthias and I want to create
integration is not a priority. The most important thing is to able to
model the food consumption in any way you want. And with the
FoodConsumer class it's easy to model many different things. Let's say
we have data that a certain amount of beef is consumed daily in a
certain region. In that case I can just set the daily consumption to a
fixed number. I can also set consumption to a fraction (such as 20% of
the whole beef is consumed daily) or I make it dependent on the size of
the human population in the region. Stefan's idea of a
FoodPopulationModel is great for modeling a consumption, that is uniform
in the whole world. FoodConsumers can be different in different regions.
I don't know yet if we will use this feature in our scenarios, but it's
an advantage, that a FoodConsumer can be used to model many different

Nevertheless, making consumption and other TransformationDecorators
integrable is of course desirable. I like the idea with the
integrable-flag and I think the extra-complexity for the user is not
such a big deal. We could put a warning next to the checkbox, "Only use
this if you know what you are doing". Of course performance is a
downside and it might be difficult to implement, especially in Stefan's

Best Regards,

>>> James Kaufman  01/13/12 7:28 PM >>>
I think the only question issue arrises if you need the FoodConsumer to
The transformation decorator was designed to handle transformations that

are by definition not integrable
but food consumption might be. 

Here is one other thought (but one with big downsides).
Stefan suggested you use multipopulation model to handle consumption.
A food consumption decorator could store a MAP which knows at what rate 
different populations consume different foods.
We probably want to handle consumption of feed by farm animals as well
consumption of food by humans.
If the foodconsumption decorator does not do the but simply stores the 
rates, then the population models could handle the decay
in an integrable way (because population models are integration 
decorators). The thing I do not like about this idea is it then makes
population models more complex and I wanted to hide the complexity of
transformation in a separate transformation decorator.

A second thought (also with downsides) is to give the transformation 
decorator a flag to indicate whether or not the transformation is
an integrable transformation. We would then have to group any 
transformation decorators by integrability and so we call transform at

right point in the iteration cycle. This also has bid disadvantages 
(performance hit as a well as a lot of complexity for the users - they 
need to
understand if the transformer can be integrable).

The best approach may be Stefans suggestion. What if we extend multi 
population model to a new class called "Food" or "Food Population".
This could have different states, death=expiration, and it could store 
map=Consumers with their consumption rate. This might also be 
better representation of reality since consumption is not really 
transformation. Consumption is integrable. Food production is not.

Best Regards,

IBM Almaden Research Center, 650 Harry Rd.
San Jose, CA 95120-6099
email: kaufman@xxxxxxxxxxxxxxx
phone: (408) 927-2477  (tie 457-2477)

"Thoens Christian" 
01/13/2012 03:04 AM
[stem-dev] Hi all,
Sent by:

Hi all,

I would like to make some changes to the foodproduction plugin. A class
that allows consumption of food and disease transmission by consumption
should be created. My proposal for this is as follows.

abstract base class "FoodTransformer" (or maybe "FoodProcessor", since
consumption does not transform food?)

a child of "FoodTransformer" called "FoodProducer" (maybe abstract?):
same functionality as the old class "FoodProducer"

a child of "FoodProducer" called "DiseaseCarryingFoodProducer" (or
maybe "Slaughterhouse"?): same functionality as the old class

a child of "FoodTransformer" called "FoodConsumer": provides
consumption of food and disease transmission by consumption

Does anyone have any suggestions for improvements?

stem-dev mailing list

Back to the top