MIHS_HK_EK_P7

MIHS_HK_EK_P7 preview image

1 collaborator

Default-person Hannah Kris (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.2.1 • Viewed 71 times • Downloaded 1 time • Run 0 times
Download the 'MIHS_HK_EK_P7' 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

this model can not run,please,why? (Question)

when i run this model, noticing "To or TO-REPORT is respected",I dot know what is wrong with the code?Can you help me ?Thankyou very much.

Posted 10 days ago

Click to Run Model

to setup
  clear-all
  create-turtles 100
  setup-turtles
  ask patches [set pcolor 8]
  reset-ticks
end 

to setup-turtles
  ask turtle 0 [set color 5]
  ask turtle 1 [set color 5]
  ask turtle 2 [set color 5]
  ask turtle 3 [set color 5]
  ask turtle 4 [set color 5]
  ask turtle 5 [set color 5]
  ask turtle 6 [set color 5]
  ask turtle 7 [set color 5]
  ask turtle 8 [set color 5]
  ask turtle 9 [set color 5]
  ask turtle 10 [set color 5]
  ask turtle 11 [set color 5]
  ask turtle 12 [set color 5]
  ask turtle 13 [set color 5]
  ask turtle 14 [set color 5]
  ask turtle 15 [set color 5]
  ask turtle 16 [set color 5]
  ask turtle 17 [set color 5]
  ask turtle 18 [set color 5]
  ask turtle 19 [set color 5]
  ask turtle 20 [set color 6]
  ask turtle 21 [set color 6]
  ask turtle 22 [set color 6]
  ask turtle 23 [set color 6]
  ask turtle 24 [set color 6]
  ask turtle 25 [set color 6]
  ask turtle 26 [set color 6]
  ask turtle 27 [set color 6]
  ask turtle 28 [set color 6]
  ask turtle 29 [set color 6]
  ask turtle 30 [set color 6]
  ask turtle 31 [set color 6]
  ask turtle 32 [set color 6]
  ask turtle 33 [set color 6]
  ask turtle 34 [set color 6]
  ask turtle 35 [set color 6]
  ask turtle 36 [set color 6]
  ask turtle 37 [set color 6]
  ask turtle 38 [set color 6]
  ask turtle 39 [set color 6]
  ask turtle 40 [set color 7]
  ask turtle 41 [set color 7]
  ask turtle 42 [set color 7]
  ask turtle 43 [set color 7]
  ask turtle 44 [set color 7]
  ask turtle 45 [set color 7]
  ask turtle 46 [set color 7]
  ask turtle 47 [set color 7]
  ask turtle 48 [set color 7]
  ask turtle 49 [set color 7]
  ask turtle 50 [set color 7]
  ask turtle 51 [set color 7]
  ask turtle 52 [set color 7]
  ask turtle 53 [set color 7]
  ask turtle 54 [set color 7]
  ask turtle 55 [set color 7]
  ask turtle 56 [set color 7]
  ask turtle 57 [set color 7]
  ask turtle 58 [set color 7]
  ask turtle 59 [set color 7]
  ask turtle 60 [set color 8]
  ask turtle 61 [set color 8]
  ask turtle 62 [set color 8]
  ask turtle 63 [set color 8]
  ask turtle 64 [set color 8]
  ask turtle 65 [set color 8]
  ask turtle 66 [set color 8]
  ask turtle 67 [set color 8]
  ask turtle 68 [set color 8]
  ask turtle 69 [set color 8]
  ask turtle 70 [set color 8]
  ask turtle 71 [set color 8]
  ask turtle 72 [set color 8]
  ask turtle 73 [set color 8]
  ask turtle 74 [set color 8]
  ask turtle 75 [set color 8]
  ask turtle 76 [set color 8]
  ask turtle 77 [set color 8]
  ask turtle 78 [set color 8]
  ask turtle 79 [set color 8]
  ask turtle 80 [set color 9.9]
  ask turtle 81 [set color 9.9]
  ask turtle 82 [set color 9.9]
  ask turtle 83 [set color 9.9]
  ask turtle 84 [set color 9.9]
  ask turtle 85 [set color 9.9]
  ask turtle 86 [set color 9.9]
  ask turtle 87 [set color 9.9]
  ask turtle 88 [set color 9.9]
  ask turtle 89 [set color 9.9]
  ask turtle 90 [set color 9.9]
  ask turtle 91 [set color 9.9]
  ask turtle 92 [set color 9.9]
  ask turtle 93 [set color 9.9]
  ask turtle 94 [set color 9.9]
  ask turtle 95 [set color 9.9]
  ask turtle 96 [set color 9.9]
  ask turtle 97 [set color 9.9]
  ask turtle 98 [set color 9.9]
  ask turtle 99 [set color 9.9]
  ask turtles [setxy random-xcor random-ycor]
  ask turtles [set money 10]
  ask turtles with [color = 5] [set stealing Average-Predisposition-To-Steal]
  ask turtles with [color = 5] [set stealing stealing + 2]
  ask turtles with [color = 6] [set stealing Average-Predisposition-To-Steal]
  ask turtles with [color = 6] [set stealing stealing + 1]
  ask turtles with [color = 8] [set stealing Average-Predisposition-To-Steal]
  ask turtles with [color = 8] [set stealing stealing - 1]
  ask turtles with [color = 9.9] [set stealing Average-Predisposition-To-Steal]
  ask turtles with [color = 9.9] [set stealing stealing - 2]
  ask turtles with [stealing < 0] [set stealing 0]
  ask turtles with [stealing > 100] [set stealing 100]
  ask turtles with [money <= 0] [die]
end 

turtles-own [money reputation stealing value]

to go
  ask turtles [right random 5 forward 0.1]
  tick
  ask turtles [change-stealing]
  ask patches [set pcolor 8]
end 

to change-stealing
  ask turtles in-radius 1 [interact]
  ask turtles with [money > 8 and money <= 10] [set stealing stealing + 1]
  ask turtles with [money > 6 and money <= 8] [set stealing stealing + 2]
  ask turtles with [money > 4 and money <= 6] [set stealing stealing + 3]
  ask turtles with [money > 2 and money <= 4] [set stealing stealing + 4]
  ask turtles with [money > 0 and money <= 2] [set stealing stealing + 5]
  ask turtles with [money > 10 and money <= 12] [set stealing stealing - 1]
  ask turtles with [money > 12 and money <= 14] [set stealing stealing - 2]
  ask turtles with [money > 14 and money <= 16] [set stealing stealing - 3]
  ask turtles with [money > 16 and money <= 18] [set stealing stealing - 4]
  ask turtles with [money > 18] [set stealing stealing - 5]
  ask turtles with [money <= 0] [set size 0.1]
  ask turtles with [money <= 0] [die]
end 

to interact
  set money money - 1
  set value random 100
  if value <= 99 [ask turtles with [stealing = 99] [steal]]
  if value <= 98 [ask turtles with [stealing = 98] [steal]]
  if value <= 97 [ask turtles with [stealing = 97] [steal]]
  if value <= 96 [ask turtles with [stealing = 96] [steal]]
  if value <= 95 [ask turtles with [stealing = 95] [steal]]
  if value <= 94 [ask turtles with [stealing = 94] [steal]]
  if value <= 93 [ask turtles with [stealing = 93] [steal]]
  if value <= 92 [ask turtles with [stealing = 92] [steal]]
  if value <= 91 [ask turtles with [stealing = 91] [steal]]
  if value <= 90 [ask turtles with [stealing = 90] [steal]]
  if value <= 89 [ask turtles with [stealing = 89] [steal]]
  if value <= 88 [ask turtles with [stealing = 88] [steal]]
  if value <= 87 [ask turtles with [stealing = 87] [steal]]
  if value <= 86 [ask turtles with [stealing = 86] [steal]]
  if value <= 85 [ask turtles with [stealing = 85] [steal]]
  if value <= 84 [ask turtles with [stealing = 84] [steal]]
  if value <= 83 [ask turtles with [stealing = 83] [steal]]
  if value <= 82 [ask turtles with [stealing = 82] [steal]]
  if value <= 81 [ask turtles with [stealing = 81] [steal]]
  if value <= 80 [ask turtles with [stealing = 80] [steal]]
  if value <= 79 [ask turtles with [stealing = 79] [steal]]
  if value <= 78 [ask turtles with [stealing = 78] [steal]]
  if value <= 77 [ask turtles with [stealing = 77] [steal]]
  if value <= 76 [ask turtles with [stealing = 76] [steal]]
  if value <= 75 [ask turtles with [stealing = 75] [steal]]
  if value <= 74 [ask turtles with [stealing = 74] [steal]]
  if value <= 73 [ask turtles with [stealing = 73] [steal]]
  if value <= 72 [ask turtles with [stealing = 72] [steal]]
  if value <= 71 [ask turtles with [stealing = 71] [steal]]
  if value <= 70 [ask turtles with [stealing = 70] [steal]]
  if value <= 69 [ask turtles with [stealing = 69] [steal]]
  if value <= 68 [ask turtles with [stealing = 68] [steal]]
  if value <= 67 [ask turtles with [stealing = 67] [steal]]
  if value <= 66 [ask turtles with [stealing = 66] [steal]]
  if value <= 65 [ask turtles with [stealing = 65] [steal]]
  if value <= 64 [ask turtles with [stealing = 64] [steal]]
  if value <= 63 [ask turtles with [stealing = 63] [steal]]
  if value <= 62 [ask turtles with [stealing = 62] [steal]]
  if value <= 61 [ask turtles with [stealing = 61] [steal]]
  if value <= 60 [ask turtles with [stealing = 60] [steal]]
  if value <= 59 [ask turtles with [stealing = 59] [steal]]
  if value <= 58 [ask turtles with [stealing = 58] [steal]]
  if value <= 57 [ask turtles with [stealing = 57] [steal]]
  if value <= 56 [ask turtles with [stealing = 56] [steal]]
  if value <= 55 [ask turtles with [stealing = 55] [steal]]
  if value <= 54 [ask turtles with [stealing = 54] [steal]]
  if value <= 53 [ask turtles with [stealing = 53] [steal]]
  if value <= 52 [ask turtles with [stealing = 52] [steal]]
  if value <= 51 [ask turtles with [stealing = 51] [steal]]
  if value <= 50 [ask turtles with [stealing = 50] [steal]]
  if value <= 49 [ask turtles with [stealing = 49] [steal]]
  if value <= 48 [ask turtles with [stealing = 48] [steal]]
  if value <= 47 [ask turtles with [stealing = 47] [steal]]
  if value <= 46 [ask turtles with [stealing = 46] [steal]]
  if value <= 45 [ask turtles with [stealing = 45] [steal]]
  if value <= 44 [ask turtles with [stealing = 44] [steal]]
  if value <= 43 [ask turtles with [stealing = 43] [steal]]
  if value <= 42 [ask turtles with [stealing = 42] [steal]]
  if value <= 41 [ask turtles with [stealing = 41] [steal]]
  if value <= 40 [ask turtles with [stealing = 40] [steal]]
  if value <= 39 [ask turtles with [stealing = 39] [steal]]
  if value <= 38 [ask turtles with [stealing = 38] [steal]]
  if value <= 37 [ask turtles with [stealing = 37] [steal]]
  if value <= 36 [ask turtles with [stealing = 36] [steal]]
  if value <= 35 [ask turtles with [stealing = 35] [steal]]
  if value <= 34 [ask turtles with [stealing = 34] [steal]]
  if value <= 33 [ask turtles with [stealing = 33] [steal]]
  if value <= 32 [ask turtles with [stealing = 32] [steal]]
  if value <= 31 [ask turtles with [stealing = 31] [steal]]
  if value <= 30 [ask turtles with [stealing = 30] [steal]]
  if value <= 29 [ask turtles with [stealing = 29] [steal]]
  if value <= 28 [ask turtles with [stealing = 28] [steal]]
  if value <= 27 [ask turtles with [stealing = 27] [steal]]
  if value <= 26 [ask turtles with [stealing = 26] [steal]]
  if value <= 25 [ask turtles with [stealing = 25] [steal]]
  if value <= 24 [ask turtles with [stealing = 24] [steal]]
  if value <= 23 [ask turtles with [stealing = 23] [steal]]
  if value <= 22 [ask turtles with [stealing = 22] [steal]]
  if value <= 21 [ask turtles with [stealing = 21] [steal]]
  if value <= 20 [ask turtles with [stealing = 20] [steal]]
  if value <= 19 [ask turtles with [stealing = 19] [steal]]
  if value <= 18 [ask turtles with [stealing = 18] [steal]]
  if value <= 17 [ask turtles with [stealing = 17] [steal]]
  if value <= 16 [ask turtles with [stealing = 16] [steal]]
  if value <= 15 [ask turtles with [stealing = 15] [steal]]
  if value <= 14 [ask turtles with [stealing = 14] [steal]]
  if value <= 13 [ask turtles with [stealing = 13] [steal]]
  if value <= 12 [ask turtles with [stealing = 12] [steal]]
  if value <= 11 [ask turtles with [stealing = 11] [steal]]
  if value <= 10 [ask turtles with [stealing = 10] [steal]]
  if value <= 9 [ask turtles with [stealing = 9] [steal]]
  if value <= 8 [ask turtles with [stealing = 8] [steal]]
  if value <= 7 [ask turtles with [stealing = 7] [steal]]
  if value <= 6 [ask turtles with [stealing = 6] [steal]]
  if value <= 5 [ask turtles with [stealing = 5] [steal]]
  if value <= 4 [ask turtles with [stealing = 4] [steal]]
  if value <= 3 [ask turtles with [stealing = 3] [steal]]
  if value <= 2 [ask turtles with [stealing = 2] [steal]]
  if value <= 1 [ask turtles with [stealing = 1] [steal]]
  if value <= 0 [ask turtles with [stealing = 0] [steal]]
  if value > 99 [ask turtles with [stealing = 99] [give]]
  if value > 98 [ask turtles with [stealing = 98] [give]]
  if value > 97 [ask turtles with [stealing = 97] [give]]
  if value > 96 [ask turtles with [stealing = 96] [give]]
  if value > 95 [ask turtles with [stealing = 95] [give]]
  if value > 94 [ask turtles with [stealing = 94] [give]]
  if value > 93 [ask turtles with [stealing = 93] [give]]
  if value > 92 [ask turtles with [stealing = 92] [give]]
  if value > 91 [ask turtles with [stealing = 91] [give]]
  if value > 90 [ask turtles with [stealing = 90] [give]]
  if value > 89 [ask turtles with [stealing = 89] [give]]
  if value > 88 [ask turtles with [stealing = 88] [give]]
  if value > 87 [ask turtles with [stealing = 87] [give]]
  if value > 86 [ask turtles with [stealing = 86] [give]]
  if value > 85 [ask turtles with [stealing = 85] [give]]
  if value > 84 [ask turtles with [stealing = 84] [give]]
  if value > 83 [ask turtles with [stealing = 83] [give]]
  if value > 82 [ask turtles with [stealing = 82] [give]]
  if value > 81 [ask turtles with [stealing = 81] [give]]
  if value > 80 [ask turtles with [stealing = 80] [give]]
  if value > 79 [ask turtles with [stealing = 79] [give]]
  if value > 78 [ask turtles with [stealing = 78] [give]]
  if value > 77 [ask turtles with [stealing = 77] [give]]
  if value > 76 [ask turtles with [stealing = 76] [give]]
  if value > 75 [ask turtles with [stealing = 75] [give]]
  if value > 74 [ask turtles with [stealing = 74] [give]]
  if value > 73 [ask turtles with [stealing = 73] [give]]
  if value > 72 [ask turtles with [stealing = 72] [give]]
  if value > 71 [ask turtles with [stealing = 71] [give]]
  if value > 70 [ask turtles with [stealing = 70] [give]]
  if value > 69 [ask turtles with [stealing = 69] [give]]
  if value > 68 [ask turtles with [stealing = 68] [give]]
  if value > 67 [ask turtles with [stealing = 67] [give]]
  if value > 66 [ask turtles with [stealing = 66] [give]]
  if value > 65 [ask turtles with [stealing = 65] [give]]
  if value > 64 [ask turtles with [stealing = 64] [give]]
  if value > 63 [ask turtles with [stealing = 63] [give]]
  if value > 62 [ask turtles with [stealing = 62] [give]]
  if value > 61 [ask turtles with [stealing = 61] [give]]
  if value > 60 [ask turtles with [stealing = 60] [give]]
  if value > 59 [ask turtles with [stealing = 59] [give]]
  if value > 58 [ask turtles with [stealing = 58] [give]]
  if value > 57 [ask turtles with [stealing = 57] [give]]
  if value > 56 [ask turtles with [stealing = 56] [give]]
  if value > 55 [ask turtles with [stealing = 55] [give]]
  if value > 54 [ask turtles with [stealing = 54] [give]]
  if value > 53 [ask turtles with [stealing = 53] [give]]
  if value > 52 [ask turtles with [stealing = 52] [give]]
  if value > 51 [ask turtles with [stealing = 51] [give]]
  if value > 50 [ask turtles with [stealing = 50] [give]]
  if value > 49 [ask turtles with [stealing = 49] [give]]
  if value > 48 [ask turtles with [stealing = 48] [give]]
  if value > 47 [ask turtles with [stealing = 47] [give]]
  if value > 46 [ask turtles with [stealing = 46] [give]]
  if value > 45 [ask turtles with [stealing = 45] [give]]
  if value > 44 [ask turtles with [stealing = 44] [give]]
  if value > 43 [ask turtles with [stealing = 43] [give]]
  if value > 42 [ask turtles with [stealing = 42] [give]]
  if value > 41 [ask turtles with [stealing = 41] [give]]
  if value > 40 [ask turtles with [stealing = 40] [give]]
  if value > 39 [ask turtles with [stealing = 39] [give]]
  if value > 38 [ask turtles with [stealing = 38] [give]]
  if value > 37 [ask turtles with [stealing = 37] [give]]
  if value > 36 [ask turtles with [stealing = 36] [give]]
  if value > 35 [ask turtles with [stealing = 35] [give]]
  if value > 34 [ask turtles with [stealing = 34] [give]]
  if value > 33 [ask turtles with [stealing = 33] [give]]
  if value > 32 [ask turtles with [stealing = 32] [give]]
  if value > 31 [ask turtles with [stealing = 31] [give]]
  if value > 30 [ask turtles with [stealing = 30] [give]]
  if value > 29 [ask turtles with [stealing = 29] [give]]
  if value > 28 [ask turtles with [stealing = 28] [give]]
  if value > 27 [ask turtles with [stealing = 27] [give]]
  if value > 26 [ask turtles with [stealing = 26] [give]]
  if value > 25 [ask turtles with [stealing = 25] [give]]
  if value > 24 [ask turtles with [stealing = 24] [give]]
  if value > 23 [ask turtles with [stealing = 23] [give]]
  if value > 22 [ask turtles with [stealing = 22] [give]]
  if value > 21 [ask turtles with [stealing = 21] [give]]
  if value > 20 [ask turtles with [stealing = 20] [give]]
  if value > 19 [ask turtles with [stealing = 19] [give]]
  if value > 18 [ask turtles with [stealing = 18] [give]]
  if value > 17 [ask turtles with [stealing = 17] [give]]
  if value > 16 [ask turtles with [stealing = 16] [give]]
  if value > 15 [ask turtles with [stealing = 15] [give]]
  if value > 14 [ask turtles with [stealing = 14] [give]]
  if value > 13 [ask turtles with [stealing = 13] [give]]
  if value > 12 [ask turtles with [stealing = 12] [give]]
  if value > 11 [ask turtles with [stealing = 11] [give]]
  if value > 10 [ask turtles with [stealing = 10] [give]]
  if value > 9 [ask turtles with [stealing = 9] [give]]
  if value > 8 [ask turtles with [stealing = 8] [give]]
  if value > 7 [ask turtles with [stealing = 7] [give]]
  if value > 6 [ask turtles with [stealing = 6] [give]]
  if value > 5 [ask turtles with [stealing = 5] [give]]
  if value > 4 [ask turtles with [stealing = 4] [give]]
  if value > 3 [ask turtles with [stealing = 3] [give]]
  if value > 2 [ask turtles with [stealing = 2] [give]]
  if value > 1 [ask turtles with [stealing = 1] [give]]
  if value > 0 [ask turtles with [stealing = 0] [give]]
  exchange
end 

to steal
  set value 0
  set pcolor pcolor - 2
end 

to give
  set value 1
  set pcolor pcolor + 3
end 

to exchange
  ask turtles in-radius 1 [exchange2]
end 

to exchange2
  if pcolor = 4 [ask turtles-on patches with [pcolor = 4] [set money money - 1]]
  if pcolor = 9 [ask turtles-on patches with [pcolor = 9] [if value = 0 [set money money + 3]]]
  if pcolor = 14 [ask turtles-on patches with [pcolor = 14] [set money money + 2]]
end 

There is only one version of this model, created 12 months ago by Hannah Kris.

Attached files

File Type Description Last updated
MIHS_HK_EK_P7.png preview Preview for 'MIHS_HK_EK_P7' 12 months ago, by Hannah Kris Download

This model does not have any ancestors.

This model does not have any descendants.