Agents in Biology
231
if(e<25)
{
add_Cell_agent(1000,MCAT,XPOS+c,YPOS+d, ZPOS,10);
}
else if(e<50)
{
add_Cell_agent(1000,MCAT,XPOS+c,YPOS-d, ZPOS,10);
}
else if(e<75)
{
add_Cell_agent(1000,MCAT,XPOS-c,YPOS+d, ZPOS,10);
}
else
{
add_Cell_agent(1000,MCAT,XPOS-c,YPOS-d, ZPOS,10);
}
}
temp=random_double(0.0,1.0);
temp2=random_double(0.0,1.0);
if(temp<0.01)
{
if(MCAT==3)
{
if(temp2<0.01)
{
MCAT=3;
}
else if(temp2<0.51)
{
MCAT=2;
}
else
{
MCAT=1;
}
}
if((MCAT==1)||(MCAT==2))
{
if(temp2<0.01)
{
MCAT=0;
printf("ZERO is PRODUCED!");
}
}
}
return 0;
}
int cell_check_drugs()
{
int closest_drug_a_id = -1;
int closest_drug_b_id = -1;
double shortest_distance = 9999.0;
double current_distance_squared;
double drugx, drugy;
double theta;
231
if(e<25)
{
add_Cell_agent(1000,MCAT,XPOS+c,YPOS+d, ZPOS,10);
}
else if(e<50)
{
add_Cell_agent(1000,MCAT,XPOS+c,YPOS-d, ZPOS,10);
}
else if(e<75)
{
add_Cell_agent(1000,MCAT,XPOS-c,YPOS+d, ZPOS,10);
}
else
{
add_Cell_agent(1000,MCAT,XPOS-c,YPOS-d, ZPOS,10);
}
}
temp=random_double(0.0,1.0);
temp2=random_double(0.0,1.0);
if(temp<0.01)
{
if(MCAT==3)
{
if(temp2<0.01)
{
MCAT=3;
}
else if(temp2<0.51)
{
MCAT=2;
}
else
{
MCAT=1;
}
}
if((MCAT==1)||(MCAT==2))
{
if(temp2<0.01)
{
MCAT=0;
printf("ZERO is PRODUCED!");
}
}
}
return 0;
}
int cell_check_drugs()
{
int closest_drug_a_id = -1;
int closest_drug_b_id = -1;
double shortest_distance = 9999.0;
double current_distance_squared;
double drugx, drugy;
double theta;
