globals [ MoroccoBlock TurkeyBlock EgyptBlock AsiaBlock EuropeBlock MiddleEastBlock OutcomingCountries IncomingAreas M_gdp E_gdp T_gdp Eu_gdp MiddleEast_gdp Asia_gdp M_RemittancesReceived E_RemittancesReceived T_RemittancesReceived M_ConsumedRemittances E_ConsumedRemittances T_ConsumedRemittances r_M r_E r_T r_Eu r_MiddleEast r_Asia M_gdp_t-1 E_gdp_t-1 T_gdp_t-1 Eu_gdp_t-1 MiddleEast_gdp_t-1 Asia_gdp_t-1 ] breed [Moroccans Moroccan] breed [Egyptians Egyptian] breed [Turkishes Turkish] Moroccans-own [M_FamilyNumber] Egyptians-own [E_FamilyNumber] Turkishes-own [T_FamilyNumber] undirected-link-breed [familylinks familylink] turtles-own [ age status gender skills income dist wage remittances RemittancesReceived MyFamilyPW PotentialWage PotentialWealth years integration SavingsAbility SavingsNumRelatives InvestedRemittances ConsumedRemittances InvestedRemittances_t-1 MySituation1 MySituation2 MyPotentialSituation1 MyPotentialSituation2 ] to setup clear-all reset-ticks world generate variable end to world ; divide the world into 6 blocks set EuropeBlock patches with [pxcor > 0 and pycor >= 6 ] ask EuropeBlock [ set pcolor 86 ] set MiddleEastBlock patches with [ pxcor > 0 and pycor < 6 and pycor > -6 ] ask MiddleEastBlock [ set pcolor 96 ] set AsiaBlock patches with [ pxcor > 0 and pycor <= -6 ] ask AsiaBlock [ set pcolor 106 ] set MoroccoBlock patches with [ pxcor <= 0 and pycor >= 6 ] ask MoroccoBlock [ set pcolor 16 ] set EgyptBlock patches with [ pxcor <= 0 and pycor < 6 and pycor > -6 ] ask EgyptBlock [set pcolor 26 ] set TurkeyBlock patches with [ pxcor <= 0 and pycor <= -6 ] ask TurkeyBlock [ set pcolor 46 ] set IncomingAreas patches with [ pxcor > 0 ] set OutcomingCountries patches with [ pxcor <= 0 ] end to generate ; create popultation, pioneers and familylinks; assign gender, age, status to all agents and the years spent abroad to pioneers create-Moroccans (Morocco_population) ask Moroccans [move-to one-of MoroccoBlock set shape "person" set color black set status "NonMigrant"] let x 1 repeat (Morocco_population / NumRelatives) [ ask n-of (NumRelatives) Moroccans with [M_FamilyNumber = 0] [ set M_FamilyNumber x create-familylinks-with other Moroccans with [M_FamilyNumber = [M_FamilyNumber] of myself]] ask n-of (NumRelatives / 2) Moroccans with [M_FamilyNumber = x][set gender 1] if NumRelatives = 6 [ask n-of (1) Moroccans with [M_FamilyNumber = x][set age "old"] ask n-of (2) Moroccans with [M_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (3) Moroccans with [M_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 9 [ask n-of (2) Moroccans with [M_FamilyNumber = x][set age "old"] ask n-of (3) Moroccans with [M_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (4) Moroccans with [M_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 12 [ask n-of (3) Moroccans with [M_FamilyNumber = x][set age "old"] ask n-of (4) Moroccans with [M_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (5) Moroccans with [M_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] ask one-of Moroccans with [M_FamilyNumber = x] with [gender = 1] with [age !="old"][set status "Migrant" set years 0 move-to one-of IncomingAreas] set x x + 1] create-Egyptians (Egypt_population) ask Egyptians [move-to one-of EgyptBlock set shape "person" set color black set status "NonMigrant"] set x 1 repeat (Egypt_population / NumRelatives) [ ask n-of (NumRelatives) Egyptians with [E_FamilyNumber = 0] [ set E_FamilyNumber x create-familylinks-with other Egyptians with [E_FamilyNumber = [E_FamilyNumber] of myself]] ask n-of (NumRelatives / 2) Egyptians with [E_FamilyNumber = x][set gender 1] if NumRelatives = 6 [ask n-of (1) Egyptians with [E_FamilyNumber = x][set age "old"] ask n-of (2) Egyptians with [E_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (3) Egyptians with [E_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 9 [ask n-of (2) Egyptians with [E_FamilyNumber = x][set age "old"] ask n-of (3) Egyptians with [E_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (4) Egyptians with [E_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 12 [ask n-of (3) Egyptians with [E_FamilyNumber = x][set age "old"] ask n-of (4) Egyptians with [E_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (5) Egyptians with [E_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] ask one-of Egyptians with [E_FamilyNumber = x] with [gender = 1] with [age != "old"][set status "Migrant" set years 0 move-to one-of IncomingAreas] set x x + 1] create-Turkishes (Turkey_population) ask Turkishes [move-to one-of TurkeyBlock set shape "person" set color black set status "NonMigrant"] set x 1 repeat (Turkey_population / NumRelatives) [ ask n-of (NumRelatives) Turkishes with [T_FamilyNumber = 0] [ set T_FamilyNumber x create-familylinks-with other Turkishes with [T_FamilyNumber = [T_FamilyNumber] of myself]] ask n-of (NumRelatives / 2) Turkishes with [T_FamilyNumber = x][set gender 1] if NumRelatives = 6 [ask n-of (1) Turkishes with [T_FamilyNumber = x][set age "old"] ask n-of (2) Turkishes with [T_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (3) Turkishes with [T_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 9 [ask n-of (2) Turkishes with [T_FamilyNumber = x][set age "old"] ask n-of (3) Turkishes with [T_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (4) Turkishes with [T_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] if NumRelatives = 12 [ask n-of (3) Turkishes with [T_FamilyNumber = x][set age "old"] ask n-of (4) Turkishes with [T_FamilyNumber = x] with [age !="old"][set age "adult"] ask n-of (5) Turkishes with [T_FamilyNumber = x] with [age !="old"] with [age != "adult"][set age "young"]] ask one-of Turkishes with [T_FamilyNumber = x] with [gender = 1] with [age != "old"][set status "Migrant" set years 0 move-to one-of IncomingAreas] set x x + 1] ask links [ifelse show-links? [set color black - 2] [hide-link]] end to variable ; assign variables to agents and countries ask Moroccans [let r random-float 1 ; assign skills to all agents according to probabilities setted in the interface ifelse r < Mp_no_edu [set skills 0] [ifelse r < (Mp_no_edu + Mp_edu_1) [set skills 1] [ifelse r < (Mp_no_edu + Mp_edu_1 + Mp_edu_2) [set skills 2] [ifelse r < (Mp_no_edu + Mp_edu_1 + Mp_edu_2 + Mp_edu_3) [set skills 3] [set skills 4]]]]] ask Egyptians [let r random-float 1 ifelse r < Ep_no_edu [set skills 0] [ifelse r < (Ep_no_edu + Ep_edu_1) [set skills 1] [ifelse r < (Ep_no_edu + Ep_edu_1 + Ep_edu_2) [set skills 2] [ifelse r < (Ep_no_edu + Ep_edu_1 + Ep_edu_2 + Ep_edu_3) [set skills 3] [set skills 4]]]]] ask Turkishes [let r random-float 1 ifelse r < Tp_no_edu [set skills 0] [ifelse r < (Tp_no_edu + Tp_edu_1) [set skills 1] [ifelse r < (Tp_no_edu + Tp_edu_1 + Tp_edu_2) [set skills 2] [ifelse r < (Tp_no_edu + Tp_edu_1 + Tp_edu_2 + Tp_edu_3) [set skills 3] [set skills 4]]]]] ask Moroccans [if random-normal M_value_mean M_value_deviation > 0 [set income random-normal M_value_mean M_value_deviation]] ; assign income to all agents according to a Normal distribution with mean and standard deviation setted in the interface ask Egyptians [if random-normal E_value_mean E_value_deviation > 0 [set income random-normal E_value_mean E_value_deviation]] ask Turkishes [if random-normal T_value_mean T_value_deviation > 0 [set income random-normal T_value_mean T_value_deviation]] ask turtles [ifelse skills = 1 [set SavingsAbility 0.02][ifelse skills = 2 [set SavingsAbility 0.04] [ifelse skills = 3 [set SavingsAbility 0.06][ifelse skills = 4 [set SavingsAbility 0.08][set SavingsAbility 0.10]]]]] ; assign saving ability according to skills set M_gdp 50000 set E_gdp 100000 set T_gdp 150000 set Eu_gdp 450000 set MiddleEast_gdp 150000 set Asia_gdp 300000 ; assign gdp to countries if any? Moroccans-on EuropeBlock [ask Moroccans-on EuropeBlock [set dist 1 ask familylink-neighbors [set dist 1]]] ; assign the distance between the family and the pioneer if any? Moroccans-on MiddleEastBlock [ask Moroccans-on MiddleEastBlock [set dist 3 ask familylink-neighbors [set dist 3]]] if any? Moroccans-on AsiaBlock [ask Moroccans-on AsiaBlock [set dist 6 ask familylink-neighbors [set dist 6]]] if any? Egyptians-on EuropeBlock [ask Egyptians-on EuropeBlock [set dist 3 ask familylink-neighbors [set dist 3]]] if any? Egyptians-on MiddleEastBlock [ask Egyptians-on MiddleEastBlock [set dist 1 ask familylink-neighbors [set dist 1]]] if any? Egyptians-on AsiaBlock [ask Egyptians-on AsiaBlock [set dist 5 ask familylink-neighbors [set dist 5]]] if any? Turkishes-on EuropeBlock [ask Turkishes-on EuropeBlock [set dist 2 ask familylink-neighbors [set dist 2]]] if any? Turkishes-on MiddleEastBlock [ask Turkishes-on MiddleEastBlock [set dist 2 ask familylink-neighbors [set dist 2]]] if any? Turkishes-on AsiaBlock [ask Turkishes-on AsiaBlock [set dist 4 ask familylink-neighbors [set dist 4]]] end to go if ticks = 25 [stop] SetVariables Migration ComeBack SetGlobals tick end to SetVariables ; assign to agents the variables that change every ticks *non solo!!! set M_gdp_t-1 M_gdp set E_gdp_t-1 E_gdp set T_gdp_t-1 T_gdp set Eu_gdp_t-1 Eu_gdp set MiddleEast_gdp_t-1 MiddleEast_gdp set Asia_gdp_t-1 Asia_gdp ; at t = 1 set gdp_t-1 as gdp of t = 0 ifelse ticks < 1 [set r_M 0][set r_M r_M] ; at t = 0 set growth rate at 0 ifelse ticks < 1 [set r_E 0][set r_E r_E] ifelse ticks < 1 [set r_T 0][set r_T r_T] ask turtles [set InvestedRemittances_t-1 InvestedRemittances] ask turtles-on IncomingAreas [set years (years + 1)] ; increases years spent abroad every tick ask turtles-on MoroccoBlock [ifelse age = "young" [set wage 0] ; assign wage to agents on OutcomingCountries [ifelse age = "adult" [set wage ((2000 * skills) + (M_gdp / 25))] [set wage (0.6 * ((2000 * skills) + (M_gdp / 25)))]]] ask turtles-on EgyptBlock [ifelse age = "young" [set wage 0] [ifelse age = "adult" [set wage ((2000 * skills) + (E_gdp / 25))] [set wage (0.6 * ((2000 * skills) + (E_gdp / 25)))]]] ask turtles-on TurkeyBlock [ifelse age = "young" [set wage 0] [ifelse age = "adult" [set wage ((2000 * skills) + (T_gdp / 25))] [set wage (0.6 * ((2000 * skills) + (T_gdp / 25)))]]] ask turtles-on EuropeBlock ; assign wage and level of integration to pioneers [if age = "young" [set wage ((3000 * skills) + (Eu_gdp / 25))] if age = "adult" [set wage ((3000 * skills) + (Eu_gdp / 25))]] ask turtles-on MiddleEastBlock [if age = "young" [set wage ((3000 * skills) + (MiddleEast_gdp / 25))] if age = "adult" [set wage ((3000 * skills) + (MiddleEast_gdp / 25))]] ask turtles-on AsiaBlock [if age = "young" [set wage ((3000 * skills) + (Asia_gdp / 25))] if age = "adult" [set wage ((3000 * skills) + (Asia_gdp / 25))]] ask turtles-on EuropeBlock [ifelse Eu_integration = "high" [set integration 0.9][ifelse Eu_integration = "medium" [set integration 0.8][set integration 0.7]]] ; assign the level of integration according to the interface ask turtles-on MiddleEastBlock [ifelse MiddleEast_integration = "high" [set integration 0.9][ifelse MiddleEast_integration = "medium" [set integration 0.8][set integration 0.7]]] ask turtles-on AsiaBlock [ifelse Asia_integration = "high" [set integration 0.9][ifelse Asia_integration = "medium" [set integration 0.8][set integration 0.7]]] ask turtles-on IncomingAreas [set SavingsNumRelatives ((count link-neighbors with [status = "NonMigrant"]) * 0.005)] ; assign to pioneers a parameter for the level of savings according to the numbers of relatives at home ask turtles-on OutcomingCountries [ifelse (count link-neighbors with [status = "NonMigrant"]) = 2 [set SavingsNumRelatives 0.02] ; assign a parameter for the level of savings according to the numbers of relatives abroad [ifelse (count link-neighbors with [status = "NonMigrant"]) = 3 [set SavingsNumRelatives 0.02] [ifelse (count link-neighbors with [status = "NonMigrant"]) = 4 [set SavingsNumRelatives 0.04] [ifelse (count link-neighbors with [status = "NonMigrant"]) = 5 [set SavingsNumRelatives 0.06] [ifelse (count link-neighbors with [status = "NonMigrant"]) = 6 [set SavingsNumRelatives 0.04] [ifelse (count link-neighbors with [status = "NonMigrant"]) = 7 [set SavingsNumRelatives 0.02] [ifelse (count link-neighbors with [status = "NonMigrant"]) = 8 [set SavingsNumRelatives 0.02][set SavingsNumRelatives 0]]]]]]]] ask turtles with [status = "Migrant"] [set remittances ((wage * (SavingsAbility + SavingsNumRelatives + 0.1)) / (count link-neighbors with [status = "NonMigrant"]))] ; assign remittances to pioneer ask turtles with [status = "NonMigrant"] [set RemittancesReceived (sum [remittances] of link-neighbors with [status = "Migrant"])] ; assign remittances received to relatives ask turtles with [status = "NonMigrant"] with [age != "young"] [let r ((0 - 0.035) + random-float 0.7) ; assign invested remittances if age = "adult" [set InvestedRemittances ((InvestedRemittances * (1 + r)) + (RemittancesReceived * (SavingsAbility + SavingsNumRelatives)))] if age = "old" [set InvestedRemittances ((InvestedRemittances * (1 + r)) + (RemittancesReceived * ((SavingsAbility + SavingsNumRelatives) * 1.05)))]] ask turtles with [status = "NonMigrant"] with [age != "young"] [if age = "adult" [set ConsumedRemittances RemittancesReceived - RemittancesReceived * (SavingsAbility + SavingsNumRelatives)] if age = "old" [ set ConsumedRemittances RemittancesReceived - (RemittancesReceived * (SavingsAbility + SavingsNumRelatives)) * 1.05]] ask turtles-on OutcomingCountries [if any? link-neighbors with [status = "Migrant"] ; assign to agents on Outcoming countries the potential wage [set PotentialWage (mean [wage] of link-neighbors with [status = "Migrant"])] ask link-neighbors with [status = "Migrant"] [set MyFamilyPW [PotentialWage] of myself]] ask turtles-on IncomingAreas [set PotentialWage (mean [wage] of familylink-neighbors with [status = "NonMigrant"]) ; assign to pioneers the potential wage and the potential wealth set PotentialWealth (mean [InvestedRemittances] of familylink-neighbors with [status = "NonMigrant"])] end to Migration ; new migration from Outcoming countries ask Moroccans with [status = "NonMigrant"] [let stability 0 if M_politics = "stable" [set stability 1] set MySituation1 ((dist / max [dist] of turtles-on MoroccoBlock) + (wage / max [wage] of turtles-on MoroccoBlock) + 0.5 * (income / max [income] of turtles-on MoroccoBlock) + 0.001 * (count link-neighbors with [status = "NonMigrant"] / (NumRelatives - 2)) + 0.3 * (InvestedRemittances / max [InvestedRemittances] of turtles-on MoroccoBlock) + 100 * r_M - 0.1 * gender - (skills / 4) + 0.1 * stability)] ask Egyptians with [status = "NonMigrant"] [let stability 0 if E_politics = "stable" [set stability 1] set MySituation1 ((dist / max [dist] of turtles-on EgyptBlock) + (wage / max [wage] of turtles-on EgyptBlock) + 0.5 * (income / max [income] of turtles-on EgyptBlock) + 0.001 * (count link-neighbors with [status = "NonMigrant"] / (NumRelatives - 2)) + 0.3 * (InvestedRemittances / max [InvestedRemittances] of turtles-on EgyptBlock) + 100 * r_E - 0.1 * gender - (skills / 4) + 0.1 * stability)] ask Turkishes with [status = "NonMigrant"] [let stability 0 if T_politics = "stable" [set stability 1] set MySituation1 ((dist / max [dist] of turtles-on TurkeyBlock) + (wage / max [wage] of turtles-on TurkeyBlock) + 0.5 * (income / max [income] of turtles-on TurkeyBlock) + 0.001 * (count link-neighbors with [status = "NonMigrant"] / (NumRelatives - 2)) + 0.3 * (InvestedRemittances / max [InvestedRemittances] of turtles-on TurkeyBlock) + 100 * r_T - 0.1 * gender - (skills / 4) + 0.1 * stability)] ask EuropeBlock [if any? turtles-here [ask one-of turtles-here ;chiedo ad un solo agente per patch (cioè ad uno solo per famiglia) [if any? familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [ask min-one-of familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [MySituation1] [let restrictions 0 if Eu_barriers = "high" [set restrictions 1] set MyPotentialSituation1 (100 * r_Eu + 0.5 * (PotentialWage / max [MyFamilyPW] of turtles-on EuropeBlock) - 0.1 * restrictions) if MySituation1 < MyPotentialSituation1 [move-to myself set status "Migrant" set RemittancesReceived 0 set MySituation1 0 set MyPotentialSituation1 0 set years 0]]]]]] ; prendono tutte le variabili che aveva preso il pioniere al tempo t=0 ask MiddleEastBlock [if any? turtles-here [ask one-of turtles-here ;chiedo ad un solo agente per patch (cioè ad uno solo per famiglia) [if any? familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [ask min-one-of familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [MySituation1] [let restrictions 0 if MiddleEast_barriers = "high" [set restrictions 1] set MyPotentialSituation1 (100 * r_MiddleEast + 0.5 * (PotentialWage / max [MyFamilyPW] of turtles-on MiddleEastBlock) - 0.1 * restrictions) if MySituation1 < MyPotentialSituation1 [move-to myself set status "Migrant" set RemittancesReceived 0 set MySituation1 0 set MyPotentialSituation1 0 set years 0]]]]]] ask AsiaBlock [if any? turtles-here [ask one-of turtles-here ;chiedo ad un solo agente per patch (cioè ad uno solo per famiglia) [if any? familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [ask min-one-of familylink-neighbors with [status = "NonMigrant"] with [age != "old"] [MySituation1] [let restrictions 0 if Asia_barriers = "high" [set restrictions 1] set MyPotentialSituation1 (100 * r_Asia + 0.5 * (PotentialWage / max [MyFamilyPW] of turtles-on AsiaBlock) - 0.1 * restrictions) if MySituation1 < MyPotentialSituation1 [move-to myself set status "Migrant" set RemittancesReceived 0 set MySituation1 0 set MyPotentialSituation1 0 set years 0]]]]]] ask IncomingAreas [if any? turtles-here [ask one-of turtles-here [set size 1 + (0.1 * (count turtles-here - 1))]]] end to ComeBack ; migrants go back to the original country ask EuropeBlock [if any? Moroccans-here with [years > 8] [ask Moroccans-here with [years > 8] [let stability 0 if M_politics = "stable" [set stability 1] set MySituation2 (100 * r_M + (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Moroccans-on EuropeBlock) - (dist / max [dist] of Moroccans-on EuropeBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Moroccans-on EuropeBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Moroccans-on EuropeBlock) + 100 * r_Eu) ] ask min-one-of Moroccans-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of MoroccoBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Egyptians-here with [years > 8] [ask Egyptians-here with [years > 8] [let stability 0 if E_politics = "stable" [set stability 1] set MySituation2 (100 * r_E + (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Egyptians-on EuropeBlock) - (dist / max [dist] of Egyptians-on EuropeBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Egyptians-on EuropeBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Egyptians-on EuropeBlock) + 100 * r_Eu) ] ask min-one-of Egyptians-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of EgyptBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Turkishes-here with [years > 8] [ask Turkishes-here with [years > 8] [let stability 0 if T_politics = "stable" [set stability 1] set MySituation2 (100 * r_T + 1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Turkishes-on EuropeBlock) - (dist / max [dist] of Turkishes-on EuropeBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Turkishes-on EuropeBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Turkishes-on EuropeBlock) + 100 * r_Eu) ] ask min-one-of Turkishes-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of TurkeyBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]]] ask MiddleEastBlock [if any? Moroccans-here with [years > 8] [ask Moroccans-here with [years > 8] [let stability 0 if M_politics = "stable" [set stability 1] set MySituation2 (100 * r_M + 1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Moroccans-on MiddleEastBlock) - (dist / max [dist] of Moroccans-on MiddleEastBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 *(PotentialWage / max [PotentialWage] of Moroccans-on MiddleEastBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Moroccans-on MiddleEastBlock) + 100 * r_MiddleEast) ] ask min-one-of Moroccans-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of MoroccoBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Egyptians-here with [years > 8] [ask Egyptians-here with [years > 8] [let stability 0 if E_politics = "stable" [set stability 1] set MySituation2 (100 * r_E + 1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Egyptians-on MiddleEastBlock) - (dist / max [dist] of Egyptians-on MiddleEastBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Egyptians-on MiddleEastBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Egyptians-on MiddleEastBlock) + 100 * r_MiddleEast) ] ask min-one-of Egyptians-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of EgyptBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Turkishes-here with [years > 8] [ask Turkishes-here with [years > 8] [let stability 0 if T_politics = "stable" [set stability 1] set MySituation2 (100 * r_T + 1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Turkishes-on MiddleEastBlock) - (dist / max [dist] of Turkishes-on MiddleEastBlock) - gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Turkishes-on MiddleEastBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Turkishes-on MiddleEastBlock) + 100 * r_MiddleEast) ] ask min-one-of Turkishes-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of TurkeyBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]]] ask AsiaBlock [if any? Moroccans-here with [years > 8] [ask Moroccans-here with [years > 8] [let stability 0 if M_politics = "stable" [set stability 1] set MySituation2 (100 * r_M + 1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Moroccans-on AsiaBlock) - (dist / max [dist] of Moroccans-on AsiaBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Moroccans-on AsiaBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Moroccans-on AsiaBlock) + 100 * r_Asia) ] ask min-one-of Moroccans-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of MoroccoBlock set status "ReturnNonMigrant" set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Egyptians-here with [years > 8] [ask Egyptians-here with [years > 8] [let stability 0 if E_politics = "stable" [set stability 1] set MySituation2 (100 * r_E + 1.1 * (integration / 0.9) + 0.001 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Egyptians-on AsiaBlock) - (dist / max [dist] of Egyptians-on AsiaBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Egyptians-on AsiaBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Egyptians-on AsiaBlock) + 100 * r_Asia) ] ask min-one-of Egyptians-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of EgyptBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]] if any? Turkishes-here with [years > 8] [ask Turkishes-here with [years > 8] [let stability 0 if T_politics = "stable" [set stability 1] set MySituation2 (100 * r_T + 1 * (integration / 0.9) + 0.01 * ((count link-neighbors with [status = "Migrant"]) / (NumRelatives - 3)) + (wage / max [wage] of Turkishes-on AsiaBlock) - (dist / max [dist] of Turkishes-on AsiaBlock) - 0.1 * gender ) set MyPotentialSituation2 (0.1 * stability + 0.5 * (PotentialWage / max [PotentialWage] of Turkishes-on AsiaBlock) + 0.3 * (PotentialWealth / max [PotentialWealth] of Turkishes-on AsiaBlock) + 100 * r_Asia) ] ask min-one-of Turkishes-here with [years > 8] [MySituation2] [if MySituation2 < MyPotentialSituation2 [move-to one-of TurkeyBlock set status "ReturnNonMigrant" set remittances 0 set MySituation2 0 set MyPotentialSituation2 0 ]]]] end to SetGlobals ; set variables at the end of the cycle set M_RemittancesReceived M_RemittancesReceived + sum [RemittancesReceived] of turtles-on MoroccoBlock ; sum remittances received by each country set E_RemittancesReceived E_RemittancesReceived + sum [RemittancesReceived] of turtles-on EgyptBlock set T_RemittancesReceived T_RemittancesReceived + sum [RemittancesReceived] of turtles-on TurkeyBlock set M_ConsumedRemittances M_ConsumedRemittances + sum [ConsumedRemittances] of turtles-on MoroccoBlock set E_ConsumedRemittances E_ConsumedRemittances + sum [ConsumedRemittances] of turtles-on EgyptBlock set T_ConsumedRemittances T_ConsumedRemittances + sum [ConsumedRemittances] of turtles-on TurkeyBlock set M_gdp (M_gdp + ((M_ConsumedRemittances + sum [InvestedRemittances] of turtles-on MoroccoBlock - sum [InvestedRemittances_t-1] of turtles-on MoroccoBlock)* 0.0001)) set E_gdp (E_gdp + ((E_ConsumedRemittances + sum [InvestedRemittances] of turtles-on EgyptBlock - sum [InvestedRemittances_t-1] of turtles-on EgyptBlock)* 0.0001)) ; sum the total remittances received to the gdp of the Outcoming country set T_gdp (T_gdp + ((T_ConsumedRemittances + sum [InvestedRemittances] of turtles-on TurkeyBlock - sum [InvestedRemittances_t-1] of turtles-on TurkeyBlock)* 0.0001)) set Eu_gdp (Eu_gdp + 0.0001 * sum [wage] of turtles-on EuropeBlock ) ; sum total wages - remittances to the gdp of the Incoming countries set MiddleEast_gdp (MiddleEast_gdp + 0.0001 * sum [wage] of turtles-on MiddleEastBlock) set Asia_gdp (Asia_gdp + 0.0001 * sum [wage] of turtles-on AsiaBlock) set r_M ((M_gdp / M_gdp_t-1) - 1) ; set the growth rate set r_E ((E_gdp / E_gdp_t-1) - 1) set r_T ((T_gdp / T_gdp_t-1) - 1) set r_Eu (( Eu_gdp - Eu_gdp_t-1) / Eu_gdp_t-1) set r_MiddleEast (( MiddleEast_gdp - MiddleEast_gdp_t-1) / MiddleEast_gdp_t-1) set r_Asia (( Asia_gdp - Asia_gdp_t-1) / Asia_gdp_t-1) end @#$#@#$#@ GRAPHICS-WINDOW 26 17 354 366 16 16 9.64 1 10 1 1 1 0 0 0 1 -16 16 -16 16 1 1 1 ticks 30.0 BUTTON 39 380 105 413 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 40 479 200 512 Morocco_population Morocco_population 72 360 108 36 1 NIL HORIZONTAL SLIDER 40 431 199 464 NumRelatives NumRelatives 6 12 9 3 1 NIL HORIZONTAL SLIDER 568 485 731 518 Turkey_population Turkey_population 72 360 108 36 1 NIL HORIZONTAL SLIDER 303 483 465 516 Egypt_population Egypt_population 72 360 108 36 1 NIL HORIZONTAL SLIDER 36 869 166 902 M_value_mean M_value_mean 2000 4000 4000 500 1 NIL HORIZONTAL SLIDER 36 906 165 939 M_value_deviation M_value_deviation 0 1000 1000 100 1 NIL HORIZONTAL INPUTBOX 170 612 247 672 Mp_no_edu 0.2 1 0 Number INPUTBOX 251 612 323 672 Mp_edu_1 0.2 1 0 Number INPUTBOX 327 613 397 673 Mp_edu_2 0.2 1 0 Number INPUTBOX 402 613 472 673 Mp_edu_3 0.2 1 0 Number TEXTBOX 39 633 189 661 Morrocans' education probabilities 11 0.0 1 INPUTBOX 170 676 247 736 Ep_no_edu 0.2 1 0 Number INPUTBOX 252 676 323 736 Ep_edu_1 0.2 1 0 Number INPUTBOX 327 676 397 736 Ep_edu_2 0.2 1 0 Number INPUTBOX 403 677 472 737 Ep_edu_3 0.2 1 0 Number INPUTBOX 170 741 247 801 Tp_no_edu 0.2 1 0 Number INPUTBOX 252 742 323 802 Tp_edu_1 0.2 1 0 Number INPUTBOX 327 742 398 802 Tp_edu_2 0.2 1 0 Number INPUTBOX 403 742 472 802 Tp_edu_3 0.2 1 0 Number TEXTBOX 39 695 155 723 Egyptians' education probabilities 11 0.0 1 TEXTBOX 36 751 186 779 Turkishes' education probabilities 11 0.0 1 MONITOR 476 617 546 662 Mp_edu_4 1 - (Mp_no_edu + Mp_edu_1 + Mp_edu_2 + Mp_edu_3) 2 1 11 MONITOR 477 681 547 726 Ep_edu_4 1 - ( Ep_no_edu + Ep_edu_1 + Ep_edu_2 + Ep_edu_3 ) 2 1 11 MONITOR 477 744 545 789 Tp_edu_4 1 - ( Tp_no_edu + Tp_edu_1 + Tp_edu_2 + Tp_edu_3 ) 2 1 11 TEXTBOX 35 831 220 859 Normal Distribution of Income 11 0.0 1 MONITOR 203 476 274 521 M_numfam Morocco_population / numrelatives 0 1 11 MONITOR 734 479 807 524 T_numfam Turkey_population / numrelatives 0 1 11 MONITOR 469 477 542 522 E_numfam Egypt_population / numrelatives 0 1 11 SLIDER 181 869 310 902 E_value_mean E_value_mean 2000 6000 6000 500 1 NIL HORIZONTAL SLIDER 181 908 311 941 E_value_deviation E_value_deviation 0 1000 1000 100 1 NIL HORIZONTAL SLIDER 326 870 455 903 T_value_mean T_value_mean 2000 8000 8000 500 1 NIL HORIZONTAL SLIDER 326 908 455 941 T_value_deviation T_value_deviation 0 1000 1000 100 1 NIL HORIZONTAL TEXTBOX 36 849 102 867 Morocco 11 0.0 1 TEXTBOX 182 849 235 867 Egypt 11 0.0 1 TEXTBOX 326 851 395 869 Turkey 11 0.0 1 BUTTON 110 380 183 413 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 MONITOR 765 75 897 120 migrants in Europe count turtles-on EuropeBlock 17 1 11 MONITOR 765 124 897 169 migrants in MiddleEast count turtles-on MiddleEastBlock 17 1 11 MONITOR 766 172 899 217 migrants in Asia count turtles-on AsiaBlock 17 1 11 MONITOR 423 72 559 117 Migrants from Morocco Morocco_population - count turtles-on MoroccoBlock 17 1 11 MONITOR 424 121 561 166 Migrants from Egypt Egypt_population - count turtles-on EgyptBlock 17 1 11 MONITOR 425 170 562 215 Migrants from Turkey Turkey_population - count turtles-on TurkeyBlock 17 1 11 SWITCH 189 382 304 415 show-links? show-links? 0 1 -1000 TEXTBOX 365 47 387 178 E\nU\nR\nO\nP\nE 12 0.0 1 TEXTBOX 364 149 387 303 M\nI\nD\nD\nL\nE\n\nE\nA\nS\nT 8 0.0 1 TEXTBOX 363 283 378 351 A\nS\nI\nA 12 0.0 1 TEXTBOX 9 42 26 147 M\nO\nR\nO\nC\nC\nO 10 0.0 1 TEXTBOX 8 156 24 241 E\nG\nY\nP\nT\n 12 0.0 1 TEXTBOX 8 257 28 364 T\nU\nR\nK\nE\nY 12 0.0 1 TEXTBOX 130 565 453 591 OUTCOMING COUNTRIES' DATA SET 16 10.0 1 TEXTBOX 560 593 583 1023 |\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n 16 0.0 1 TEXTBOX 601 564 866 604 INCOMING AREAS' DATA SET 16 10.0 1 TEXTBOX 607 19 797 59 COMPARATIVE DATA 16 10.0 1 TEXTBOX 438 43 617 61 OUTCOMING COUTRIES' DATA 11 0.0 1 TEXTBOX 782 44 932 62 INCOMING AREAS' DATA 11 0.0 1 CHOOSER 600 611 692 656 Eu_barriers Eu_barriers "high" "low" 1 CHOOSER 822 612 917 657 Asia_barriers Asia_barriers "high" "low" 1 CHOOSER 700 612 815 657 MiddleEast_barriers MiddleEast_barriers "high" "low" 1 TEXTBOX 600 592 750 610 Restrictions on immigration 11 0.0 1 CHOOSER 37 970 166 1015 M_politics M_politics "stable" "unstable" 0 CHOOSER 179 971 312 1016 E_politics E_politics "stable" "unstable" 0 CHOOSER 326 970 455 1015 T_politics T_politics "stable" "unstable" 0 PLOT 425 232 698 457 Remittances Received time RemittancesReceived 0.0 25.0 0.0 200.0 true true "" "" PENS "Morocco" 1.0 0 -5298144 true "" "plotxy ticks (0.001 * sum [RemittancesReceived] of Moroccans with [status = \"NonMigrant\"])" "Egypt" 1.0 0 -817084 true "" "plotxy ticks (0.001 * sum [RemittancesReceived] of Egyptians with [status = \"NonMigrant\"])" "Turkey" 1.0 0 -987046 true "" "plotxy ticks (0.001 * sum [RemittancesReceived] of Turkishes with [status = \"NonMigrant\"])" TEXTBOX 37 951 187 969 Political stability 11 0.0 1 PLOT 767 231 1053 457 Growth rates of Incoming Areas time rates 0.0 25.0 0.0 0.5 true true "" "" PENS "Europe" 1.0 0 -8990512 true "" "plotxy ticks r_Eu * 1000" "MiddleEast" 1.0 0 -11033397 true "" "plotxy ticks r_MiddleEast * 1000" "Asia" 1.0 0 -10649926 true "" "plotxy ticks r_Asia * 1000" CHOOSER 600 681 692 726 Eu_integration Eu_integration "high" "medium" "low" 1 CHOOSER 701 682 816 727 MiddleEast_integration MiddleEast_integration "high" "medium" "low" 1 CHOOSER 822 682 918 727 Asia_integration Asia_integration "high" "medium" "low" 1 TEXTBOX 602 664 752 682 Level of integration 11 0.0 1 MONITOR 566 72 640 117 M returned count Moroccans with [status = \"ReturnNonMigrant\"] 17 1 11 MONITOR 566 122 638 167 E returned count Egyptians with [status = \"ReturnNonMigrant\"] 17 1 11 MONITOR 566 171 638 216 T returned count Turkishes with [status = \"ReturnNonMigrant\"] 17 1 11 @#$#@#$#@ ## WHAT IS IT? In this model, we try to study how people migrate. In order to do so, we will consider both exogenous and endogenous variable that can influence, respectively, their decisions to leave their birthplace and their decisions to come back. ## HOW IT WORKS The first step is to make agents deciding whether to leave or not their country of origin according to a rule that asses their current situation and the potential situation that they would find abroad. The second step consists in letting agents decide whether to come back to their country of origin after a certain number of years spent abroad. Again, this decision will be taken according to a rule that considers actual and potential wellbeing of the agent. The process will take place over a period of 25 years. ## HOW TO USE IT Users of the model may choose through the sliders the size of the population and the dimension of each family. They can also choose the distribution of incomes across the population (setting the mean and the standard deviation). Using the choosers they can set the barrier of entry that the migrant will face and the integration level of the migrant in the host country. Moreover, they can choose the (political) stability of the outcoming countries. The users are let free whether to show or not the links between the relatives. Finally, they can choose through the inputs the probability according to which the skills are distributed across the population. ## THINGS TO NOTICE After the "setup", you can see the pioneer already distributed in the host countries, while their relatives are placed in the country of origin. After the "go", agents will start to move and reach their relatives in the host countries. As agents start to rejoin their relatives, the user will see that the pioneers will increase their size to testify the increase in the size of the family rejoined. From a certain point in time onward, the agents will start to comeback to their birthplace. At the end of the process, the user can appreciate the variation in the remittances received by the outcoming areas and the changes in the growth rates of the incoming countries following the emigration process. ## THINGS TO TRY We suggest to look at the experiments in our paper. ## EXTENDING THE MODEL People interested in developing this model might find interesting to simulate the effect of a crisis in the incoming areas. A crisis might happen at the beginning of the emigration process as well as in the middle. Of course, the timing will have a great importance in determining the effects of the crisis. Moreover, we did not let the possibility for the migrants to borrow money in order to finance their departures. One might find interesting to create this opportunity. ## CREDITS AND REFERENCES Dalen, H.P. van & Groenewold, G. & Fokkema, T., 2005. "Remittances and their effect on emigration intentions in Egypt, Morocco, and Turkey." @#$#@#$#@ 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 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 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 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 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 5.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 1.0 0.0 0.0 1 1.0 0.0 0.2 0 1.0 0.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 tratteggio 0.0 -0.2 0 0.0 1.0 0.0 1 4.0 4.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 @#$#@#$#@ 0 @#$#@#$#@