Skip to content

Commit

Permalink
delete: emigration
Browse files Browse the repository at this point in the history
  • Loading branch information
AsPJT committed Jan 15, 2024
1 parent 7a8514b commit 8bbe596
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions Library/PAX_SAPIENTICA/Simulation/Settlement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,24 +449,24 @@ namespace paxs {
/// @brief Emigration.
/// @brief 渡来
void emigration(KanakumaLifeSpan& kanakuma_life_span, std::uint_least64_t& count) noexcept {
if (agents.size() >= 60) {

const std::uint_least8_t set_gender = static_cast<std::uint_least8_t>(gender_dist(*gen));
const std::uint_least32_t set_lifespan = kanakuma_life_span.setAdultLifeSpan(set_gender, *gen);

std::uniform_int_distribution<> lifespan_dist{
(std::min)(18 * SimulationConstants::getInstance()->steps_per_year + 1, static_cast<int>(set_lifespan - 1)),
static_cast<int>(set_lifespan - 1) }; // 性別の乱数分布

agents.emplace_back(Agent(
UniqueIdentification<std::uint_least64_t>::generate(),
0, // TODO: 名前ID
set_gender,
lifespan_dist(*gen),
set_lifespan
));
++count;
}
//if (agents.size() >= 60) {

// const std::uint_least8_t set_gender = static_cast<std::uint_least8_t>(gender_dist(*gen));
// const std::uint_least32_t set_lifespan = kanakuma_life_span.setAdultLifeSpan(set_gender, *gen);

// std::uniform_int_distribution<> lifespan_dist{
// (std::min)(18 * SimulationConstants::getInstance()->steps_per_year + 1, static_cast<int>(set_lifespan - 1)),
// static_cast<int>(set_lifespan - 1) }; // 性別の乱数分布

// agents.emplace_back(Agent(
// UniqueIdentification<std::uint_least64_t>::generate(),
// 0, // TODO: 名前ID
// set_gender,
// lifespan_dist(*gen),
// set_lifespan
// ));
// ++count;
//}
}

/// @brief Age update.
Expand Down

0 comments on commit 8bbe596

Please sign in to comment.