MES_Repository
Model was written in NetLogo 6.1.1
•
Viewed 123 times
•
Downloaded 18 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
;; Models with user - which has administrative function they don't patrucipate in creation, but they organize space - School-Leader extensions [nw csv table rnd] ;; расширение - показать как именно они используются directed-link-breed [bonds bond] ; Links between gamers ;; patches-own [pagenum] breed [users user] ;; порода участников - авторы и редакторы сценариев breed [balls ball] ;; breed of object - scenarious that are created by users turtles-own [ nearest-neighbor ;; closest one of our flockmates ] users-own [ agentname ;; ID of user School ;; School of user - Eeach user linked with only one school Age ;; Age of use - how we can use it ? Gender ;; How we can use gender in this model - выбираются по тому, насколько они близки User_Subj ;; List of disciplins this user has teach ;; action t-pagenum region_point ;; place of birth ] balls-own [ Ball_Subj ;; Subject of page - maded by first user who create this page pagenum ;; ID of Page impuls ;; impuls - after creation or reuse Gender ;; for affinity ] links-own [weight] globals [ ;; wikihistory ; wikilog ; log file - creating & reusing of scenarious pages ;; перечень созданных страниц - мы используем число элементов в списке при присваивании имени новому сценарию ] ;;; Очистили, закрыли и обнулили все, to setup clear-all ; file-close; set-default-shape users "person" ; set-default-shape balls "circle" ; ;; set-default-shape users "circle" ; set-default-shape bonds "default" ; ;; set wikihistory [] ; set wikilog [] ; set pages [] ; исходно пустой список let R 8 let teachers_in_school round (Pl_number / ((R - 1) ^ 2)) let SBJ ["Math" "Literature" "Russian" "Biology" "Chemistry" "Informatics" "Geography" "Astronomy"] let N_SBJ [1 2 3 4 5 6 7 8] ;; сколько будет let weights [ 0.9 0.7 0.6 0.5 0.4 0.3 0.1 0.05] let s_pairs (map list SBJ weights) let n_pairs (map list N_SBJ weights) ;; type first rnd:weighted-one-of-list n_pairs [ [p] -> last p ] ask patches with [pxcor mod R = 0 and pycor mod R = 0] [ sprout-users 1 + random ;; - if we think that there is different quantity of teachers teachers_in_school [ set color white set size 1 set agentname who set region_point patch-here set action 0 ;; action 0 - ничего ;; set User_Subj map first rnd:weighted-n-of-list first rnd:weighted-one-of-list n_pairs [ [p] -> last p ] s_pairs [ [s] -> last s ] ;;n-of (1 + (random length SBJ) ) SBJ ;; What it means set Gender one-of ["Female" "Male"] ;; Пол агента - пока никак не используется, если мы не создадим сегрегацию или присоединение set Age one-of n-values 50 [18 + random 50] set School remove "patch" word "School_N_" region_point ;;; find_empty_space ;; ] ] let B 16 let balls_in_school round (B_number / 9) ask patches with [pxcor mod B = 0 and pycor mod B = 0] [ sprout-balls balls_in_school [ set color blue set impuls 0 set size 0.6 set Ball_Subj 0 ;; set pagenum 0 find_empty_space ;; setxy random-xcor random-ycor ;; ht ] ] update-School-plot update-n_u_plot reset-ticks end to find_empty_space ifelse not any? other users-here [stop] [rt 360 fd 0.5 find_empty_space] end to go ;; if length reused > length created [stop] ;; ask users with [ (any? balls-here )] [touch_ball one-of balls-here ] ask users with [not any? balls-here ] [ search_ball ] ask balls [ ball_move ] ask users [find_empty_space] ;; update-Subjects-plot tick end to ball_move if any? users-here [ ;; it is ball choice ;; А кого именно выбирает сценарий, если есть выбор из нескольких ??? ;; affinity to Gender ifelse pagenum = 0 [ let player one-of users-here ;; выбираем любого let newpage 1 + length pages set pages lput newpage pages set pagenum newpage ;; set Ball_Subj one-of [User_Subj] of player ;; set Gender [Gender] of player ;; set wikilog lput (se [who] of player pagenum "create" [School] of player Ball_Subj ) wikilog set heading [heading] of player set color green st ;; show created scenario fd ball_shift ;; как далеко уходит сценарий от автора? - свойство самого сценария - регулируется в системе. Если ] [ let player one-of users-here ifelse not Subj_Segregation [ set wikilog lput (se [who] of player pagenum "reuse" [School] of player Ball_Subj) wikilog ] [ ifelse not member? Ball_Subj [User_Subj] of player [ ] ;; если есть предпочтение по предмету, то с чужим автором связь не образуется [ set wikilog lput (se [who] of player pagenum "reuse" [School] of player Ball_Subj) wikilog ] ] set heading [heading] of player set color orange fd ball_shift ] ] end to search_ball if count balls ;; with [member? Ball_Subj [User_Subj] of myself ] in-cone vision 360 > 0 [ let myball one-of balls ;; with [member? Ball_Subj [User_Subj] of myself ] in-cone vision 360 set heading towards myball if distance region_point < stay_school [ fd 0.5 ] if distance myball < 0.5 [move-to myball] ] end ;; ;;;;;;; ;; user scenario action school subject to save_log set wikilog fput (se "user" "scenario" "action" "school_user" "subject" ) wikilog let exp1 (word "experiments/netlogo" experiments ".csv") csv:to-file exp1 wikilog end ;; Just use csv:to-file "/path/to/myfile.csv" my-data! ;; Данные по созданию и использованию объектов to-report reused report filter [ [?1] -> "reuse" = item 2 ?1 ] wikilog end to-report created report filter [ [?1] -> "create" = item 2 ?1 ] wikilog end ;;;;;;;;;;;;;;;;;;;;; to logs_to_sociogram ;; ask balls [ht] ;; ask users [set color red] ;; пока связи идут только от редакторов к автору статьи foreach reused [ [?1] -> let friend1 item 0 ?1 let p1 item 1 ?1 let friend2 first first filter [ [??1] -> (p1 = item 1 ??1) and ("create" = item 2 ??1) ] wikilog if friend1 != friend2 [ ask user friend1 [ create-bond-to turtle friend2 ] ] ] ;; repeat 8 [layout-spring users links 1 5 7 ] leaders_distribution follower_distribution end ;;;;;; to update-School-plot set-current-plot "Users Schools" clear-plot let counts table:counts [ School ] of users let schools sort table:keys counts let n length schools set-plot-x-range 0 n let step 0.05 ; tweak this to leave no gaps (foreach schools range n [ [s i] -> let y table:get counts s let c hsb (i * 360 / n) 50 75 create-temporary-plot-pen s set-plot-pen-mode 1 ; bar mode set-plot-pen-color c foreach (range 0 y step) [ _y -> plotxy i _y ] set-plot-pen-color black plotxy i y set-plot-pen-color c ; to get the right color in the legend ]) end ;;; to update-Subjects-plot set-current-plot "Scenarious Subjects" clear-plot let counts table:counts [ Ball_Subj ] of balls with [Ball_Subj != 0] let b-sbj sort table:keys counts let n length b-sbj set-plot-x-range 0 n let step 0.05 ; tweak this to leave no gaps (foreach b-sbj range n [ [s i] -> let y table:get counts s let c hsb (i * 360 / n) 50 75 create-temporary-plot-pen s set-plot-pen-mode 1 ; bar mode set-plot-pen-color c foreach (range 0 y step) [ _y -> plotxy i _y ] set-plot-pen-color black plotxy i y set-plot-pen-color c ; to get the right color in the legend ]) end ;; распределение участников по числу дисциплин, сценарии для которых они создают to update-n_u_plot set-current-plot "User_N_Subjects" clear-plot ; set-current-plot-pen "Pen1" histogram [length User_Subj] of users ;; set-histogram-num-bars number end ;; распределение участников-агентов по числу связей, которые к ним идут от других участников to leaders_distribution let max-in max [count my-in-links] of users set-current-plot "Leaders" clear-plot ; set-current-plot-pen "L2" set-plot-x-range 0 max-in set-plot-y-range 0 count users set-histogram-num-bars max-in histogram [count my-in-links] of users end ;;; распределение участников-агентов по числу связей, которые идут от них к другим участникам to follower_distribution let max-out max [count my-out-links] of users set-current-plot "Followers" clear-plot ; set-current-plot-pen "F2" set-plot-x-range 0 max-out set-histogram-num-bars max-out histogram [count my-out-links] of users end ;; histogram map first wikilog
There is only one version of this model, created over 4 years ago by Evgeny Patarakin.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
MES_Repository.png | preview | Preview for 'MES_Repository' | over 4 years ago, by Evgeny Patarakin | Download |
This model does not have any ancestors.
This model does not have any descendants.