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
 Lets the person make a decision.
virtual int getAge () const
 Provides the age of the person.
int getSchoolClosing ()
AGPosition getSchoolLocation ()
int getSchoolOpeining ()
bool haveASchool ()
bool leaveSchool ()
void print ()
virtual void print () const
 Puts out a summary of the class properties.
bool setSchool (AGSchool *school)

Protected Attributes

int age

Private Attributes

AGSchoolschool

Detailed Description

Definition at line 47 of file AGChild.h.


Constructor & Destructor Documentation

AGChild::AGChild ( int  age) [inline]

Definition at line 49 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 64 of file AGChild.cpp.

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

bool AGPerson::decide ( SUMOReal  probability) const [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 72 of file AGPerson.cpp.

References RandHelper::rand().

Referenced by AGAdult::tryToWork().

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

Provides the age of the person.

Returns:
the age in years

Definition at line 65 of file AGPerson.cpp.

References AGPerson::age.

Definition at line 105 of file AGChild.cpp.

References AGSchool::getClosingHour(), and school.

Definition at line 100 of file AGChild.cpp.

References AGSchool::getPosition(), and school.

Definition at line 110 of file AGChild.cpp.

References AGSchool::getOpeningHour(), and school.

Definition at line 92 of file AGChild.cpp.

References school.

Returns:
if the child is now without any school

Definition at line 82 of file AGChild.cpp.

References AGSchool::removeChild(), and school.

void AGChild::print ( )

Definition at line 47 of file AGChild.cpp.

References AGPerson::age, and school.

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

Puts out a summary of the class properties.

Reimplemented in AGAdult.

Definition at line 58 of file AGPerson.cpp.

References AGPerson::age.

Definition at line 52 of file AGChild.cpp.

References AGSchool::addNewChild(), and school.

Referenced by alocateASchool().


Field Documentation

int AGPerson::age [protected, inherited]

Definition at line 72 of file AGPerson.h.

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


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