Friday, September 16, 2011

Build a numerical simulation in medicine and biology. Part Two.

Boids simulation, feeding time ;-)
                 The subject of a topic is a hybrid simulation, consisting of objects moving in the environment, based on pheromone secreted by themselves to find the source of food. Area where the object take part is a virtual grid and the spatial coordinates of objects are projected onto the cell array. An array is used to operate on concentrations and gradients of pheromone and storing data for each iteration cycle. I called the simulation “hybrid”, because it combines computing the data with an array and projection on the graphics window in which the agents actually live. 
                Agents systems are characterized by large amounts, typically primitive objects, which themselves would not be able to perform its complex functions. Only the communication in the group provides a higher degree of complexity. An example of this method of interaction is the anthill and termitary. Chemical communication between insects is composed of many substances and its combinations, according to events essential in survival. Chemicals marked routes, obstacles, sources of food, and many others. Agents developed a variable half time of chemical signals, thus, decompose and diffusion in a specific rate, optimizing the performance of the tasks for which they are intended. 
                Not renewing chemical paths disappear after some time, as is the case with the determination of dangerous places and food sources. This allows dynamic conversions, corresponding to the current and past situations. Stimulus intensity is associated in nature with receptor saturation, which takes a finite number of states and is of characteristic kinetics. It is a model of how to determine the shorter path through the strengthening of the chemical. 
                Calculations of this type using computer require discretization, thus determining the spatial resolution. The higher it is, the higher the computational cost, growing with the second power in two-dimensional model in the case. 
Construction of  algorithms associated with the project, should base on software engineering methods. I am so far remained loyal to procedural programming, because I am not obliged to modularity so important when developing complex applications. Methods implemented should include array calculations: diffusion, gradient determination, which can be implemented using proper convolution kernels or directly. In addition, the important functions are the projection of each agent position coordinates on the arrays, allowing agents to access chemical data of area they occupy. The functions dealing with user interface and drawing graphics belong to other, essential elements. 
                The behavior of individual agents should be created according to accepted rules, and  constants chosen experimentally, or drawing from nature. In this case, the key is the movement of objects, which should be the sum of random motion and directional-dependent gradient of pheromone and receptor saturation. This allows for a spontaneous grouping of objects and interaction. As soon as you lose the target, group begins to move randomly. The first agent, who sees the next target, releases the pheromone, focusing rest of the group. The right extinction constant of pheromone diffusion, allows for modeling the behavior of many real world species.  The next steps of this type of simulation may be to add a finite supply of energy for individuals, and reproduction, which would allow the observation of population dynamics in conditions of limited food supply. However, these requires a change to more efficient programming language. An example might be C + +. 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...