【发布时间】:2019-04-27 07:20:17
【问题描述】:
在此模型中,如果满足某些条件,农民将投资于他们的生产率 (RoP)。如果满足其他条件,他们会投资于他们的生活标准 (SoL)。
目前,这是通过每个时间步的 To Invest 过程中的多个 if 语句来执行的。
我怎样才能使行动方案永久化。例如,如果第 2 阶段的第一个农场满足投资 RoP 的条件,则该农场应该在随后的每个时间步继续这样做,在第 3 阶段没有选择投资于 SoL。如何使此操作永久化?
to invest
let p random 100
set excess-prev-tick farm-excess
if ( farm-excess > 0 and p <= 30 ) [
set farm-RoP ( farm-RoP + farm-excess )]
if ( farm-excess > 0 and p > 30 and SoL < SoL-max ) [
set SoL ( SoL + 0.1 )]
if ( farm-excess > 0 and p > 30 ) [
set farm-RoC ( farm-RoC + ( count patches in-radius farm-size * 2 ))]
if farm-excess < 0 and SoL >= SoL-min [
set SoL ( SoL - 0.05) ]
set farm-excess (farm-ROP - farm-RoC)
set RoExp ((farm-excess - excess-prev-tick) / (excess-prev-tick))
end
【问题讨论】:
标签: simulation netlogo