Alberto Parmentola

Simulation models for economics

Project work on

"Facilities and knowledge in international trade."

 

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Oracle's Java site.


Here you can find an introduction to the Facilities and knowledge in international trade application.


powered by NetLogo

view/download model file: facilities_and_knowledge_in_international_trade.nlogo

WHAT IS IT?

The model deals with the research of Hausman and Hidalgo about the complexity, according to which an economy is complex when is able to product different items. This ability is given by the knowledges that people have, both explicit knowledge (what the person is conscious to know) and tacit knowledge (the deep knowledge). The model also deals with the growth of trade and knowledge relating to facilities.

HOW IT WORKS

The four states are represented by four patches of different colours. The four populations are represented by turtles of different colours. When people of the same population meet, they swap their knowledges, so the level of knowledges of the whole population grow; the growth of tacit knowledge is slower than that of explicit, because it is deeper and so more difficult to modify. When people from different countries meet, they trade and swap their knowledges. The possibility people have to move (and so to meet each other) is influenced by the level of facilities in the pacth on which they are at the moment.

HOW TO USE IT

Before playing SETUP it is possible to modify by sliders:

THINGS TO NOTICE

See the report.

THINGS TO TRY

It could be interesting to try to modify the values of knowledges and facilities in order to notice of the trades modify.

EXTENDING THE MODEL

It could be interesting to create a relationship between knowledges and the level of facilities: maybe facilities may grow when the knowledges grow.

NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

CREDITS AND REFERENCES

This model was created as final exam of the cours “dal cervello sociale all’emergere della societ√†”, directed by Prof. Ferdinando Rossi, in Scuola di Studi Superiori dell’Universi√† di Torino. The model was created by Alberto Parmentola, with the supervision of Prof. Pietro Terna, that I thanks heartily.

CODE

breed [highlanders]
breed [bellevuers]
breed [unionists]
breed [coldwaterers]
globals [highlands-transaction-number bellevue-transaction-number eastern-union-transaction-number coldwaters-transaction-number]

to setup
  clear-all
  reset-ticks
  ask patches [setup-highlands setup-bellevue setup-eastern-union setup-coldwaters]
  create-highlanders 5 [setxy random-float min-pxcor random-float max-pycor
    set color orange]
  create-bellevuers 5 [setxy random-float min-pxcor random-float min-pycor
    set color black]
  create-unionists 5 [setxy random-float max-pxcor random-float max-pycor
    set color white]
  create-coldwaterers 5 [setxy random-float max-pxcor random-float min-pxcor
    set color yellow]  
  set highlands-transaction-number 0
  set bellevue-transaction-number 0
  set eastern-union-transaction-number 0
  set coldwaters-transaction-number 0
end 

to go
  ask highlanders 
  [if pcolor = red [visit-highlands]
    if pcolor = green [visit-bellevue]
    if pcolor = pink [visit-eastern-union]
    if pcolor = blue [visit-coldwaters]
  ]
  ask bellevuers
  [if pcolor = red [visit-highlands]
    if pcolor = green [visit-bellevue]
    if pcolor = pink [visit-eastern-union]
    if pcolor = blue [visit-coldwaters]]
  ask unionists
  [if pcolor = red [visit-highlands]
    if pcolor = green [visit-bellevue]
    if pcolor = pink [visit-eastern-union]
    if pcolor = blue [visit-coldwaters]]
  ask coldwaterers
  [if pcolor = red [visit-highlands]
    if pcolor = green [visit-bellevue]
    if pcolor = pink [visit-eastern-union]
    if pcolor = blue [visit-coldwaters]]
  tick
  end 

to setup-highlands
  if (pxcor < 0) and (pycor >= 0) [set pcolor red]
end

to setup-bellevue
  if (pxcor < 0) and (pycor < 0) [set pcolor green]
end

to setup-eastern-union
  if (pxcor >= 0) and (pycor > 0) [set pcolor pink]
end

to setup-coldwaters
  if (pxcor >= 0) and (pycor <= 0) [set pcolor blue]
end

to visit-highlands
  if facilities-in-highlands = 0 [if random-float 1 < 0.05 [move-in-highlands]]
  if facilities-in-highlands = 1 [if random-float 1 < 0.10 [move-in-highlands]]
  if facilities-in-highlands = 2 [if random-float 1 < 0.30 [move-in-highlands]]
  if facilities-in-highlands = 3 [if random-float 1 < 0.50 [move-in-highlands]]
  if facilities-in-highlands = 4 [if random-float 1 < 0.70 [move-in-highlands]]
  if facilities-in-highlands = 5 [if random-float 1 < 0.90 [move-in-highlands]] 
end

to move-in-highlands
  lt random 360 forward 1
  if count highlanders in-radius 1 > 0
  [if color = orange [plus-highlanders-knowledge]
  if color = black [plus-highlanders-knowledge plus-bellevuers-knowledge highlands-commerce bellevue-commerce]
  if color = white [plus-highlanders-knowledge plus-unionists-knowledge highlands-commerce eastern-union-commerce]
  if color = yellow [plus-highlanders-knowledge plus-coldwaterers-knowledge highlands-commerce coldwaters-commerce]]
  end

to visit-bellevue
  if facilities-in-bellevue = 0 [if random-float 1 < 0.05 [move-in-bellevue]]
  if facilities-in-bellevue = 1 [if random-float 1 < 0.10 [move-in-bellevue]]
  if facilities-in-bellevue = 2 [if random-float 1 < 0.30 [move-in-bellevue]]
  if facilities-in-bellevue = 3 [if random-float 1 < 0.50 [move-in-bellevue]]
  if facilities-in-bellevue = 4 [if random-float 1 < 0.70 [move-in-bellevue]]
  if facilities-in-bellevue = 5 [if random-float 1 < 0.90 [move-in-bellevue]] 
end

to move-in-bellevue
  lt random 360 forward 1
  if count bellevuers in-radius 1 > 0
  [if color = orange [plus-bellevuers-knowledge plus-highlanders-knowledge bellevue-commerce highlands-commerce]
  if color = black [plus-bellevuers-knowledge]
  if color = white [plus-bellevuers-knowledge plus-unionists-knowledge bellevue-commerce eastern-union-commerce]
  if color = yellow [plus-bellevuers-knowledge plus-coldwaterers-knowledge bellevue-commerce coldwaters-commerce]] 
end

to visit-eastern-union
  if facilities-in-eastern-union = 0 [if random-float 1 < 0.05 [move-in-eastern-union]]
  if facilities-in-eastern-union = 1 [if random-float 1 < 0.10 [move-in-eastern-union]]
  if facilities-in-eastern-union = 2 [if random-float 1 < 0.30 [move-in-eastern-union]]
  if facilities-in-eastern-union = 3 [if random-float 1 < 0.50 [move-in-eastern-union]]
  if facilities-in-eastern-union = 4 [if random-float 1 < 0.70 [move-in-eastern-union]]
  if facilities-in-eastern-union = 5 [if random-float 1 < 0.90 [move-in-eastern-union]] 
end

to move-in-eastern-union
  lt random 360 forward 1
  if count unionists in-radius 1 > 0
  [if color = orange [plus-unionists-knowledge plus-highlanders-knowledge eastern-union-commerce highlands-commerce]
  if color = black [plus-unionists-knowledge plus-bellevuers-knowledge eastern-union-commerce bellevue-commerce]
  if color = white [plus-unionists-knowledge]
  if color = yellow [plus-unionists-knowledge plus-coldwaterers-knowledge eastern-union-commerce coldwaters-commerce]] 
end

to visit-coldwaters
  if facilities-in-coldwaters = 0 [if random-float 1 < 0.05 [move-in-coldwaters]]
  if facilities-in-coldwaters = 1 [if random-float 1 < 0.10 [move-in-coldwaters]]
  if facilities-in-coldwaters = 2 [if random-float 1 < 0.30 [move-in-coldwaters]]
  if facilities-in-coldwaters = 3 [if random-float 1 < 0.50 [move-in-coldwaters]]
  if facilities-in-coldwaters = 4 [if random-float 1 < 0.70 [move-in-coldwaters]]
  if facilities-in-coldwaters = 5 [if random-float 1 < 0.90 [move-in-coldwaters]] 
end

to move-in-coldwaters
  lt random 360 forward 1
  if count coldwaterers in-radius 1 > 0
  [if color = orange [plus-coldwaterers-knowledge plus-highlanders-knowledge coldwaters-commerce highlands-commerce]
  if color = black [plus-coldwaterers-knowledge plus-bellevuers-knowledge coldwaters-commerce bellevue-commerce]
  if color = white [plus-coldwaterers-knowledge plus-unionists-knowledge coldwaters-commerce eastern-union-commerce]
  if color = yellow [plus-coldwaterers-knowledge]] 
end


to plus-highlanders-knowledge
  set highlanders-tacit-knowledge highlanders-tacit-knowledge + 1
    set highlanders-explicit-knowledge highlanders-explicit-knowledge + 4
end

to plus-bellevuers-knowledge
  set bellevuers-tacit-knowledge bellevuers-tacit-knowledge + 1
    set bellevuers-explicit-knowledge bellevuers-explicit-knowledge + 4
end

to plus-unionists-knowledge
  set unionists-tacit-knowledge unionists-tacit-knowledge + 1
    set unionists-explicit-knowledge unionists-explicit-knowledge + 4
end

to plus-coldwaterers-knowledge
  set coldwaterers-tacit-knowledge coldwaterers-tacit-knowledge + 1
    set coldwaterers-explicit-knowledge coldwaterers-explicit-knowledge + 4
end

to highlands-commerce
  set highlands-transaction-number 
  highlands-transaction-number + (highlanders-tacit-knowledge) * 3 + highlanders-explicit-knowledge
end

to bellevue-commerce
  set bellevue-transaction-number 
  bellevue-transaction-number + (bellevuers-tacit-knowledge) * 3 + bellevuers-explicit-knowledge
end

to eastern-union-commerce
  set eastern-union-transaction-number 
    eastern-union-transaction-number + (unionists-tacit-knowledge) * 3 + unionists-explicit-knowledge
end

to coldwaters-commerce
  set coldwaters-transaction-number 
    coldwaters-transaction-number + (coldwaterers-tacit-knowledge) * 3 + coldwaterers-explicit-knowledge
end