Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Individual Class Reference

The individual agent class. More...

#include <Individual.hpp>

Public Member Functions

 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, char education, char hh_relationship)
 Constructor (initialize every attributes but house, sps status, age and activity chain). More...
 
 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, int age, char education)
 Constructor (initialize every attributes but house, sps status, household relationship status and activity chain). More...
 
 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, char education, char hh_relationship, long house)
 Constructor (initialize every attributes but age, sps status and activity chain). More...
 
 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, int age, char education, char hh_relationship, long house)
 Constructor (initialize every attributes but sps status and activity chain). More...
 
 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, char education, char sps_status, char driving_license, char hh_relationship, long house, std::vector< Activity > act_chain)
 Constructor (initialize every attributes but age). More...
 
 Individual (repast::AgentId id, repast::AgentId hh_id, int municipality, char gender, int age_class, int age, char education, char sps_status, char driving_license, char hh_relationship, long house, std::vector< Activity > act_chain)
 Constructor (initialize every attributes). More...
 
virtual ~Individual ()
 Destructor. More...
 
char getGender () const
 Return individual's gender. More...
 
void setGender (char val)
 Set individual's gender. More...
 
int getAgeClass () const
 Return individual's age class. More...
 
void setAgeClass (int val)
 Set individual's age class. More...
 
int getAge () const
 Return individual's age. More...
 
void setAge (int val)
 Set individual's age. More...
 
int getMunicipality () const
 Return the ins code of individual's municipality. More...
 
void setMunicipality (int val)
 Set individual's muncipality. More...
 
char getEducation () const
 Return individual's education level. More...
 
void setEducation (char val)
 Set individual's education level. More...
 
char getSpsStatus () const
 Return individual's socio-professional status. More...
 
void setSpsStatus (char val)
 Set individual's socio-professional status. More...
 
char getDrivingLicense () const
 Return individual's driving license ownership. More...
 
void setDrivingLicense (char val)
 Set individual's driving license ownership. More...
 
char getHhRelationship () const
 Return individual's household relationship status (head, mate, child, adult). More...
 
void setHhRelationship (char val)
 Set individual's household relationship status (head, mate, child, adult). More...
 
std::vector< ActivitygetActChain () const
 Return individual's activity chain. More...
 
void setActChain (std::vector< Activity > val)
 Set individual's activity chain. More...
 
void addActChain (Activity val)
 Add an activity to individual's activity chain. More...
 
repast::AgentId & getHhId ()
 Return Repast AgentId of the individual's household. More...
 
const repast::AgentId & getHhId () const
 Return Repast AgentId of the individual's household. More...
 
void setHhId (repast::AgentId val)
 Set the Repast AgentId of the individual's household. More...
 
long getHouse () const
 Return the house localization (i.e. a node id, see Network class). More...
 
void setHouse (long val)
 Set individual's house localization (i.e. a node id, see Network class). More...
 
repast::AgentId & getId ()
 Return the individual Repast agent id (required by Repast). More...
 
const repast::AgentId & getId () const
 Return the individual Repast agent id (required by Repast). More...
 
void aging ()
 Incrementing the age of an Individual. More...
 
void initAge ()
 Initialize the age of an Individual. More...
 
bool isDying ()
 Death process. More...
 
bool givingbirth ()
 Determine whether the individual is giving birth to a baby. More...
 
Individual birthInd (long babyId)
 Generate a baby by the individual. More...
 

Private Attributes

repast::AgentId _id
 Individual's Repast::AgentId. More...
 
repast::AgentId _hh_id
 Household's Repast::AgentId. More...
 
int _municipality
 Municipality of the individual. More...
 
char _gender
 Gender of the individual (Male, Female). More...
 
int _age_class
 Age class of the individual. More...
 
int _age
 Actual age of the individual. More...
 
char _education
 Education level (No diploma, Primary school, High School, Master degree). More...
 
char _sps_status
 Socio-professional status. More...
 
char _driving_license
 Driving license ownership. More...
 
char _hh_relationship
 Household status relationship. More...
 
long _house
 Network's node's id of the individual's house. More...
 
std::vector< Activity_act_chain
 Activity chain of the individual. More...
 

Friends

class boost::serialization::access
 

Detailed Description

The individual agent class.

This class implements the individual agents in VirtualBelgium. Each individual is characterized by

  • an individual id of the type repast::AgentId;
  • an household of the type repast::AgentId;
  • a gender;
  • an age class;
  • an education level;
  • a socio-professional status;
  • a driving license ownership;
  • a house;
  • an activity chain.

Constructor & Destructor Documentation

Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
char  education,
char  hh_relationship 
)

Constructor (initialize every attributes but house, sps status, age and activity chain).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
educationan education level
hh_relationshipan household relationship status
Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
int  age,
char  education 
)

Constructor (initialize every attributes but house, sps status, household relationship status and activity chain).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
agethe individual's age
educationan education level
Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
char  education,
char  hh_relationship,
long  house 
)

Constructor (initialize every attributes but age, sps status and activity chain).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
educationan education level
hh_relationshipan household relationship status
housea road network node id
Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
int  age,
char  education,
char  hh_relationship,
long  house 
)

Constructor (initialize every attributes but sps status and activity chain).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
agethe individual's age
educationan education level
hh_relationshipan household relationship status
housea road network node id
Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
char  education,
char  sps_status,
char  driving_license,
char  hh_relationship,
long  house,
std::vector< Activity act_chain 
)

Constructor (initialize every attributes but age).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
educationan education level
sps_statussocio-professional status
driving_licensedriving license ownership
hh_relationshipan household relationship status
housea road network node id
act_chainan activity chain
Individual::Individual ( repast::AgentId  id,
repast::AgentId  hh_id,
int  municipality,
char  gender,
int  age_class,
int  age,
char  education,
char  sps_status,
char  driving_license,
char  hh_relationship,
long  house,
std::vector< Activity act_chain 
)

Constructor (initialize every attributes).

Parameters
ida Repast agent id
hh_idthe individual's household Repast agent id
municipalitythe ins code of the agent's municipality
genderthe gender of the individual
age_classthe age class of the individual
agethe individual's age
educationan education level
sps_statussocio-professional status
driving_licensedriving license ownership
hh_relationshipan household relationship status
housea road network node id
act_chainan activity chain
Individual::~Individual ( )
virtual

Destructor.

Member Function Documentation

void Individual::addActChain ( Activity  val)
inline

Add an activity to individual's activity chain.

Parameters
valan Activity (see Activity class)
void Individual::aging ( )

Incrementing the age of an Individual.

Individual Individual::birthInd ( long  babyId)

Generate a baby by the individual.

std::vector<Activity> Individual::getActChain ( ) const
inline

Return individual's activity chain.

Returns
a vector of Activity objects (see Activity class)
int Individual::getAge ( ) const
inline

Return individual's age.

Returns
an age
int Individual::getAgeClass ( ) const
inline

Return individual's age class.

Returns
an age class
char Individual::getDrivingLicense ( ) const
inline

Return individual's driving license ownership.

Returns
a driving license ownership
char Individual::getEducation ( ) const
inline

Return individual's education level.

Returns
an education level
char Individual::getGender ( ) const
inline

Return individual's gender.

Returns
a gender
repast::AgentId& Individual::getHhId ( )
inline

Return Repast AgentId of the individual's household.

const repast::AgentId& Individual::getHhId ( ) const
inline

Return Repast AgentId of the individual's household.

char Individual::getHhRelationship ( ) const
inline

Return individual's household relationship status (head, mate, child, adult).

Returns
a household relationship status
long Individual::getHouse ( ) const
inline

Return the house localization (i.e. a node id, see Network class).

Returns
a node id
repast::AgentId& Individual::getId ( )
inline

Return the individual Repast agent id (required by Repast).

Returns
the individual Repast agent id
const repast::AgentId& Individual::getId ( ) const
inline

Return the individual Repast agent id (required by Repast).

Returns
the individual Repast agent id
int Individual::getMunicipality ( ) const
inline

Return the ins code of individual's municipality.

Returns
a ins code
char Individual::getSpsStatus ( ) const
inline

Return individual's socio-professional status.

Returns
individual's socio-professional status
bool Individual::givingbirth ( )

Determine whether the individual is giving birth to a baby.

void Individual::initAge ( )

Initialize the age of an Individual.

bool Individual::isDying ( )

Death process.

void Individual::setActChain ( std::vector< Activity val)
inline

Set individual's activity chain.

Parameters
vala vector of Activity objects (see Activity class)
void Individual::setAge ( int  val)
inline

Set individual's age.

Parameters
vala new age
void Individual::setAgeClass ( int  val)
inline

Set individual's age class.

Parameters
vala new age class
void Individual::setDrivingLicense ( char  val)
inline

Set individual's driving license ownership.

Parameters
vala new driving license ownership
void Individual::setEducation ( char  val)
inline

Set individual's education level.

Parameters
vala new education level
void Individual::setGender ( char  val)
inline

Set individual's gender.

Parameters
vala new gender
void Individual::setHhId ( repast::AgentId  val)
inline

Set the Repast AgentId of the individual's household.

Parameters
vala Repast AgentId designing an household
void Individual::setHhRelationship ( char  val)
inline

Set individual's household relationship status (head, mate, child, adult).

Parameters
vala household relationship status
void Individual::setHouse ( long  val)
inline

Set individual's house localization (i.e. a node id, see Network class).

Parameters
vala node id
void Individual::setMunicipality ( int  val)
inline

Set individual's muncipality.

Parameters
vala new municipality ins code
void Individual::setSpsStatus ( char  val)
inline

Set individual's socio-professional status.

Parameters
vala new socio-professional status

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Member Data Documentation

std::vector<Activity> Individual::_act_chain
private

Activity chain of the individual.

int Individual::_age
private

Actual age of the individual.

int Individual::_age_class
private

Age class of the individual.

char Individual::_driving_license
private

Driving license ownership.

char Individual::_education
private

Education level (No diploma, Primary school, High School, Master degree).

char Individual::_gender
private

Gender of the individual (Male, Female).

repast::AgentId Individual::_hh_id
private

Household's Repast::AgentId.

char Individual::_hh_relationship
private

Household status relationship.

long Individual::_house
private

Network's node's id of the individual's house.

repast::AgentId Individual::_id
private

Individual's Repast::AgentId.

int Individual::_municipality
private

Municipality of the individual.

char Individual::_sps_status
private

Socio-professional status.


The documentation for this class was generated from the following files: