Charisma_Ru

Charisma_Ru preview image

This model is seeking new collaborators — would you please help?

3 collaborators

Patarakin_m Evgeny Patarakin (Author)
Default-person Boris Yarmakhov (Advisor)
Anna Korchak (Domain expert)

Tags

partnership concurrency 

Tagged by Evgeny Patarakin about 1 year ago

Parent of 1 model: Child of Charisma_Ru
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.2.0 • Viewed 616 times • Downloaded 40 times • Run 0 times
Download the 'Charisma_Ru' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

breed [charismatics charismatic]
breed [followers follower]

charismatics-own [
vision ;; радиус зоны влияния, в которой он действует на других агентов
charisma ;; харизматичность как способность привлекать на свою сторону.
  ;; Попавший под влияние лидера агент, образуют с лидером направленную связь - (create-link-to), начинает двигаться в одном направлениии с лидером
  ;; и перенимает часть его харизматичности. set charisma ([charisma] of myself) / ([divider] of myself)
affinity ;; сколько новых адептов может зацепить харизматик - свойство идеи
personal_affinity ;; -
phil ;; обозначает номер харизматика. В начале создаются лидеры. Каждый лидер получает свой номер.  Когда лидер  привлекает к себе нового участника, то он передает ему этот номер.
hcolor ;; цвет клана
divider ;;степень падения харизматичности у новых членов клана
ch-speed  ;; скорость перемещения

]
followers-own [tolerance]
;; Одиночки при создании получают только свойство tolerance - устойчивость к воздействию харизматиков. tolerance варьирует в популяции одиночек в интервале от 0 до значения рыжажка tlr
globals [list_of_charismatics]

to setup
  clear-all
;; (for this model to work with NetLogo's new plotting features,
  ;; __clear-all-and-reset-ticks should be replaced with clear-all at
  ;; the beginning of your setup procedure and reset-ticks at the end
  ;; of the procedure.)
set-default-shape turtles "person"
set list_of_charismatics []
  reset-ticks
end 

to demo
  setup
  ;; First group
  create-charismatics 1 [
set vision 4
set charisma 10
set ch-speed   0.01

;; сколько может удерживать харизматик вокруг себя.
set affinity 7
set personal_affinity affinity
;; позволяет управлять степенью снижения харизматичности от лидера к следующим членам группы. Каждый следующий носитель идеи не столь же харизматичен, как лидер клана
set divider 4

setxy random-xcor random-ycor
set size 2

;;
set list_of_charismatics lput [who] of self list_of_charismatics

set phil length list_of_charismatics

set heading (360 / count charismatics) + random 15

set hcolor  red
    ; lime orange green brown turquoise magenta
set color hcolor
  ]
    ;; Second group
      create-charismatics 1 [
set vision 2
set charisma 20
set ch-speed  0.01
set affinity 7
set personal_affinity affinity
set divider 1.5
setxy random-xcor random-ycor
set size 2

;;
set list_of_charismatics lput [who] of self list_of_charismatics

set phil length list_of_charismatics
set heading (360 / count charismatics) + random 15
set hcolor  green
set color hcolor
  ]

  ;; Создаем свободных

create-followers 50 [
set size 1.5
set color blue
setxy random-xcor random-ycor
set tolerance random 2
 set speed 0.01
]
update-histogram
update-plot
end 

to create-harismen
create-charismatics 1 [
;; ���������������
set vision vision-of-charismatic
set charisma power-charisma
set ch-speed  speed

;; сколько может удерживать харизматик вокруг себя.
set affinity haffinity
set personal_affinity affinity

;; позволяет управлять степенью снижения харизматичности от лидера к следующим членам группы. Каждый следующий носитель идеи не столь же харизматичен, как лидер клана
set divider divider-of-charisma

setxy random-xcor random-ycor
set size 2

;;
set list_of_charismatics lput [who] of self list_of_charismatics

set phil length list_of_charismatics

set heading (360 / count charismatics) + random 15

;; о
set hcolor item who [red lime orange green brown turquoise magenta]
set color hcolor

]
end 

to create-flw
create-followers folks [
set size 1.5
set color blue
setxy random-xcor random-ycor
set tolerance random tlr
;; set velocity 0.3
]
update-histogram
update-plot
end 

to go
if not conflict? [if count followers = 0 [display user-message "Нет потенциальных последователей" stop] ]
ask followers [lt random 15 rt random 15 jump 0.1
    ; bounce
]
ask charismatics  [jump ch-speed ;
 ;   bounce ;
]
ask charismatics with [personal_affinity > 1] [take_new ]
if conflict? [
ask charismatics with [personal_affinity > 1] [take_old]
              ]
tick
update-histogram
update-plot
display
end 

to take_new
;; ��� � �������� ����� �������� �� ����� ���������
let my_vision vision
let new_group followers in-radius my_vision with [tolerance < [charisma] of myself]
;; with [(distance myself) < my_vision ]
if  (count new_group) > 0
[

ask min-one-of  new_group [distance myself]
  [
set heading [heading] of myself  create-link-to myself
set breed  charismatics
set vision([vision] of myself)
set divider ([divider] of myself)
set ch-speed  ([ch-speed] of myself  )
set phil [phil] of myself
set hcolor (0.2 + [hcolor] of myself )
set color hcolor
set charisma ([charisma] of myself) / ([divider] of myself)
set affinity ([affinity] of myself)
set personal_affinity affinity

  ]
set personal_affinity personal_affinity - 1
]
end 

to take_old
;; в ситуации конкуренции позволяет утаскивать из чужих групп
let my_vision vision
;;
let enemy_group  charismatics in-radius my_vision  with  [phil != [phil] of myself]
if  (count enemy_group) > 0
[
ask min-one-of enemy_group [charisma]
[
;; Самый слабый из группы противников
if charisma  < ([charisma] of myself ) / 2
     [
set phil [phil] of myself
;; set vision [vision] of myself
set ch-speed  ([ch-speed] of myself  )
ask my-out-links [die]
ask my-in-links [die]
create-link-to myself set heading [heading] of myself
      set hcolor (0.2 + [hcolor] of myself )
set color hcolor
 ]
    ]
]
end 

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

to update-histogram
  set-current-plot "Histogram"
 set-plot-y-range 0 folks
  ;; set-histogram-num-bars ceiling (sqrt (count turtles))
  histogram [phil] of charismatics
end 

to update-plot
set-current-plot "Linking"
 set-plot-y-range 0 folks

foreach list_of_charismatics [ ?1 ->
 set-current-plot-pen word "pen" ?1
 plot count charismatics  with [phil = ?1 + 1]
 ]
set-current-plot-pen "follower"
 plot count followers
end 

to bounce  ;; turtle procedure
  ; check: hitting left or right wall?
  if abs [pxcor] of patch-ahead 0.1 = max-pxcor
    ; if so, reflect heading around x axis
    [ set heading (- heading) ]
  ; check: hitting top or bottom wall?
  if abs [pycor] of patch-ahead 0.1 = max-pycor
    ; if so, reflect heading around y axis
    [ set heading (180 - heading) ]
end 

There are 4 versions of this model.

Uploaded by When Description Download
Evgeny Patarakin about 1 year ago Web-Version 2023 Download this version
Evgeny Patarakin about 1 year ago updaded reset_tick Download this version
Evgeny Patarakin about 1 year ago updated to version 6.2 + Demo button Download this version
Evgeny Patarakin almost 10 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Charisma_Ru.png preview Preview for 'Charisma_Ru' almost 10 years ago, by Evgeny Patarakin Download

This model does not have any ancestors.

Children:

Graph of models related to 'Charisma_Ru'