;; Actors and elements breed [customers customer] breed [developers developer] breed [testers tester] breed [monitors monitor] ;; Metadata breeds breed [requirements requirement] breed [codemetadata codemetadatum] breed [testmetadata testmetadatum] breed [metricmetadata metricmetadatum] ;; Code breed breed [codecomponents codecomponent] ;; Link breeds directed-link-breed [provide-links provide-link] directed-link-breed [review-links review-link] directed-link-breed [create-links create-link] directed-link-breed [notify-links notify-link] directed-link-breed [test-links test-link] directed-link-breed [translate-links translate-link] ;; Breed-specific variables customers-own [node-id] developers-own [node-id] testers-own [node-id] monitors-own [node-id] requirements-own [node-id entries modifications] codemetadata-own [node-id entries] testmetadata-own [node-id entries] metricmetadata-own [node-id entries] codecomponents-own [node-id entries] links-own [strength weight subtype] globals [ new-node-id reqneighbor devneighbor codeneighbor codemetaneighbor link_width_factor enhancement_percentage enhancement_choice do_enhancement creating_requirement reviewrequests testrequests codecomponents_to_create codemetadata_to_create testmetadata_to_create num_codecomponents num_codemetadata num_testmetadata total_requirements total_modifications total_metadata_elements total_reviews num_iterations num_total_iterations development_slope maintenance_slope end_of_development_x end_of_development_y ] to create-network clear-all ask-concurrent patches [set pcolor white] ;; Zero counters set reviewrequests 0 set testrequests 0 set total_requirements 0 set total_modifications 0 set num_total_iterations 0 set development_slope 0 set maintenance_slope 0 ;; Create actors and elements make-actors update-layout end ;; This procedure creates actor and element (metadata and code) turtles. ;; They need to be turtles so they may be connected via links. to make-actors ;; TODO: Refactor to make tighter. create-customers num_customers [ ;set node-id TODO set size 2 set color blue set label "customer" set shape "person" set label-color black ] create-developers num_developers [ ;set node-id TODO set size 2 set color green set label "developer" set shape "person" set label-color black ] create-testers num_testers [ ;set node-id TODO set size 2 set color turquoise set label "tester" set shape "person" set label-color black ] create-monitors num_monitors [ ;set node-id TODO set size 2 set color red set label "monitor" set shape "person" set label-color black ] ;; TODO: new-node-id not defined here... create-requirements 1 [ set node-id new-node-id set size 2 set color sky set label "requirement" set shape "pentagon" set label-color black set entries 0 ] create-codemetadata 1 [ set node-id new-node-id set size 2 set color violet set label "codemetadata" set shape "circle" set label-color black set entries 0 ] create-testmetadata 1 [ set node-id new-node-id set size 2 set color magenta set label "testmetadata" set shape "circle" set label-color black set entries 0 ] create-metricmetadata 1 [ set node-id new-node-id set size 2 set color pink set label "metricmetadata" set shape "circle" set label-color black set entries 0 ] create-codecomponents 1 [ set node-id new-node-id set size 2 set color yellow set label "code" set shape "triangle" set label-color black set entries 0 ] end ;; Inject multiple requirements into the system. to inject-requirements ;; Inject the number of requirements requested. repeat requirements_to_inject [ inject-change-request "requirement" ] ;; Note on the plot that requirements injection is finished. plot_end_of_development ;; Calculate the slope of the metadata line during the development phase. ;; m = (y1-y2)/(x1-x2) set development_slope get_total_metadata_elements / get_total_requests set end_of_development_x get_total_requests set end_of_development_y get_total_metadata_elements ;; The 60/60 Rule suggests that 40% of a software project will be ;; development and 60% will be maintenance. Indicate this to the user ;; by suggesting a value for the number of modifications. set modifications_to_inject round ( get_total_requests * 1.5 ) end ;; Inject multiple modifications into the system. to inject-modifications ;; Inject the number of modifications requested. repeat modifications_to_inject [ inject-change-request "modification" ] ;; Calculate the slope of the metadata line during the maintenance phase. ;; m = (y1-y2)/(x1-x2) set maintenance_slope (get_total_metadata_elements - end_of_development_y) / (get_total_requests - end_of_development_x) end ;; Syntactic sugar to make the code more readable in the ;; function inject-change-request to-report should_create_requirement [ check_request_type check_do_enhancement ] ifelse check_request_type = "requirement" or ( check_request_type = "modification" and check_do_enhancement = true ) [ report true ] [ report false ] end ;; Inject a new requirement into the system. ;; The requirement will flow through each actor, element and action in turn. ;; Weights will change on all links effected. to inject-change-request [request_type] ;; This applies to modifications only. ;; The 60/60 Rule suggests that roughly 60% of changes during maintenance ;; relate to enhancements, which should therefore be treated like new requirements. ;; The remainder (bug fixes and code migration) will generally not result ;; in new code components (as a simplifying presumption). set enhancement_percentage 60 set enhancement_choice random-float 100 ifelse enhancement_choice <= enhancement_percentage [ set do_enhancement true ] [ set do_enhancement false ] ;; Act as appropriate for new requirement or modification requests. ifelse should_create_requirement request_type do_enhancement = true [ set creating_requirement true ] [ set creating_requirement false ] ;; Allow for a random number of iterations. set num_iterations get_num_iterations ;; Set the node id on some components so they can be tracked. set new-node-id random 100000000 ;; TODO: Should customers create bugfix and migration requests? Probably... ;; If so, requirements might need to record those? Or they need ;; to be recorded elsewhere (maybe in an invisible turtle?). ifelse creating_requirement [ ;; Find a customer and make a link to a requirement. ask one-of customers [ ;; Check to see if a link already exists here. Increase its weight if so. set reqneighbor one-of requirements ask reqneighbor [ set entries entries + 1 ] ifelse out-provide-link-neighbor? reqneighbor [ ask my-out-provide-links [ set weight weight + 1 ] ] [ create-provide-link-to reqneighbor [ set weight weight + 1 ] ] ] ] ;; Not creating a requirement (bug fix or migration) [ set total_modifications total_modifications + 1] ;; Iterate a random number of times. repeat num_iterations [ set num_total_iterations num_total_iterations + 1 ;; TODO: This could also change if bug fixes and migration requests are recorded. if creating_requirement [ ;; Find a developer and make a translate link to it. ask one-of developers [ set node-id new-node-id ] set devneighbor one-of developers with [node-id = new-node-id] ask one-of requirements [ ifelse out-translate-link-neighbor? devneighbor [ ask out-translate-link-to devneighbor [ set weight weight + 1 ] ] [ create-translate-link-to devneighbor [ set weight weight + 1 ] ] ] ] ;; Determine how many code components and code metadata to create for this requirement. set codecomponents_to_create assign_num_codecomponents set codemetadata_to_create assign_num_codemetadata ;; Find a code component and make a create link to it. ;; Change this to test for existing links, as above. ;; Only create code and code metadata if we are creating_requirement if creating_requirement [ set codeneighbor one-of codecomponents ask codeneighbor [ set entries entries + codecomponents_to_create ] set codemetaneighbor one-of codemetadata ask codemetaneighbor [ set entries entries + codecomponents_to_create ] ] ask devneighbor [ if creating_requirement [ ;; Add a create link to code components. ifelse out-create-link-neighbor? codeneighbor [ ask out-create-link-to codeneighbor [ set weight weight + codecomponents_to_create ] ] [ create-create-link-to codeneighbor [ set weight weight + codecomponents_to_create ] ] ;; Add a create link to code metadata. ifelse out-create-link-neighbor? codemetaneighbor [ ask out-create-link-to codemetaneighbor [ set weight weight + codemetadata_to_create ] ] [ create-create-link-to codemetaneighbor [ set weight weight + codemetadata_to_create ] ] ] ] ;; Add test links from all code to all testers. ask testers [ set testrequests testrequests + codecomponents_to_create ifelse in-test-link-neighbor? codeneighbor [ ask in-test-link-from codeneighbor [ set weight weight + codecomponents_to_create ] ] [ create-test-link-from codeneighbor [ set weight weight + codecomponents_to_create ] ] ] ;; Add review links from all code to all monitors. ask monitors [ set reviewrequests reviewrequests + codecomponents_to_create ifelse in-review-link-neighbor? codeneighbor [ ask in-review-link-from codeneighbor [ set weight weight + codecomponents_to_create ] ] [ create-review-link-from codeneighbor [ set weight weight + codecomponents_to_create ] ] ] ;; Add test links from all code to all customers. ask customers [ ;; One test request is created per requirement, regardless of the number of code components created. set testrequests testrequests + 1 ifelse in-test-link-neighbor? codeneighbor [ ask in-test-link-from codeneighbor [ set weight weight + 1 ] ] [ create-test-link-from codeneighbor [ set weight weight + 1 ] ] ] ;; Add notify links from all monitors to all customers. ask customers [ create-notify-links-from monitors ask my-in-notify-links [ set weight weight + 1 ] ] ;; Decide how much test metadata to create. set testmetadata_to_create assign_num_testmetadata ;; Add create links from Testers to Test metadata ask testers [ create-create-links-to testmetadata [ set subtype "test" ] ask testmetadata [ set entries entries + testmetadata_to_create ] ask my-out-create-links with [subtype = "test"] [ set weight weight + testmetadata_to_create ] ] if creating_requirement [ ;; Add create links from Testers to Metric metadata ;; Three (3) metadata elements encode each metric with one (1) metric per code component. ;; Using one metric per codecomponents_to_create is like calculating, say, SLOC. ask testers [ create-create-links-to metricmetadata [ set subtype "metric" ] ask metricmetadata [ set entries entries + (3 * codecomponents_to_create) ] ask my-out-create-links with [subtype = "metric"] [ set weight weight + (3 * codecomponents_to_create) ] ] ] ;;if creating_requirement [ ;; Add review links from Requirements, Code metadata, Test metadata and Metric metadata to Monitors and Customers. ask requirements [ create-review-links-to monitors [ set subtype "requirement" ] create-review-links-to customers [ set subtype "requirement" ] ask my-out-review-links with [subtype = "requirement"] [ set weight weight + 1 set reviewrequests reviewrequests + 1 ] ] ask codemetadata [ create-review-links-to monitors [ set subtype "codemetadata" ] create-review-links-to customers [ set subtype "codemetadata" ] ask my-out-review-links with [subtype = "codemetadata"] [ set weight weight + 1 set reviewrequests reviewrequests + 1 ] ] ] ask testmetadata [ create-review-links-to monitors [ set subtype "testmetadata" ] create-review-links-to customers [ set subtype "testmetadata" ] ask my-out-review-links with [subtype = "testmetadata"] [ set weight weight + 1 set reviewrequests reviewrequests + 1 ] ;;] ;; end if creating_requirement if creating_requirement [ ;; TODO: Perhaps use less metrics? ask metricmetadata [ create-review-links-to monitors [ set subtype "metricmetadata" ] create-review-links-to customers [ set subtype "metricmetadata" ] ask my-out-review-links with [subtype = "metricmetadata"] [ set weight weight + 1 set reviewrequests reviewrequests + 1 ] ] ] ] ;; end repeat num_iterations ;; TODO: Needed? ;;update-layout update-link-weights ;; Update plots plot_stuff_vs_requests end to update-layout ;; TODO: Choose best layout. ; layout neatly in a circle. repeat 10 [ layout-circle turtles 10 ] ;; Use a radial layout instead. ;;layout-radial turtles links (turtle 0) ;repeat 30 [ layout-spring turtles links 0.2 5 1 ] ;; lays the nodes in a triangle end ;; Display any links requested by the user. to update-link-displays ;; TODO: Refactor this into a tighter procedure using 'word' and a param. ask provide-links [ ifelse show_provide_links = false [ set hidden? true ] [ set hidden? false ] ] ask review-links [ ifelse show_review_links = false [ set hidden? true ] [ set hidden? false ] ] ask create-links [ ifelse show_create_links = false [ set hidden? true ] [ set hidden? false ] ] ask notify-links [ ifelse show_notify_links = false [ set hidden? true ] [ set hidden? false ] ] ask test-links [ ifelse show_test_links = false [ set hidden? true ] [ set hidden? false ] ] ask translate-links [ ifelse show_translate_links = false [ set hidden? true ] [ set hidden? false ] ] end to update-link-weights set link_width_factor link_size / 10000000 ask links [ set thickness weight * link_width_factor ] end to-report assign_num_codecomponents ;; TODO: Revisit the magic number 3.2 here by analyzing real projects codebases. set num_codecomponents random-poisson 3.2 ;; Don't do these. The number of code components created could be 0, ;; especially upon iterations. ;;if num_codecomponents = 0 [ set num_codecomponents 1 ] ;;set num_codecomponents num_codecomponents + 1 ;; DBG ;;show "Number of code components: " ;;show num_codecomponents report num_codecomponents end to-report assign_num_codemetadata ;; There are either 6 or 7 metadata elements about each code component. set num_codemetadata 6.5 report num_codemetadata end to-report assign_num_testmetadata ;; There are 6 metadata elements associated with each test and some number of tests per component. set num_testmetadata 6 * random-poisson 4.2 report num_testmetadata end to-report get_total_requests report get_total_requirements + total_modifications end to-report get_total_requirements set total_requirements 0 ask requirements [ set total_requirements total_requirements + entries ] report total_requirements end to-report get_total_metadata_elements set total_metadata_elements 0 set total_metadata_elements total_metadata_elements + ( 6 * get_total_requirements ) ask codemetadata [ set total_metadata_elements total_metadata_elements + entries ] ask testmetadata [ set total_metadata_elements total_metadata_elements + entries ] ask metricmetadata [ set total_metadata_elements total_metadata_elements + entries ] report total_metadata_elements end to-report get_num_iterations set num_iterations 0 set num_iterations random-poisson 1.3 report num_iterations end to plot_stuff_vs_requests set-current-plot "Actions vs. Requests" set-current-plot-pen "reviews" plotxy get_total_requests reviewrequests set-current-plot-pen "tests" plotxy get_total_requests testrequests set-current-plot-pen "metadata" plotxy get_total_requests get_total_metadata_elements end to plot_end_of_development set-current-plot "Actions vs. Requests" set-current-plot-pen "end_of_development" plotxy get_total_requests plot-y-max end ; *** Copyright Notice *** ; ; (C) 2008 David Hyland-Wood. This code may be freely copied, distributed, ; altered, or otherwise used by anyone for any legal purpose. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; ; *** End of Copyright Notice *** @#$#@#$#@ GRAPHICS-WINDOW 254 53 684 504 17 17 12.0 1 12 1 1 1 0 0 0 1 -17 17 -17 17 0 0 1 ticks CC-WINDOW 5 803 893 898 Command Center 0 BUTTON 75 274 211 307 Setup create-network NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 75 87 247 120 num_customers num_customers 1 10 1 1 1 NIL HORIZONTAL SLIDER 75 127 247 160 num_developers num_developers 1 10 2 1 1 NIL HORIZONTAL SLIDER 74 202 246 235 num_monitors num_monitors 1 10 1 1 1 NIL HORIZONTAL SLIDER 75 166 247 199 num_testers num_testers 1 10 2 1 1 NIL HORIZONTAL SWITCH 698 201 865 234 show_notify_links show_notify_links 0 1 -1000 BUTTON 698 322 846 355 Update link display update-link-displays NIL 1 T OBSERVER NIL NIL NIL NIL SWITCH 698 84 877 117 show_provide_links show_provide_links 0 1 -1000 SWITCH 698 162 868 195 show_create_links show_create_links 0 1 -1000 SWITCH 698 125 869 158 show_review_links show_review_links 0 1 -1000 SWITCH 698 241 853 274 show_test_links show_test_links 0 1 -1000 SWITCH 698 281 884 314 show_translate_links show_translate_links 0 1 -1000 INPUTBOX 76 358 231 418 requirements_to_inject 1000 1 0 Number BUTTON 75 426 229 459 Inject Requirements inject-requirements NIL 1 T OBSERVER NIL NIL NIL NIL MONITOR 469 691 583 736 Review Actions reviewrequests 0 1 11 MONITOR 588 691 688 736 Test Actions testrequests 0 1 11 MONITOR 150 691 248 736 Requirements get_total_requirements 0 1 11 MONITOR 356 691 462 736 Total Iterations num_total_iterations 0 1 11 PLOT 248 511 694 681 Actions vs. Requests Requests (Requirements, Modifications) Actions 0.0 10.0 0.0 10.0 true true PENS "metadata" 1.0 0 -16777216 true "reviews" 1.0 0 -10899396 true "tests" 1.0 0 -13345367 true "end_of_development" 1.0 1 -2674135 true SLIDER 697 409 869 442 link_size link_size 1 100 50 1 1 NIL HORIZONTAL BUTTON 697 447 806 480 Redraw links update-link-weights NIL 1 T OBSERVER NIL NIL NIL NIL TEXTBOX 696 392 728 410 small 11 0.0 1 TEXTBOX 841 392 872 410 large 11 0.0 1 MONITOR 694 691 821 736 Metadata Elements get_total_metadata_elements 0 1 11 TEXTBOX 699 61 849 79 View Links by Type: 12 0.0 1 TEXTBOX 695 373 845 391 Set Relative Link Widths: 12 0.0 1 TEXTBOX 76 252 226 270 (2) Setup 12 0.0 1 TEXTBOX 76 54 226 84 (1) Set the numbers of actors for your project: 12 0.0 1 TEXTBOX 78 334 228 352 (3) Development Phase: 12 0.0 1 TEXTBOX 77 487 227 505 (4) Maintenance Phase: 12 0.0 1 INPUTBOX 77 509 232 569 modifications_to_inject 1500 1 0 Number BUTTON 77 575 228 608 Inject Modifications inject-modifications NIL 1 T OBSERVER NIL NIL NIL NIL MONITOR 254 691 350 736 Modifications total_modifications 0 1 11 TEXTBOX 292 18 655 38 Software Agent Maintenance Model (SWAMM) 16 0.0 1 MONITOR 320 744 451 789 Development Slope development_slope 0 1 11 MONITOR 456 744 583 789 Maintenance Slope maintenance_slope 0 1 11 @#$#@#$#@ WHAT IS IT? ----------- The Software Agent Maintenance Model (SWAMM) is a model of a software maintenance methodology developed at The University of Queensland for the purpose of addressing long-time problems in software maintenance. SWAMM models the methodology described in the references. Metadata is collected during development and used during maintenance activities to reduce overall cost of maintenance. HOW TO USE IT ------------- (1) Start in the upper left of the user interface. Select the number of customers that will provide requirements to a software project, the number of developers working on the project, the number of testers and the number of monitors (i.e. project managers or others with a reponsibility of reviewing work product). (2) Select the "Setup" button. That will create nodes ("turtles" or "agents" in NetLogo-speak) representing the actors you requested as well as nodes representing code and metadata about the software project. (3) Development Phase: Choose a number of requirements to inject into the software project during the development phase. Make sure to use the tab key or mouse to remove focus from the "requirements_to_inject" text input field so your number will be accepted. Select the "Inject Requirements" button when ready. This action will simulate customers requesting requirements to be coded and will result in development, testing and metadata collection occuring. You will see links created between the actors as development proceeds. Try selecting a link and noting its type ("breed") and weight (number of times it has occurred). You may inject more requirements at any time. (4) Maintenance Phase: Choose a number of modification requests to inject into the software project during the maintenance phase. Select the "Inject Modifications" button when ready. Note that a number of modifications was set for you when you injected requirements in (3) above. That number is suggested based on the 60/60 Rule of software maintenance and is representative of the amount of modifications expected in a typical software system with the number of requirements you specified earlier. Feel free to override it. Review the state of the network at the end of your project's maintenance phase. Look at the plot showing the amount of metadata created, the number of tests created and the number of reviews by monitors and customers. THINGS TO NOTICE ---------------- A single requirement or modification request may result in a number of iterations. The number of iterations for any particular request is calculated via a Poisson distribution. Poisson distributions are also used to calculate the number of code components to create for a given request. The number of metadata elements to create per code component, the number of tests to create and the number of metrics to create are estimated based on the number of relevant metadata elements in the SWAMM methodology times the number of requirements/modifications injected. Note that the amount of metadata, tests and reviews generated are substantial, compared to the number of requirements and software modifications, but that the complexity is linear. There are six different types (breeds) of links: provide, review, create, notify, test and translate. Visibility of each type may be turned on or off to assist you in seeing relationships between nodes. Turn the visibility on or off with the switches on the right and select the "Update link display" button. Widths of displayed links grow as the links' weight increases. You can change the relative widths of the links to make the display more clear by adjusting the "link_size" slider and selecting the "Redraw links" button. Scalability of the SWAMM model is limited by the ability of an information system to provide storage and query facilities for the metadata produced. Note that metadata is produced at a faster rate during development than during maintenance. This is because roughly 40% of maintenance activities do not result in the creation of new software components (by the 60/60 Rule: 60% of software cost is incurred during maintenance and 60% of maintenance activities relate to enhancements). Thus, the slope of the line representing the total number of metadata elements created compared to the number of requirements and modification requests is greater during development and lessens during the maintenance phase. This is shown in the monitors labeled "Development slope" and "Maintenance slope". THINGS TO TRY ------------- Vary the number of customers, developers, testers and monitors to see the impact on the methodology's performance. NETLOGO FEATURES ---------------- Link primitives are used to represent relationships between actors, code and metadata. Breeds are used to address different types of links and turtles. CREDITS AND REFERENCES ---------------------- Early versions of the software maintenance methodology modeled by SWAMM appeared in the following academic publications. My thanks to my co-authors, reviewers and editors. 1) Hyland-Wood, D., Carrington, D. and Kaplan, S. (2006). Enhancing Software Maintenance by using Semantic Web Techniques, Poster, International Semantic Web Conference (ISWC) 2006. 2) Hyland-Wood, D., Carrington, D. and Kaplan, S. (2006). Toward a Software Maintenance Methodology using Semantic Web Techniques, Proc. of Second International IEEE Workshop on Software Evolvability 2006. 3) Hyland-Wood, D., Carrington, D. and Kaplan, S. (2008). Toward a Software Maintenance Methodology using Semantic Web Techniques and Paradigmatic Documentation Modeling in Harrison, R. (ed). IET Software Special Issue on Software Evolability. To appear. Thanks to Uri Wilensky for producing NetLogo: Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL. @#$#@#$#@ 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 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 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 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 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 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 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 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 @#$#@#$#@ import-network @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@