void AGHousehold::generateCars(SUMOReal rate) { int peopleInNeed = static_cast<int>(adults.size()) - static_cast<int>(cars.size()); while (peopleInNeed > 0) { if (decisionProba(rate)) { addACar(); } --peopleInNeed; } }
void AGHousehold::generateCars(SUMOReal rate) { int peopleInNeed = static_cast<int>(myAdults.size()) - static_cast<int>(myCars.size()); while (peopleInNeed > 0) { if (RandHelper::rand() < rate) { addACar(); } --peopleInNeed; } }