230
X-Machines for Agent-Based Modeling: FLAME Perspectives

cell_tot_msg

inttotal_cells




#include "header.h"
#include "Cell_agent_header.h"
#include "library_header.h"
/* add a state change
1) normal cells grow set state change quite low for A B any cell
can mutate to a,b,normal, a+b
*/
/* Cell functions */
int cell_here()
{
add_im_here_message(MYID, MCAT, XPOS, YPOS);
return 0;
}
int cell_divide()
{
double cells_total=0;
cell_tot_msg_message=get_first_cell_tot_msg_message();
while(cell_tot_msg_message)
{
cells_total=cell_tot_msg_message->total_cells;
cell_tot_msg_message = get_next_cell_tot_msg_message(cell_tot_msg_message);
}
double temp=0.0;
double temp2=0.0;
double c =(double)rand()/(double)RAND_MAX*5;
double d=(double)rand()/(double)RAND_MAX*5;
temp=random_double(0.0,1.0);
double e =(double)rand()/(double)RAND_MAX*100;
double current_population=0.0, pop_max=0.0;
pop_max=2500;
current_population=cells_total;
double fraction=0.0;
fraction=current_population/pop_max;
double fraction2=0.0;
fraction2=(1-fraction)*cell_division_rate;
if(temp {
Précédent

- 259/329

Suivant