Difference between revisions of "Blood type"
(→Model) |
(→Interface) |
||
Line 68: | Line 68: | ||
===Sliders=== | ===Sliders=== | ||
[[File:sliders_xmacm45.png]] | [[File:sliders_xmacm45.png]] | ||
− | * | + | *'''men-count:''' user is choosing initial number of men |
− | * | + | *'''women-count:''' user is choosing initial number of women |
− | * | + | *'''reproduce-probability:''' user choose probability of born child, when man and woman meets |
− | * | + | *'''man-born-probability:''' user choose preference of ratio new-born men/women |
− | * | + | *'''women-max-children:''' choosing maximal number of children women could give birth to |
− | * | + | *'''average-age-ticks:''' choosing of average age |
===Input boxes=== | ===Input boxes=== | ||
[[File:input-box_xmacm45.png]] | [[File:input-box_xmacm45.png]] | ||
− | * | + | *'''man-child-from:''' user write down the minimal age range when man could have a child |
− | * | + | *'''man-child-to:''' user write down the maximal age range when man could have a child |
− | * | + | *'''woman-child-from:''' user write down the minimal age range when woman could have a child |
− | * | + | *'''woman-child-to:''' user write down the maximal age range when woman could have a child |
===Buttons=== | ===Buttons=== | ||
[[File:buttons_xmacm45.PNG]] | [[File:buttons_xmacm45.PNG]] |
Revision as of 22:33, 13 January 2013
This page contains a research report representing semestral project for 4IT495 Simulation of Systems class (WS 2012/2013).
- Project name: Blood type
- Class: 4IT495 Simulation of Systems (WS 2012/2013)
- Author: Marta Machová
- Model type: Agent-based simulation
- Software used: NetLogo 5.0.1
Problem definition
Importance of blood group system
Blood type is property of blood, that is most important for blood donation. The exact blood group of recipient need the same blood group or group, that is acceptable. Its the reason, why number of each blood group representatives is so important information for transfusion department. Transfusion can save ones life it can also kill, when is incompatible group given to recipient.
Another important reason why to explore blood group is, that it says ways of migration of human tribes because blood group was evolving in time, the first was established the "0" type without any antigens (antibody generator) and in evolution of human race was developing according to changing of enviromental conditions. So its important also for anthropology because it answer few questions of human (or race) origin.
The way of formation blood type
The type of blood is inherited by parents. But child don't inherits blood group from one of parents, but in fact, it interits one of allele from mother and one of allele from father. Two alleles together give rice to exact group. The blood-type-creation principle is shown in model.
Method
In model, there is used the method of multi-agent simulation. The reason of this choice is, that each agent have some properties and behavior, that makes the system very complex and hard to describe upper-level behavior. So multiagent simulation is suitable because of unpreddictable global progress.
Model
Agents
Dynamics of model is based on actions of two kinds of "Turtle" agent. Man and woman.
Man
Properties:
- name: Man
- shape: person
- colour: blue
- label: blood type
- paremetres: first and second allele, blood type, father, mother, age, max-age
Woman
Properties:
- name: woman
- shape: person
- colour: red
- label: blood type
- paremetres: first and second allele, blood type, father, mother, age, max-age, children (number of children)
Procedure
Setup
- is all cleared and reset number of ticks
- all the alleles are set to one of type: A, B, 0
- is created number of men and women that user chosen (on sliders)
- to men and women is set the default colour, women are set the number of children = 0
- all agent are given the default shape and the two allele, the blood type is computed
- age is set to 0 and maximal age is set by choice of user
Go
- all turtles are moving radomly
- men are calling procedure reproduce
- each tick increase the age of all the turtles
- each tick are dieing turtles, that are older or same aged as parameter max-age
Computing of blood type
There is 9 possible combinations of alleles: 00, 0A, A0, 0B, B0, AA, BB, AB, BA that are divided into 4 blood type:
- 0: first and second alleles are 0, the chance of creating 0 blood type is 1/9
- A: possible combinations: A0, 0A, AA, the chance of creating A blood type is 3/9
- B: possible combinations: B0, 0B, BB, the chance of creating B blood type is 3/9
- AB: first and second alleles have to be AB or BA, chance is 2/9
Reproduction
- if man find woman on the same patch and
- the woman is at reproductive age
Interface
Sliders
- men-count: user is choosing initial number of men
- women-count: user is choosing initial number of women
- reproduce-probability: user choose probability of born child, when man and woman meets
- man-born-probability: user choose preference of ratio new-born men/women
- women-max-children: choosing maximal number of children women could give birth to
- average-age-ticks: choosing of average age
Input boxes
- man-child-from: user write down the minimal age range when man could have a child
- man-child-to: user write down the maximal age range when man could have a child
- woman-child-from: user write down the minimal age range when woman could have a child
- woman-child-to: user write down the maximal age range when woman could have a child