Collaboration-Wiki_07

No preview image

1 collaborator

I-patarakin Evgeny Patarakin (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0 • Viewed 163 times • Downloaded 9 times • Run 0 times
Download the 'Collaboration-Wiki_07' modelDownload this modelEmbed this model

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

breed [pages page] ;
breed [users user] ;
directed-link-breed [pagelinks pagelink] ;
directed-link-breed [uplinks uplink]

users-own [impact readlist researching reading writing  editing  success status knowledge co-editors] ;
pages-own [history text_size last_edit is_about] ;
uplinks-own [edits] 
globals [Things_list] ;;

to setup
 ca ;
;; ask patches [set pcolor white ]
  set-default-shape users "person" 
  set-default-shape pages "circle" ;
set Things_list n-values Objects [?]

   create-users N_Users
  [
    set size 1.5
    set status "user+"
    fd 1 + random max-pycor set heading random 360
    set impact [] ;   
    set readlist [] ; 
    set knowledge [] ; 
    set co-editors lput [who] of self  [] ; 
    set reading 1 ;
     set writing 1 ;
     set editing 1 ;
     set researching 1 ;
     set success reduce + (se reading writing editing researching)
         ]
  layout-circle users (world-width / 4 ) 
  reset-timer ;
  reset-ticks ;
end  

to go

;;   show se length remove-duplicates  agency-to-knol  pages length Things_list
     if length remove-duplicates  pages-to-knol agency-to-list  pages  = length Things_list  [stop]
ask  probablyfirst sort-by [[success] of ?1 >  [success] of ?2 ] users [ gowrite] ;
 collab_diagram ;
tick
end 

to  gowrite
  run last probablyfirst act-by-success  shuffle (list list researching "researh_thing" list reading  "read_page" list  writing  "write_page" list  editing   "edit_page" )
;; if ActChoice = "ProBest" [ run last probablyfirst act-by-success  shuffle (list list researching "researh_thing" list reading  "read_page" list  writing  "write_page" list  editing   "edit_page" ) ]
;; if ActChoice = "Best" [run last first act-by-success shuffle (list list researching "researh_thing" list reading  "read_page" list  writing  "write_page" list  editing   "edit_page" ) ]
;;if ActChoice = "ProList" [run one-of shuffle (se n-values researching  ["researh_thing"] n-values reading  ["read_page"]  n-values writing  ["write_page"] n-values  editing   ["edit_page"] )]
    set success reduce + (se reading writing editing researching) ;
end 

to researh_thing
let newknol one-of Things_list
if  member? newknol  knowledge  [set researching (researching - 0) stop]
set knowledge lput newknol knowledge 
 set researching (researching + 0)
end 

to read_page
 if count pages = 0 [ set reading (reading - 0) stop]
let readknol probablyfirst pages-by-edit-time  agency-to-list  pages ;
if member? [is_about]  of page readknol knowledge [ set reading (reading - 0) stop]
 set readlist lput readknol readlist
 set knowledge lput [is_about] of page readknol knowledge ;
 set reading reading + 0
end 

;; ______ ____ __ ____ __ ____ ________ _ _____
;; ___ __ ______ - _____ _________ ________ _ ______. ____ __ ___ __ _____ ____, ___ ___ ___ ________ is_about __ __ _________ ______ _ ________ ______ knowledge
;; ________ _ ______ _____ _ _____ _______ ________ __ _______________, __ ___ ______ _ ______ __________ ______ _________ ___ _____________ ________ 

to write_page
   
 let unwrited filter [not member? ? pages-to-knol readlist] knowledge ;
;; ____ _ ____ ____ ______, _______ _ _____ __ __ ______ _______, _ __ ___________ ____________ _ _ ___ ____ ___ __ _____
 if empty? unwrited    [  
  ;; set writing (writing - 1) ;; ___ _______ _____ __________
    set writing 0  ;; ___ _______ _____ ________ __________
   stop]

set writing (writing + WritingCarma)
;;set writing WritingCarma
  hatch 1 
  [  
      set breed pages 
      ; setxy 0 0
        set is_about one-of unwrited
      set last_edit timer
      set text_size 0.4
      set size text_size
     ;; set label is_about
      create-uplink-from myself ;;
      ask uplink [who] of myself [who] of self [set edits 1 set label edits]
      set history lput [who] of myself [] 
      ask myself [
             set impact lput [who] of myself impact ;; _____ impact - _____ ________ _ ________ _______, _______ ____ ____________
              set readlist lput [who] of myself readlist ;
        
                 ]  

  ]
end 

to edit_page 
   let my_own_preference_list []
;; set my_own_preference_list   (se  pages-by-edit-time  readlist  pages-by-edit-time  agency-to-list pages with [ member? (first history) [co-editors] of myself]   ) 
set my_own_preference_list   pages-by-edit-time  agency-to-list pages with [ not member? (last history) [co-editors] of myself]   

 ;; ___ ______ ______ _______, _______ _____ __________ _____________
 ;; ___ ________, _______ ________ __ ________________ __ _______ ______________ pages-by-edit-time  readlist  + 
 ;; agency-to-list pages with [ member? (first history) [co-editors] of myself] impact = ________
 ;;
  if  empty? my_own_preference_list   [ set editing (editing - 1) stop]     
     let temp_page probablyfirst  my_own_preference_list 
   
   if timer - [last_edit] of page temp_page  < 0.5  [ 
   ;;  set editing (editing - 1) 
   set editing 0
     stop]  
  set editing editing + EditingCarma ;; 
 ;; set editing EditingCarma ;;     
    ask page temp_page 
            [  
           ifelse is-link? uplink [who] of myself [who] of self  [ ask uplink [who] of myself [who] of self [set edits edits + 1 set label edits]]
             [ create-uplink-from myself ask uplink [who] of myself [who] of self [set edits 1 ] ]
                                  
             set text_size text_size + 0.2
                           set size text_size    
                            set last_edit timer         
           ;;   set color [color] of myself
              set history lput [who] of myself history 
              ask myself [
                set impact lput [who] of myself impact 
                                        set co-editors  remove-duplicates se [history] of myself co-editors
                              ;;
                
                ] 
                          ]
end 

to collab_diagram
 repeat 1 [layout-spring (turtle-set  pages users ) uplinks 1 1 0.2 ]
end 
 
 
 
  
 ;;;; 
 ;;; REPORTERS
 ;;;;
;; Agentset converted to the list

to-report agency-to-list [agency]
 report [who] of agency
end 

;; list converted to the agentset of pages

to-report list-to-pages [list1]
  report pages with [ member? [who] of self list1]
end 

to-report pages-to-knol [list1]
  report [is_about] of list-to-pages list1;
end 

to-report agency-to-knol [agency]
  report [is_about] of agency
end 

; to-report agency-by-success [agency]
; report sort-by [reduce + (se reading writing editing researching) ?1 > reduce + (se reading writing editing researching) ?2 ] agency
; end
;;;  ____________ _______ ;;;
;; __ _______ ______ ________, __ __________ ______, __ __________ backlinks

to-report pages-by-edit-time [list1]
  report sort-by  [ [last_edit] of page ?1 > [last_edit] of page ?2] list1
end 

to-report pages-by-size [list1]
  report sort-by  [ [text_size] of page ?1 > [text_size] of page ?2] list1
end 

to-report pages-by-in-links [list1]
  report sort-by  [ [count my-in-links] of page ?1 > [count my-in-links] of page ?2] list1
end 

to-report pages-by-out-links [list1]
  report sort-by  [ [count my-out-links] of page ?1 > [count my-in-links] of page ?2] list1
end 

to-report act-by-success [list1]
  report sort-by [ first ?1 > first ?2 ] list1
end 

to-report party_colors
  report one-of [15 25 45  55 65 75 85 95 105 125 ] 
  ;; 
end 


;;; ;;;;

to-report probablyfirst [list1]
if empty? bf list1 [ report first list1 ]
if random 2 > 0 [report first list1]
set list1 but-first list1
report probablyfirst list1
end 

to-report DeadendPages
  ;; The following pages do not link to other pages
  report pages with [count my-out-links = 0] 
end 

to-report LonelyPages
 ;; The following pages are not linked from or transcluded into other pages
  report pages with [count my-in-links = 0] 
end 

to-report StrangePages
  ;; The following pages are not linked from or do not link to other pages
  report (turtle-set DeadendPages LonelyPages)
end 
;;;;;;;

to-report SameThingPage
   report pages with [count other pages with [is_about = [is_about] of myself ] > 0] ;
end 

to-report UnicalPage
  ; ________, _______ ______ __ _____ ____
  report pages with [count other pages with [is_about = [is_about] of myself ] = 0] ;
end 

to-report Co-editingPage
   report pages with [count my-in-uplinks > 1 ] 
end 

to-report CoEditors
  report count users with [length co-editors > 1]
end 

;;;;;;;;;;;;;;;;;;;;;;;
;;;     Plotting    ;;;
;;;;;;;;;;;;;;;;;;;;;;;

to update-plot
 set-current-plot "Plot"
;;  set-plot-y-range 0 count users
  
 ;;set-current-plot-pen "pages"
 ;; plot count pages
 
 ;;set-current-plot-pen "dublicate"
;;  plot  count SameThingPage

;;set-current-plot-pen "unic"
;; plot  count UnicalPage
 
;; set-current-plot-pen "_______"
;; plot  length Things_list - length remove-duplicates  pages-to-knol agency-to-list  pages 
 
set-current-plot-pen "CoEditPages"
 plot  count Co-editingPage
 
set-current-plot-pen "CoEditors"
 plot  CoEditors
 
 set-current-plot "Gimpacts"
  clear-plot
 set-plot-x-range 0 count users
   set-plot-y-range 0  1 + [success] of  max-one-of users [success]  
      set-current-plot-pen "IM"
  histogram  [success] of users
end 

There is only one version of this model, created about 7 years ago by Evgeny Patarakin.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.