Economic Interaction

Economic Interaction preview image

1 collaborator

Vennbr_small_copy John Margeson (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3 • Viewed 447 times • Downloaded 36 times • Run 0 times
Download the 'Economic Interaction' 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 [agent agents]

turtles-own [exchange starting-money]

to setup
  clear-all
  create-turtles num-turtles
  ask turtles [ set shape "circle"
                set color red
                setxy random-xcor random-ycor
                set starting-money random-float 10
    ]
  reset-ticks
end 

to go
  ask turtles [
    setxy random-xcor random-ycor
    ]
  bargain
  interact
  tick
end 

to bargain  ;;procedure where turtles exchange according to an algoithm
  ask turtles [
   set exchange ifelse-value (count turtles-on neighbors >= stock-exchange) [exchange + (starting-money + return-on-exchange - (return-on-exchange * tax-on-exchange))] [exchange]
   set color ifelse-value (exchange > mean [exchange] of turtles) [blue] [red]
  ]
end 

to interact
  ask turtles [
    if count turtles-on neighbors > 0 [
    set pcolor ifelse-value (max [exchange] of turtles-on neighbors >= [exchange] of self) [orange] [pink]
     ]
  ]
end 

There is only one version of this model, created about 8 years ago by John Margeson.

Attached files

File Type Description Last updated
Economic Interaction.png preview Preview for 'Economic Interaction' about 8 years ago, by John Margeson Download

This model does not have any ancestors.

This model does not have any descendants.