192
X-Machines for Agent-Based Modeling: FLAME Perspectives
}
protein_location_message=get_next_protein_location_message
(protein_location_message);
}
NUMBEROFPROTEINS=protein_ct;
printf("\nMY proteins %d , %d", ID, NUMBEROFPROTEINS);
add_proteinnumber_compartment_message(ID,NUMBEROFPROTEINS);
return 0;
}
/**** Protein Agent Functions***/
int Protein_post_details()
{
add_protein_location_message(ID, X,Y, COMPARTMENT_ID);
return 0;
}
int Protein_decay()//reduce life of protein
{
if(LIFE<=DIE)
{
printf("KILL PROTEIN******");
return 1;
}
return 0;
}
int Protein_calculate_movement()
{
int next_id,before_id;
double temp_prob=0.0;
int temp_time=0;
int now=0;
int protein_next,protein_before;
int flag_before=0;
int flag_next=0;
int my_compartment=0;
temp_prob=random_double(0.0,1.0);
temp_time=random_int(1,10);
now=temp_time+TIME_LAST_MOVE;
protein_before=0;
protein_next=0;
flag_before=0;
flag_next=0;
if(COMPARTMENT_ID==1)
{
flag_before=1;
}
if(COMPARTMENT_ID==100)
{
flag_next=1;
}
Précédent

- 221/329

Suivant