📄 ---small_w_tester.nlogo
字号:
to move_policiesifelse ((distance turtle p-target) > (distance turtle p-source))[fd (0.5 * ( 1 / link_length) * (distance turtle p-target)) + 1][fd (distance turtle p-target)]endto doPlotsif clustcoeff? [set-current-plot "Nodes" set-current-plot-pen "clustcoeff" set-plot-pen-mode 2 plotxy p_rand_log ( ((last cclist) - (last cc_p1_list)) / ((last cc_min_list) - (last cc_p1_list)) )]if pathlen? [ set-current-plot "Nodes" set-current-plot-pen "pathlen" set-plot-pen-mode 2 plotxy p_rand_log ( ((last pathllist) - (last pathl_p1_list)) / ((last pathl_min_list) - (last pathl_p1_list)) )]if pol_action? [ set-current-plot "Nodes" set-current-plot-pen "polsteps" set-plot-pen-mode 2 plotxy p_rand_log ( ((last polstepslist) - (last polsteps_p1_list)) / ((last polsteps_min_list) - (last polsteps_p1_list)) )]endto dopolplotsset-current-plot "poldev" plotxy polsteps 100 * (count actors with [color = red]) / num_actorsend@#$#@#$#@GRAPHICS-WINDOW490108013421501501.011001CC-WINDOW15110479295Command CenterBUTTON4108543NILsetupNIL1TOBSERVERBUTTON4458578NILstepNIL1TOBSERVERBUTTON47985112gowhile [repcounter <= reps]\n[step]NIL1TOBSERVERMONITOR752664575NILsteps31SWITCH595350719383drawLabels?drawLabels?11-1000PLOT151305481584Nodeslog pnorm var-3.00.20.01.0truetruePENS"clustcoeff" 1.0 2 -8716033 true"pathlen" 1.0 2 -65413 true"polsteps" 1.0 2 -11352576 true"Four" 1.0 0 -16711681 true"Five" 1.0 0 -16711936 true"Six" 1.0 0 -6524078 true">Six" 1.0 0 -16777216 trueSLIDER3246148279num_actors_startnum_actors_start51502551NILSLIDER3319146352p_rand_log_startp_rand_log_start-40-3.00.21NILSWITCH491350589383drawnet?drawnet?01-1000SLIDER3396145429link_lengthlink_length15111NILMONITOR74526131575toltol31SLIDER3434144467rangerange050411NILMONITOR600389657438av l(p)short_l31MONITOR625442682491clustcclust_coeff31SLIDER3281147314num_actors_endnum_actors_end51503551NILSLIDER3357143390p_rand_log_endp_rand_log_end-400.00.21NILMONITOR8141089159NILnum_actors31MONITOR81567865116p10 ^ p_rand_log41SLIDER4472143505start_policy_%start_policy_%01006021NILPLOT690393990586poldeviter%_pol_agree0.020.00.0100.0truefalseMONITOR488533565582red actorscount actors with [color = red]01MONITOR579533648582NILpolsteps01SWITCH490388596421pathlen?pathlen?01-1000SWITCH490442613475clustcoeff?clustcoeff?01-1000SWITCH489497617530pol_action?pol_action?01-1000MONITOR905235968284NILshortcuts31MONITOR815123950172NIL100 * (10 ^ p_rand_log)31MONITOR815179874228NILrandval31MONITOR8991094959edgesnum_actors * range31MONITOR815235900284exp. shortcuts(10 ^ p_rand_log) * num_actors * range 31MONITOR815291929340NILlength edge_list31MONITOR87767950116NILp_rand_log31SLIDER5145147178repsreps0100311NILMONITOR36182108231repetitionrepcounter01@#$#@#$#@Small world parameters and political activity in a networkNetwork regular and randomized according to rules in Watts and Strogatz 1998somewhere in between the regular and randomised networks we should see a small world, if parameters are right, this is recognised by the large drop in global path length withpout a corresponding fall in clustering.We can examine alongside this an actor based simulation of political activity in networks. At present this is a (not very good) rule that looks towards convergence of opinion on a policy, where actors are influenced by their inetractions with each other. I have a paper in progresson this subject. I can make drafts available if people are interested.What we hope to see is that some kind of believable model of policy formation in a network is affected by the small world properties eing present.Things to note1) depending on the size of your network/ expected number of shortcuts you can boost up the minimum p-log value and save a load of worthless iterations2) the poldev graph is not much use (at the momnet), it just shows that the policy simulation is alive and kicking3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -