Agents in Social Science
101
{
double new_pos=position;
if(position >= LANDSCAPE)
{
new_pos =LANDSCAPE -(position-LANDSCAPE);
}
else if(position<0)
{
new_pos=new_pos*(-1);
}
else
{
printf("value is %f", new_pos);
}
return new_pos;
}
/**Citizen Agent functions file containing its actions**/
#include "header.h"
#include "my_library_header.h"
#include "Citizen_agent_header.h"
//Function to handle agent placement as a 2x2 Grid
double sec_handle_boundary(double position)
{
double new_pos=position;
if(position >= LANDSCAPE)
{
new_pos =LANDSCAPE -(position-LANDSCAPE);
}
else if(position<0)
{
new_pos=new_pos*(-1);
}
else
{
print("Possible check");
}
return new_pos;
}
int Citizen_post_location()
{
add_citizen_location_message(ID, X, Y, SCENE_ID);
return 0;
}
101
{
double new_pos=position;
if(position >= LANDSCAPE)
{
new_pos =LANDSCAPE -(position-LANDSCAPE);
}
else if(position<0)
{
new_pos=new_pos*(-1);
}
else
{
printf("value is %f", new_pos);
}
return new_pos;
}
/**Citizen Agent functions file containing its actions**/
#include "header.h"
#include "my_library_header.h"
#include "Citizen_agent_header.h"
//Function to handle agent placement as a 2x2 Grid
double sec_handle_boundary(double position)
{
double new_pos=position;
if(position >= LANDSCAPE)
{
new_pos =LANDSCAPE -(position-LANDSCAPE);
}
else if(position<0)
{
new_pos=new_pos*(-1);
}
else
{
print("Possible check");
}
return new_pos;
}
int Citizen_post_location()
{
add_citizen_location_message(ID, X, Y, SCENE_ID);
return 0;
}
