【发布时间】:2019-09-02 10:02:35
【问题描述】:
我正在尝试通过根据收入(公司自有)为它们分配不同的规模来在一个行业(世界)中建立公司(海龟)。小型、中型和大型之间的区别应取决于收入占总收入的百分比。
更具体地说,根据他们的收入,我希望收入最低 30% 的公司规模为 0.5,中等收入 60% 的公司规模为 1,收入最高 10% 的公司规模为大小为 1.5。 到目前为止,我有:
breed [ firms firm ]
firms-own [
income
]
to setup
create-firms number-of-firms [ ;; number of firms to be defined through slider
set income random 100
if income = "low" [ set size 0.5 ] ;; firms with low output are of a small size
if income = "medium" [ set size 1 ] ;; firms with medium output are of a medium size
if income = "high" [ set size 1.5 ] ;; firms with high output are of a large size
end
我知道代码不起作用,因为我没有告诉公司何时将他们的公司自有设置为“低”、“中”或“高”。但我不知道如何让他们按总收入的百分比来设置。
感谢您的意见!
【问题讨论】:
标签: math netlogo percentage agent-based-modeling economics