SUMO - Simulation of Urban MObility

AGChild Class Reference

#include <AGChild.h>

Inheritance diagram for AGChild:
AGPerson

Public Member Functions

 AGChild (int age)
bool alocateASchool (std::list< AGSchool > *schools, AGPosition housePos)
virtual bool decide (SUMOReal probability) const throw ()
 Lets the person make a decision.
virtual int getAge () const throw ()
 Provides the age of the person.
int getSchoolClosing ()
AGPosition getSchoolLocation ()
int getSchoolOpeining ()
bool haveASchool ()
bool leaveSchool ()
void print ()
virtual void print () const throw ()
 Puts out a summary of the class properties.
bool setSchool (AGSchool *school)

Protected Attributes

int age

Private Attributes

AGSchool * school

Detailed Description

Definition at line 44 of file AGChild.h.


Constructor & Destructor Documentation

AGChild::AGChild ( int  age) [inline]

Definition at line 46 of file AGChild.h.


Member Function Documentation

bool AGChild::alocateASchool ( std::list< AGSchool > *  schools,
AGPosition  housePos 
)
Parameters:
schools,:school vector from City object
housepos,:Position of the households habitation
Returns:
if a school was found corresponding to the child's age.

Definition at line 60 of file AGChild.cpp.

References AGPerson::age, AGPosition::distanceTo(), setSchool(), and SUMOReal.

bool AGPerson::decide ( SUMOReal  probability) const throw () [virtual, inherited]

Lets the person make a decision.

The higher the degree of belief is, the more likely this method returns true.

Parameters:
[in]degreeOfBeliefhow strong the person beliefs the proposition
Returns:
whether the person agrees with the proposition

Definition at line 69 of file AGPerson.cpp.

References RandHelper::rand().

int AGPerson::getAge ( ) const throw () [virtual, inherited]

Provides the age of the person.

Returns:
the age in years

Definition at line 62 of file AGPerson.cpp.

int AGChild::getSchoolClosing ( )

Definition at line 101 of file AGChild.cpp.

References AGSchool::getClosingHour(), and school.

AGPosition AGChild::getSchoolLocation ( )

Definition at line 96 of file AGChild.cpp.

References AGSchool::getPosition(), and school.

int AGChild::getSchoolOpeining ( )

Definition at line 106 of file AGChild.cpp.

References AGSchool::getOpeningHour(), and school.

bool AGChild::haveASchool ( )

Definition at line 88 of file AGChild.cpp.

References school.

bool AGChild::leaveSchool ( )
Returns:
if the child is now without any school

Definition at line 78 of file AGChild.cpp.

References AGSchool::removeChild(), and school.

void AGPerson::print ( ) const throw () [virtual, inherited]

Puts out a summary of the class properties.

Reimplemented in AGAdult.

Definition at line 55 of file AGPerson.cpp.

void AGChild::print ( )

Definition at line 43 of file AGChild.cpp.

References AGPerson::age, and school.

bool AGChild::setSchool ( AGSchool *  school)

Definition at line 48 of file AGChild.cpp.

References AGSchool::addNewChild(), and school.

Referenced by alocateASchool().


Field Documentation

int AGPerson::age [protected, inherited]

Definition at line 69 of file AGPerson.h.

Referenced by alocateASchool(), print(), and AGAdult::print().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines