-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
103 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
key value ja-JP | ||
---------- Time ---------- 時間 -------------------------------------------------- | ||
start_julian_day 1319309 シミュレーション開始日(ユリウス日) | ||
area honsyu シミュレーションの対象範囲 | ||
unit_group_min 11 単位集団の最小人数 | ||
unit_group_max 40 単位集団の最大人数 | ||
basic_group_min 41 基礎集団の最小人数 | ||
basic_group_max 240 基礎集団の最大人数 | ||
composite_settlement_min 82 複合集落の最小人数 | ||
steps_per_year 12 1年あたりのステップ数 | ||
female 0 女性 | ||
male 1 男性 | ||
female_marriageable_age_min 13 女性の最小結婚可能年齢(歳) | ||
male_marriageable_age_min 17 男性の最小結婚可能年齢(歳) | ||
female_marriageable_age_max 60 女性の最大結婚可能年齢(歳) | ||
male_marriageable_age_max 70 男性の最大結婚可能年齢(歳) | ||
---------- Space ---------- 空間 -------------------------------------------------- | ||
area honsyu シミュレーションの対象範囲 | ||
grid_length 512 集落をグループ分けする際の1グリッド辺の長さ | ||
---------- Marriage ---------- 婚姻 -------------------------------------------------- | ||
marriage_search_range 320 結婚時に近くの集落からエージェントを探す際の探索距離 | ||
female_marriageable_age_min 13 女性の最小婚姻可能年齢(歳) | ||
male_marriageable_age_min 17 男性の最小婚姻可能年齢(歳) | ||
female_marriageable_age_max 60 女性の最大婚姻可能年齢(歳) | ||
male_marriageable_age_max 70 男性の最大婚姻可能年齢(歳) | ||
birthable_age_min 15 出産の最小可能年齢(歳) | ||
birthable_age_max 50 出産の最大可能年齢(歳) | ||
---------- Childbirth ---------- 出産 -------------------------------------------------- | ||
birth_interval 10 出産の間隔:10ヶ月(Step) | ||
marriage_search_range 320 結婚時に近くの集落からエージェントを探す際の探索距離 | ||
grid_length 512 集落をグループ分けする際の1グリッド辺の長さ | ||
stillbirth_rate 0.16 死産率 | ||
child_agriculture_priority 0.7 片親が農耕文化を持ち、もう一方の片親が農耕文化を持たない時の農耕文化継承の優先度 | ||
---------- Movement ---------- 移動 -------------------------------------------------- | ||
max_settlement_population 80 集落の最大人数(人) | ||
min_move_distance 10 最小移動距離 | ||
max_move_distance 800 最大移動距離 | ||
min_move_probability 1 移動確率下限 | ||
max_move_probability 10 移動確率上限 | ||
move_probability_normalization_coefficient 1000 移動確率の正規化係数 | ||
child_agriculture_priority 0.7 片親が農耕文化を持ち、もう一方の片親が農耕文化を持たない時の農耕文化継承の優先度 | ||
stillbirth_rate 0.16 死産率 | ||
move_probability_normalization_coefficient 1000 移動確率の正規化係数 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
|
@@ -47,52 +47,52 @@ namespace paxs { | |
|
||
/// @brief 英語未翻訳 | ||
/// @brief 寿命を決定する | ||
std::uint_least32_t setAdultLifeSpan(const std::uint_least8_t gender_, std::mt19937& gen) { | ||
AgeType setAdultLifeSpan(const std::uint_least8_t gender_, std::mt19937& gen) { | ||
// もし大人だったら | ||
if (gender_ == 0) { // 女性の場合 | ||
const std::uint_least32_t adult_type = static_cast<std::uint_least32_t>(life_male_adult_num(gen)); | ||
const AgeType adult_type = static_cast<AgeType>(life_male_adult_num(gen)); | ||
|
||
if (adult_type <= 14) { // 成年 | ||
return static_cast<std::uint_least32_t>(life_adult_exp_dist(gen)); | ||
return static_cast<AgeType>(life_adult_exp_dist(gen)); | ||
} | ||
else if (adult_type <= (14 + 26)) { // 熟年 | ||
return static_cast<std::uint_least32_t>(life_mature_exp_dist(gen)); | ||
return static_cast<AgeType>(life_mature_exp_dist(gen)); | ||
} | ||
// 老年 | ||
return static_cast<std::uint_least32_t>(life_older_exp_dist(gen)); | ||
return static_cast<AgeType>(life_older_exp_dist(gen)); | ||
} | ||
else if (gender_ == 1) { // 男性の場合 | ||
const std::uint_least32_t adult_type = static_cast<std::uint_least32_t>(life_female_adult_num(gen)); | ||
const AgeType adult_type = static_cast<AgeType>(life_female_adult_num(gen)); | ||
|
||
if (adult_type <= 19) { // 成年 | ||
return static_cast<std::uint_least32_t>(life_adult_exp_dist(gen)); | ||
return static_cast<AgeType>(life_adult_exp_dist(gen)); | ||
} | ||
else if (adult_type <= (19 + 19)) { // 熟年 | ||
return static_cast<std::uint_least32_t>(life_mature_exp_dist(gen)); | ||
return static_cast<AgeType>(life_mature_exp_dist(gen)); | ||
} | ||
} | ||
// 老年 | ||
return static_cast<std::uint_least32_t>(life_older_exp_dist(gen)); | ||
return static_cast<AgeType>(life_older_exp_dist(gen)); | ||
} | ||
|
||
/// @brief 英語未翻訳 | ||
/// @brief 寿命を決定する | ||
std::uint_least32_t setLifeSpan(const std::uint_least8_t gender_, std::mt19937& gen) { | ||
AgeType setLifeSpan(const std::uint_least8_t gender_, std::mt19937& gen) { | ||
|
||
if (life_person_num(gen) <= 37) { // もし子供だったら | ||
const std::uint_least32_t child_type = static_cast<std::uint_least32_t>(life_child_num(gen)); | ||
const AgeType child_type = static_cast<AgeType>(life_child_num(gen)); | ||
|
||
if (child_type <= 6) { // 乳児 | ||
return static_cast<std::uint_least32_t>(life_infant_exp_dist(gen)); | ||
return static_cast<AgeType>(life_infant_exp_dist(gen)); | ||
} | ||
else if (child_type <= (6 + 22)) { // 幼児 | ||
return static_cast<std::uint_least32_t>(life_toddler_exp_dist(gen)); | ||
return static_cast<AgeType>(life_toddler_exp_dist(gen)); | ||
} | ||
else if (child_type <= (6 + 22 + 5)) { // 小児 | ||
return static_cast<std::uint_least32_t>(life_child_exp_dist(gen)); | ||
return static_cast<AgeType>(life_child_exp_dist(gen)); | ||
} | ||
// 若年 | ||
return static_cast<std::uint_least32_t>(life_young_exp_dist(gen)); | ||
return static_cast<AgeType>(life_young_exp_dist(gen)); | ||
} | ||
// もし大人だったら | ||
return setAdultLifeSpan(gender_, gen); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.