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

📄 ---trafficmanagementmendoza.nlogo

📁 NETLOGO
💻 NLOGO
📖 第 1 页 / 共 4 页
字号:
   set list-Period50 lput (total-delay / total-finished-cars) list-Period50  ]       set model "Reservation"   set granularity 1   set period 30  set beta 0   set alpha 0.1  set spawn-probability-N  .001  set spawn-probability-S  .001   set spawn-probability-E  .0   set spawn-probability-W  .0   set ticks-by-second 50     ask turtles [die]       set list-reservation []  while [spawn-probability-N <= .02]  [    start-variables     ask turtles [die]     while [clock <= 20000] [          go                     ]    set spawn-probability-N spawn-probability-N + .001   set spawn-probability-S  spawn-probability-N      set list-reservation lput (total-delay / total-finished-cars) list-reservation   ]  do-plotting3 end;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;to experiment4   set lanes  1  set plotting false  set model "Reservation"   set granularity 1   set period 30  set beta 0   set alpha 0.1  set spawn-probability-N  .001  set spawn-probability-S  .001   set spawn-probability-E  .000   set spawn-probability-W  .000      set ticks-by-second 50  setup   while [spawn-probability-N <= .02]  [    start-variables     ask turtles [die]     while [clock <= 20000] [           go                          ]     do-plotting2a    set spawn-probability-N spawn-probability-N + .001   set spawn-probability-S  spawn-probability-N      ]    set granularity 2    set period 30   set beta 0  set alpha 0.1  set spawn-probability-N  .001  set spawn-probability-S  .001   set spawn-probability-E  .001   set spawn-probability-W  .001   set ticks-by-second 50  ask turtles [die]       while [spawn-probability-N <= .02]  [    start-variables     ask turtles [die]     while [clock <= 20000] [        go             ]      do-plotting2a   set spawn-probability-N spawn-probability-N + .001   set spawn-probability-S  spawn-probability-N     ]  end;;;;;;;;;;;;;;;;;;;;;;;;;PLOTTING PROCEDURES;;;;;;;;;;;;;;;;;;;;;;;;;to do-plotting1  set-current-plot "Average Delay"    set-current-plot-pen "default"   ifelse total-finished-cars > 0 [ plot total-delay / total-finished-cars]  [plot 0]    set-current-plot "Maximum Delay"   plot maximum-delay endto do-plotting   set-current-plot "Figure a"    set-current-plot-pen "Theoretical"   plot expected-average-delay  set-current-plot-pen "Empirical"  plot total-delay / total-finished-cars  set-current-plot "Figure b"   set-current-plot-pen "Theoretical"   plot expected-maximum-delay  set-current-plot-pen "Empirical"  plot maximum-delay endto do-plotting2a  set-current-plot "Figure c"    set-current-plot-pen "Granu. 1"   plot total-delay / total-finished-carsendto do-plotting2b  set-current-plot "Figure c"    set-current-plot-pen "Granu. 2"   plot total-delay / total-finished-carsendto do-plotting3  set-current-plot "Figure d"    foreach list-period10 [    set-current-plot-pen "Period 10"     plot ?        set-current-plot-pen "Period 30"     plot first list-period30    set list-period30 but-first list-period30      set-current-plot-pen "Period 50"     plot first list-period50    set list-period50 but-first list-period50      set-current-plot-pen "Reservation"     plot first list-reservation      set list-reservation but-first list-reservation  ]end@#$#@#$#@GRAPHICS-WINDOW176875875192002001.00101110CC-WINDOW55411050636Command CenterBUTTON81010743SetupsetupNIL1TOBSERVERTNILBUTTON9469279GogoT1TOBSERVERTNILMONITOR6021065959NILclock31PLOT592162815313Figure aPeriod or AlphaAverage Delay0.00.00.010.0truetruePENS"Theoretical" 1.0 0 -16776961 true"Empirical" 1.0 0 -65536 trueBUTTON1101117644go oncegoNIL1TOBSERVERTNILCHOICE1097148142modelmodel"Overpass" "Trafic Light" "Reservation"2SLIDER10143173176laneslanes16311NILSLIDER8176173209spawn-probability-Nspawn-probability-N0.01.00.0150.00101NILMONITOR603111670160Total Delaytotal-delay\n31SLIDER12316170349periodperiod102003011NILSLIDER12350171383alphaalpha010.450.051NILSLIDER12384171417betabeta010.10.11NILMONITOR7951089059Finished Carstotal-finished-cars31MONITOR671111768160Average Delaytotal-delay / total-finished-cars 31BUTTON1346190494Experiment 1experiment1NIL1TOBSERVERTNILPLOT8171621041312Figure bPeriod or AlphaMaximum Delay0.00.00.010.0truetruePENS"Theoretical" 1.0 0 -16776961 true"Empirical" 1.0 0 -65536 trueBUTTON96462167495Experiment 2experiment2NIL1TOBSERVERTNILSLIDER12419171452granularitygranularity150211NILMONITOR76860870109Expec. Max. Delayexpected-maximum-delay31MONITOR67161768110Expec. Avg. Delayexpected-average-delay31MONITOR770110844159Max. Delaymaximum-delay31MONITOR6711072559NILtotal-cars31MONITOR72710794

⌨️ 快捷键说明

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