/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2010-2025 German Aerospace Center (DLR) and others.3// activitygen module4// Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file AGPerson.cpp16/// @author Piotr Woznica17/// @author Walter Bamberger18/// @author Daniel Krajzewicz19/// @author Michael Behrisch20/// @date July 201021///22// Parent object of every person, contains age and any natural characteristic23/****************************************************************************/24#include <config.h>2526#include "AGPerson.h"27#include <utils/common/RandHelper.h>28#include <iostream>293031// ===========================================================================32// method definitions33// ===========================================================================34AGPerson::AGPerson(int age) : age(age) {}353637AGPerson::~AGPerson() {}383940void41AGPerson::print() const {42std::cout << "- Person: Age=" << age << std::endl;43}444546int47AGPerson::getAge() const {48return age;49}505152bool53AGPerson::decide(double proba) const {54return (RandHelper::rand(1000) < static_cast<int>(1000.0f * proba));55}565758/****************************************************************************/596061