; Definitions of breeds used breed [ tobaccos tobacco ] breed [ papers paper ] breed [ matches match ] breed [ place_sm_tobacco ] breed [ place_sm_paper ] breed [ place_sm_match ] ; Definition of global variables used globals [ sm_tobacco-x sm_tobacco-y ; where to place "Smoker with tobacco" sm_paper-x sm_paper-y ; where to place "Smoker with paper" sm_match-x sm_match-y ; where to place "Smoker with match" table ; state of table (empty - non empty) sm_tobacco ; state of "Smoker with tobacco" sm_paper ; state of "Smoker with paper" sm_match ; state of "Smoker with match" activity_smoker_tobbaco ; activity counter of "Smoker with tobacco" activity_smoker_paper ; activity counter of "Smoker with paper" activity_smoker_match ; activity counter of "Smoker with match" ] ; setup values of global variables to setup ca set sm_tobacco-x -7 set sm_tobacco-y 7 set sm_paper-x 7 set sm_paper-y 7 set sm_match-x 0 set sm_match-y -7 set table 0 set sm_tobacco 0 set activity_smoker_tobbaco 0 set activity_smoker_paper 0 set activity_smoker_match 0 ; placing of "Smoker with tobacco" ask patch sm_tobacco-x sm_tobacco-y [ sprout 1 [ set color green set shape "person soldier" set size 4 stamp die ] ] ; placing of "Smoker with paper" ask patch sm_paper-x sm_paper-y [ sprout 1 [ set color white set shape "person service" set size 4 stamp die ] ] ; placing of "Smoker with match" ask patch sm_match-x sm_match-y [ sprout 1 [ set color yellow set shape "person cap" set size 4 stamp die ] ] ; placing of turtles for later use for material used by "Smoker with tobacco" create-place_sm_tobacco 2 [ set color green set shape "circle 2" set size 3 setxy ( -7 ) ( 10 * who - 28) ht ] ; placing of turtles for later use for material used by "Smoker with paper" create-place_sm_paper 2 [ set color white set shape "circle 2" set size 3 setxy ( 7 ) ( 10 * ( who - 2 ) - 28) ht ] ; placing of turtles for later use for material used by "Smoker with match" create-place_sm_match 2 [ set color yellow set shape "circle 2" set size 3 setxy ( 10 * ( who - 4 ) - 35 ) ( 0 * ( who - 4 ) - 7) ht ] ; link to plots procedure do-plots end to go let income random 3 ; local variable for choosing material ( paper + match or tobacco + match or paper + tobacco ) ; condition for "Smoker with tobacco". It is true if the smoker is actually active. Decreases the number ; of steps till the end of his activity. If the smoker finishes his cigarette in this step an on the table ; is material for another cigarette he takes it. if ( sm_tobacco > 0 ) [ set sm_tobacco sm_tobacco - 1 ; decreasing of steps till end of activity set activity_smoker_tobbaco activity_smoker_tobbaco + 1 ; counter for graphing if ( sm_tobacco = 0 ) ; true if smoker finishes his cigarette [ ; removing trash from the smoked paper ask place_sm_tobacco with [ who = 3 ] [ ask papers-here [ die ] ] ; removing trash from the smoked match ask place_sm_tobacco with [ who = 4 ] [ ask matches-here [ die ] ] if ( table = 1 ) ; true if on the table lie paper and match [ ; move paper next to the "Smoker with tobacco" ask papers with-max [ who ] [ facexy -7 2 while [ xcor >= -7 ] [ fd 1 wait 0.05 ] setxy -7 2 ] ; move match next to the "Smoker with tobacco" ask matches with-max [ who ] [ facexy -7 12 while [ xcor >= -7 ] [ fd 1 wait 0.05 ] setxy -7 12 ] set table 0 ; clearing the table ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_tobacco ( random length_tobacco_smoker_smokes ) + 1 ] [ set sm_tobacco length_tobacco_smoker_smokes + 1 ] ] ] ] ; on the table is put paper and match if income equals zero if ( income = 0 ) [ if ( table = 0 ) ; true if in the table doesn't lie any material [ ; creating of paper on the table create-papers 1 [ set color white set shape "paper" set size 2 setxy -2 0 ] ; creating of match on the table create-matches 1 [ set color brown set shape "match" set size 2 setxy 2 0 set table 1 ; if "Smoker with tobacco" doesn't smoke, paper and match move to the smoker if ( sm_tobacco = 0 ) [ wait 0.5 facexy -7 12 while [ xcor >= -7 ] [ fd 1 wait 0.05 ] setxy -7 12 ] ] ask papers with-max [ who ] [ if ( sm_tobacco = 0 ) [ wait 0.5 facexy -7 2 while [ xcor >= -7 ] [ fd 1 wait 0.05 ] setxy -7 2 set table 0 set activity_smoker_tobbaco activity_smoker_tobbaco + 1 ; counter for graphing ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_tobacco ( random length_tobacco_smoker_smokes ) + 1 ] [ set sm_tobacco length_tobacco_smoker_smokes + 1 ] ] ] ] ] ; condition for "Smoker with paper". It is true if the smoker is actually active. Decreases the number ; of steps till the end of his activity. If the smoker finishes his cigarette in this step and on the table ; is material for another cigarette he takes it. if ( sm_paper > 0 ) [ set sm_paper sm_paper - 1 ; decreasing of steps till end of activity set activity_smoker_paper activity_smoker_paper + 1 ; counter for graphing if ( sm_paper = 0 ) ; true if smoker finishes his cigarette [ ; removing trash from the smoked tobacco ask place_sm_paper with [ who = 5 ] [ ask tobaccos-here [ die ] ] ; removing trash from the smoked match ask place_sm_paper with [ who = 6 ] [ ask matches-here [ die ] ] if ( table = 2 ) ; true if on the table lie tobacco and match [ ; move tobacco next to the "Smoker with paper" ask tobaccos with-max [ who ] [ facexy 7 2 while [ xcor <= 7 ] [ fd 1 wait 0.05 ] setxy 7 2 ] ; move match next to the "Smoker with paper" ask matches with-max [ who ] [ facexy 7 12 while [ xcor <= 7 ] [ fd 1 wait 0.05 ] setxy 7 12 ] set table 0 ; clearing the table ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_paper ( random length_paper_smoker_smokes ) + 1 ] [ set sm_paper length_paper_smoker_smokes + 1 ] ] ] ] ; on the table is placed tobacco and match if income equals one if ( income = 1 ) [ if ( table = 0 ) ; true if in the table doesn't lie any material [ ; creating of tobacco on the table create-tobaccos 1 [ set color green set shape "tobacco" set size 2 setxy -2 0 ] ; creating of match on the table create-matches 1 [ set color brown set shape "match" set size 2 setxy 2 0 set table 2 ; if "Smoker with paper" doesn't smoke, tobacco and match move to the smoker if ( sm_paper = 0 ) [ wait 0.5 facexy 7 12 while [ xcor <= 7 ] [ fd 1 wait 0.05 ] setxy 7 12 ] ] ask tobaccos with-max [ who ] [ if ( sm_paper = 0 ) [ wait 0.5 facexy 7 2 while [ xcor <= 7 ] [ fd 1 wait 0.05 ] setxy 7 2 set table 0 set activity_smoker_paper activity_smoker_paper + 1; counter for graphing ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_paper ( random length_paper_smoker_smokes ) + 1 ] [ set sm_paper length_paper_smoker_smokes + 1 ] ] ] ] ] ; condition for "Smoker with match". It is true if the smoker is actually active. Decreases the number ; of steps till the end of his activity. If the smoker finishes his cigarette in this step an on the table ; is material for another cigarette he takes it. if ( sm_match > 0 ) [ set sm_match sm_match - 1 ; decreasing of steps till end of activity set activity_smoker_match activity_smoker_match + 1 ; counter for graphing if ( sm_match = 0 ) ; true if smoker finishes his cigarette [ ; removing trash from the smoked paper ask place_sm_match with [ who = 7 ] [ ask papers-here [ die ] ] ; removing trash from the smoked tobacco ask place_sm_match with [ who = 8 ] [ ask tobaccos-here [ die ] ] if ( table = 3 ) ; true if on the table lie paper and tobacco [ ; move paper next to the "Smoker with match" ask papers with-max [ who ] [ facexy -5 -7 while [ ycor >= -7 ] [ fd 1 wait 0.05 ] setxy -5 -7 ] ; move tobacco next to the "Smoker with match" ask tobaccos with-max [ who ] [ facexy 5 -7 while [ ycor >= -7 ] [ fd 1 wait 0.05 ] setxy 5 -7 ] set table 0 ; clearing the table ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_match ( random length_match_smoker_smokes ) + 1 ] [ set sm_match length_match_smoker_smokes + 1 ] ] ] ] ; on the table is put paper and matches if income equals two if ( income = 2 ) ; true if in the table doesn't lie any material [ if ( table = 0 ) [ ; creating of paper on the table create-papers 1 [ set color white set shape "paper" set size 2 setxy -2 0 ] ; creating of tobacco on the table create-tobaccos 1 [ set color green set shape "tobacco" set size 2 setxy 2 0 set table 3 ; if "Smoker with paper" doesn't smoke, paper and tobacco move to the smoker if ( sm_match = 0 ) [ wait 0.5 facexy 5 -7 while [ ycor >= -7 ] [ fd 1 wait 0.05 ] setxy 5 -7 ] ] ask papers with-max [ who ] [ if ( sm_match = 0 ) [ wait 0.5 facexy -5 -7 while [ ycor >= -7 ] [ fd 1 wait 0.05 ] setxy -5 -7 set table 0 set activity_smoker_match activity_smoker_match + 1 ; counter for graphing ; setting of length of the smoker activity ifelse ( random_length_smoker_smokes? ) [ set sm_match ( random length_match_smoker_smokes ) + 1 ] [ set sm_match length_match_smoker_smokes + 1 ] ] ] ] ] do-plots ; graphs plotting wait 1 end to do-plots set-current-plot "Smokers' activity" set-current-plot-pen "Tobacco" plot activity_smoker_tobbaco set-current-plot-pen "Paper" plot activity_smoker_paper set-current-plot-pen "Match" plot activity_smoker_match end @#$#@#$#@ GRAPHICS-WINDOW 340 26 779 486 16 16 13.0 1 10 1 1 1 0 0 0 1 -16 16 -16 16 0 0 1 ticks CC-WINDOW 5 562 788 657 Command Center 0 BUTTON 13 515 113 548 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 121 515 221 548 go once go NIL 1 T OBSERVER NIL NIL NIL NIL BUTTON 228 515 328 548 NIL go T 1 T OBSERVER NIL NIL NIL NIL SLIDER 13 66 327 99 length_tobacco_smoker_smokes length_tobacco_smoker_smokes 0 15 10 1 1 NIL HORIZONTAL SLIDER 13 106 327 139 length_paper_smoker_smokes length_paper_smoker_smokes 0 15 15 1 1 NIL HORIZONTAL SLIDER 13 146 328 179 length_match_smoker_smokes length_match_smoker_smokes 0 15 15 1 1 NIL HORIZONTAL MONITOR 13 186 328 231 NIL activity_smoker_tobbaco 17 1 11 MONITOR 13 238 328 283 NIL activity_smoker_paper 17 1 11 MONITOR 13 290 328 335 NIL activity_smoker_match 17 1 11 PLOT 13 342 328 509 Smokers' activity Time Activity 0.0 10.0 0.0 10.0 true true PENS "Paper" 1.0 0 -16777216 true "Tobacco" 1.0 0 -10899396 true "Match" 1.0 0 -1184463 true SWITCH 13 26 327 59 random_length_smoker_smokes? random_length_smoker_smokes? 1 1 -1000 @#$#@#$#@ WHAT IS IT? ----------- This model is trying to simulate a problem called "Cigarette smokers problem", which was described in 1971 by S. S. Patil. For making a cigarette we need three ingredients, tobacco, paper and matches. There are three smokers, each with an indefinite supply of one ingredient. There is also an agent with an indefinite supply of all three ingredients. To make a cigarette, the smoker who has tobacco (resp., paper and match) must have the other two ingredients of paper and a match (resp., tobacco and match, and tobacco and paper). The supplier agent and smokers are sitting around the table. The supplier randomly provides two ingredients. The agent now notifies the smoker who needs these two ingredients. The smoker takes these two ingredients from the table, creates a cigarette and smokes for some time. When the table is empty, the agent supplies another two random ingredients. If the ingredients are for the currently active smoker, the ingredients stay on the table and wait there for him. Otherwise, the relevant smoker pics them up and smokes. HOW IT WORKS ------------ There are four types of agents: the smoker with tobacco, the smoker with paper, the smoker with a match and the agent supplier. Each smoker knows, what ingredient he has in unlimited quantity and for which two is he waiting. If the two necessary ingredients are on the table, the agent-smoker pics them up, creates a cigarette and smokes. HOW TO USE IT ------------- Initial settings - by default : - random_length_smoker_smokes is set to ON. If the setup button is pressed and the model is started, the the time for smoking a cigarette for each smoker is random in each step. If this switch is set to OFF, the probability of the time of smoking for each smoker is taken from the sliders. Other settings: - length_tobacco_smoker_smokes - the length of smoking for a tobacco-smoker is not random but from interval zero to value on the slider, maximum 15. - length_paper_smoker_smokes - the length of smoking for paper-smoker is not random but from interval zero to value on the slider, maximum 15. - length_match_smoker_smokes - the length of smoking for match-smoker is not random but from interval zero to value on the slider, maximum 15. Plots: - activity_smoker_tobacco - the number shows total number of cigarettes which were smoked by this type of smoker. - activity_smoker_paper - the number shows total number of cigarettes which were smoked by this type of smoker. - activity_smoker_match - the number shows total number of cigarettes which were smoked by this type of smoker. - smokers_activity - the plot shows overall activity of the smokers during the time. THINGS TO NOTICE ---------------- Observe the line chart smokers_activity to see that if random_length_smoker_smokes is ON, nearly all the lines are growing the same. But if this length is set manually, there are differences and the lines are unbalanced. THINGS TO TRY ------------- Play with the settings of the the length of smoking for each agent. This can lead to starvation of some of the smokers. Situation 1: lenghth_smoker_smokes for one smoker is high but for the other two is low. Sooner or later the model gets stuck. One smoker still smokes, his activity increases as there are ingredients on the table for him, while the other two are waiting. Situation 2: lenghth_smoker_smokes for two smokers is high, for other one is low. Same as in situation 1, but two smokers are now smoking while one smoker is waiting, his activity being the lowest. EXTENDING THE MODEL ------------------- The model might be expanded by modification of the randomness, what two ingredients are placed on the table by the agent. New type of smoker can be added, for example smoker with filters. CREDITS AND REFERENCES ---------------------- To refer this model use: Limitations and capabilities of Dijkstra's semaphore primitives for coordination among processes, by Suhas Patil, technical report, MIT, 1971 @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 book false 0 Polygon -7500403 true true 30 195 150 255 270 135 150 75 Polygon -7500403 true true 30 135 150 195 270 75 150 15 Polygon -7500403 true true 30 135 30 195 90 150 Polygon -1 true false 39 139 39 184 151 239 156 199 Polygon -1 true false 151 239 254 135 254 90 151 197 Line -7500403 true 150 196 150 247 Line -7500403 true 43 159 138 207 Line -7500403 true 43 174 138 222 Line -7500403 true 153 206 248 113 Line -7500403 true 153 221 248 128 Polygon -1 true false 159 52 144 67 204 97 219 82 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 ghost false 0 Polygon -7500403 true true 30 165 13 164 -2 149 0 135 -2 119 0 105 15 75 30 75 58 104 43 119 43 134 58 134 73 134 88 104 73 44 78 14 103 -1 193 -1 223 29 208 89 208 119 238 134 253 119 240 105 238 89 240 75 255 60 270 60 283 74 300 90 298 104 298 119 300 135 285 135 285 150 268 164 238 179 208 164 208 194 238 209 253 224 268 239 268 269 238 299 178 299 148 284 103 269 58 284 43 299 58 269 103 254 148 254 193 254 163 239 118 209 88 179 73 179 58 164 Line -16777216 false 189 253 215 253 Circle -16777216 true false 102 30 30 Polygon -16777216 true false 165 105 135 105 120 120 105 105 135 75 165 75 195 105 180 120 Circle -16777216 true false 160 30 30 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 match false 3 Polygon -6459832 true true 195 105 195 135 45 285 30 270 Polygon -6459832 true true 15 255 30 270 195 105 165 105 Circle -7500403 true false 161 71 67 Polygon -1184463 true false 180 120 210 120 225 90 225 60 195 15 165 60 165 90 paintbrush false 0 Polygon -1 true false 87 191 103 218 238 53 223 38 Polygon -13345367 true false 104 204 104 218 239 53 235 47 Polygon -7500403 true true 99 173 83 175 71 186 64 207 52 235 45 251 77 238 108 227 124 205 118 185 paper false 0 Polygon -7500403 true true 15 210 135 255 270 150 150 105 15 210 Line -16777216 false 15 210 150 105 Line -16777216 false 150 105 270 150 Line -16777216 false 270 150 135 255 Line -16777216 false 15 210 135 255 Polygon -1 true false 15 180 135 225 270 120 150 75 15 180 Line -16777216 false 15 180 135 225 Line -16777216 false 135 225 270 120 Line -16777216 false 270 120 150 75 Line -16777216 false 15 180 150 75 Polygon -1 true false 15 150 135 195 270 90 150 45 15 150 Line -16777216 false 15 150 135 195 Line -16777216 false 135 195 270 90 Line -16777216 false 15 150 150 45 Line -16777216 false 150 45 270 90 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 person cap false 0 Rectangle -7500403 true true 123 76 176 95 Polygon -7500403 true true 105 90 60 195 90 210 115 162 184 163 210 210 240 195 195 90 Polygon -7500403 true true 180 195 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 Circle -7500403 true true 110 5 80 Line -16777216 false 148 143 150 196 Rectangle -16777216 true false 116 186 182 198 Circle -1 true false 152 143 9 Circle -1 true false 152 166 9 Rectangle -16777216 true false 179 164 183 186 Polygon -955883 true false 180 90 195 90 195 165 195 195 150 195 150 120 180 90 Polygon -955883 true false 120 90 105 90 105 165 105 195 150 195 150 120 120 90 Rectangle -16777216 true false 135 114 150 120 Rectangle -16777216 true false 135 144 150 150 Rectangle -16777216 true false 135 174 150 180 Polygon -955883 true false 105 42 111 16 128 2 149 0 178 6 190 18 192 28 220 29 216 34 201 39 167 35 person service false 0 Polygon -7500403 true true 180 195 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 Polygon -1 true false 120 90 105 90 60 195 90 210 120 150 120 195 180 195 180 150 210 210 240 195 195 90 180 90 165 105 150 165 135 105 120 90 Polygon -1 true false 123 90 149 141 177 90 Rectangle -7500403 true true 123 76 176 92 Circle -7500403 true true 110 5 80 Line -13345367 false 121 90 194 90 Line -16777216 false 148 143 150 196 Rectangle -16777216 true false 116 186 182 198 Circle -1 true false 152 143 9 Circle -1 true false 152 166 9 Rectangle -16777216 true false 179 164 183 186 Polygon -2674135 true false 180 90 195 90 183 160 180 195 150 195 150 135 180 90 Polygon -2674135 true false 120 90 105 90 114 161 120 195 150 195 150 135 120 90 Polygon -2674135 true false 155 91 128 77 128 101 Rectangle -16777216 true false 118 129 141 140 Polygon -2674135 true false 145 91 172 77 172 101 person soldier false 0 Rectangle -7500403 true true 127 79 172 94 Polygon -10899396 true false 105 90 60 195 90 210 135 105 Polygon -10899396 true false 195 90 240 195 210 210 165 105 Circle -7500403 true true 110 5 80 Polygon -10899396 true false 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Polygon -6459832 true false 120 90 105 90 180 195 180 165 Line -6459832 false 109 105 139 105 Line -6459832 false 122 125 151 117 Line -6459832 false 137 143 159 134 Line -6459832 false 158 179 181 158 Line -6459832 false 146 160 169 146 Rectangle -6459832 true false 120 193 180 201 Polygon -6459832 true false 122 4 107 16 102 39 105 53 148 34 192 27 189 17 172 2 145 0 Polygon -16777216 true false 183 90 240 15 247 22 193 90 Rectangle -6459832 true false 114 187 128 208 Rectangle -6459832 true false 177 187 191 208 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tobacco false 0 Polygon -10899396 true false 135 210 135 255 120 270 90 270 90 285 120 285 135 285 165 255 165 240 165 210 Polygon -7500403 true true 150 15 135 30 120 45 120 60 90 90 90 105 75 135 75 195 105 225 150 225 195 225 225 195 225 135 210 105 210 90 180 60 180 45 165 30 150 15 Line -16777216 false 150 15 150 225 Polygon -16777216 false false 105 225 195 225 225 195 225 135 210 105 210 90 180 60 180 45 150 15 120 45 120 60 90 90 90 105 75 135 75 195 Line -16777216 false 120 60 150 90 Line -16777216 false 150 90 180 60 Line -16777216 false 90 90 150 150 Line -16777216 false 150 150 210 90 Line -16777216 false 75 135 150 210 Line -16777216 false 150 210 225 135 Polygon -16777216 false false 90 285 135 285 165 255 165 225 135 225 135 255 120 270 90 270 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 4.0.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go activity_smoker_tobbaco activity_smoker_paper activity_smoker_match @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@