⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jonnywalker-3.6.nlogo

📁 NETLOGO
💻 NLOGO
📖 第 1 页 / 共 5 页
字号:
breeds[johnnywalker]globals[clock total-johnnywalker j-walkability kind-of-walker period-num Gate-A Gate-B Gate-C Gate-D Gate-E gatea gateb gatec gated gateegate-max-a gate-max-b gate-max-c gate-max-d gate-max-e origin destination o-b-num o-y-num o-v-num o-br-num o-s-num o-g-num o-r-num o-o-numd-b-num d-y-num d-v-num d-br-num d-s-num d-g-num d-r-num d-o-numb-arrived y-arrived v-arrived br-arrived s-arrived g-arrived r-arrived o-arrived]patches-own[building-walkability walkability tnj nj diamdegree isoarea att att1 att2 att3 att4 att5 att6 att7 att8]turtles-own[ current-heading initial-heading od origin-point playtime max-staytime staytime ccc]to setup  ca  set clock 0  set j-walkability 10  setup-kind-of-walker  if kind-of-walker = "Explorer"[  setup-period  setup-explorer  ]  if kind-of-walker = "Pathfinder"[  intial-o-num  setup-origin  setup-destination  ]  setup-patch  setup-diamdegree  setup-isoarea  setup-att  setup-gate  end  to setup-kind-of-walker   set kind-of-walker user-choice "Choose Explorer or Pathfinder"["Explorer" "Pathfinder"]  end  to setup-period    set period-num user-choice "Choose Period" [ "11:00-13:00" "13:00-15:00" "15:00-17:00" "17:00-19:00" "19:00-21:00"]      if period-num = "11:00-13:00"[set a-num 14  set b-num 3  set c-num 1  set d-num 2]       if period-num = "13:00-15:00"[set a-num 19 set b-num 4 set c-num 2 set d-num 2 ]      if period-num = "15:00-17:00"[set a-num 21 set b-num 3 set c-num 3 set d-num 3]      if period-num = "17:00-19:00"[set a-num 27 set b-num 6 set c-num 1 set d-num 3]      if period-num = "19:00-21:00"[set a-num 32 set b-num 7 set c-num 4 set d-num 3]  end  to setup-explorer   ifelse random-des   [set-default-shape johnnywalker "person"       create-custom-johnnywalker a-num  [setxy (43) (-17 - random 2)     set size 2.0     set od 9     set-initial-heading-color     set playtime (1800 - (random 1200))     set origin-point 1]     set-default-shape johnnywalker "person"      create-custom-johnnywalker b-num [setxy (43) (-29)      set size 2.0     set od 9     set-initial-heading-color     set playtime (1800 - (random 1200))     set origin-point 2]     set-default-shape johnnywalker "person"     create-custom-johnnywalker c-num [setxy -9 12     set size 2.0     set od 9     set-initial-heading-color     set playtime (1800 - (random 1200))      set origin-point 3]      create-custom-johnnywalker d-num [setxy -5 4     set size 2.0     set od 9     set-initial-heading-color     set playtime (1800 - (random 1200))      set origin-point 4]]   [set-default-shape johnnywalker "person"       create-custom-johnnywalker a-num  [setxy (43) (-17 - random 2)     set size 2.0     set od ((random 8) + 1) if od = 8 [set od 9]     set-initial-heading-color     set playtime (1800 - (random 1200))     set origin-point 1]     set-default-shape johnnywalker "person"      create-custom-johnnywalker b-num [setxy (43) (-29)     set size 2.0     set od ((random 2) + 8)     set-initial-heading-color     set playtime (1800 - (random 1200))     set origin-point 2]     set-default-shape johnnywalker "person"     create-custom-johnnywalker c-num [setxy -9 12     set size 2.0     set od ((random 6) + 1) if od = 6 [set od 9]     set-initial-heading-color     set playtime (1800 - (random 1200))      set origin-point 3]      create-custom-johnnywalker d-num [setxy -5 4      set size 2.0     set od ((random 5) + 5)     set-initial-heading-color     set playtime (1800 - (random 1200))      set origin-point 4]]   end   to setup-gate    set Gate-A 0    set Gate-B 0    set Gate-C 0    set Gate-D 0    set Gate-E 0    set gatea 0    set gateb 0    set gatec 0    set gated 0    set gatee 0    set gate-max-a 0    set gate-max-b 0    set gate-max-c 0    set gate-max-d 0    set gate-max-e 0    end      to setup-origin    set origin user-choice "Choose Origin"["O1" "O2" "O3" "O4"]    if origin = "O1"[set-default-shape johnnywalker "person"      create-custom-johnnywalker 1 [setxy (43) (-17 - random 2)      set size 5.0      set origin-point 1]]    if origin = "O2" [set-default-shape johnnywalker "person"      create-custom-johnnywalker 1 [setxy (43) (-29)      set size 5.0      set origin-point 2]]    if origin = "O3" [set-default-shape johnnywalker "person"      create-custom-johnnywalker 1 [setxy -9 12      set size 5.0      set origin-point 3]]    if origin = "O4" [set-default-shape johnnywalker "person"      create-custom-johnnywalker 1 [setxy -5 4      set size 5.0      set origin-point 4]]  end    to setup-destination    set destination user-choice "Choose Destination"["Red" "Yellow" "Blue" "Green" "Sky" "Violet" "Orange" "Brown"]      if destination = "Blue" [ask johnnywalker[      set od 1]]     if destination = "Yellow" [ask johnnywalker[      set od 2]]      if destination = "Violet" [ask johnnywalker[          set od 3]]      if destination = "Brown" [ask johnnywalker[    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -