49 std::cout <<
"- Child: Age=" <<
age <<
" School=" <<
school << std::endl;
66 SUMOReal minDist = std::numeric_limits<SUMOReal>::infinity();
68 if (schools->size() == 0) {
71 std::list<AGSchool>::iterator it;
73 for (it = schools->begin(); it != schools->end(); ++it) {
74 if (it->acceptThisAge(
age) && it->getPlaces() > 0 && housePos.
distanceTo(it->getPosition()) < minDist) {
75 minDist = housePos.
distanceTo(it->getPosition());
A location in the 2D plane freely positioned on a street.
AGPosition getSchoolLocation() const
bool setSchool(AGSchool *school)
bool allocateASchool(std::list< AGSchool > *schools, AGPosition housePos)
int getSchoolClosing() const
SUMOReal distanceTo(const AGPosition &otherPos) const
Computes the distance between two AGPosition objects.
int getSchoolOpening() const