breed [nations nation] breed [citizens citizen] globals [ development_shock_wine development_shock_cloth stop_tick trade_volume ] nations-own [ Nation_name P_price_wine ;wine is the reference good -- its price is always 1, this variable is just here as a reminder P_price_cloth A_efficiency_wine A_efficiency_cloth a_return_to_labor_wine a_return_to_labor_cloth b_return_to_kapital_wine b_return_to_kapital_cloth trade_level ;variables used for speed -- to avoid unneeded calculations W_wage_wine W_wage_cloth I_ROI_wine I_ROI_cloth ] citizens-own [ myNation ;Nation where the citizen lives otherNation ;Nation where the citizen does not live myJob ; Industry in which citizen works myInvestment ; Industry in which citizen invests ] to setup_samuelson clear-all set development_shock_wine .2 ; no shock in wine set development_shock_cloth .8 ; substantial shock in cloth set trade? false set partner_develops? false set capital_mobility? false ;; create nations create-ordered-nations 2 [ ;; nation 0 -- USA ask nation 0 [ set Nation_name 0 set P_price_wine 1 set P_price_cloth 1 set A_efficiency_wine .5 set A_efficiency_cloth 2 set a_return_to_labor_wine 0.5 set a_return_to_labor_cloth 0.5 set b_return_to_kapital_wine 0.5 set b_return_to_kapital_cloth 0.5 ] ;; nation 1 -- China ask nation 1 [ set Nation_name 1 set P_price_wine 1 set P_price_cloth 1 set A_efficiency_wine .2 set A_efficiency_cloth .05 set a_return_to_labor_wine 0.5 set a_return_to_labor_cloth 0.5 set b_return_to_kapital_wine 0.5 set b_return_to_kapital_cloth 0.5 ] ] ;; create citizens create-citizens 100 [ set myNation one-of nations with [Nation_name = 0] set otherNation one-of nations with [Nation_name = 1] set myJob random 2 set myInvestment random 2 ] create-citizens 1000 [ set myNation one-of nations with [Nation_name = 1] set otherNation one-of nations with [Nation_name = 0] set myJob random 2 set myInvestment random 2 ] ;; plot initial state of system ;;my-update-plots reset-ticks end to setup_gomory_baumol clear-all set trade? false set partner_develops? false set capital_mobility? false set development_shock_wine 1.5 ;substational shock in wine set development_shock_cloth .2 ; no shock in cloth ;; create nations create-ordered-nations 2 [ ;; nation 0 -- USA ask nation 0 [ set Nation_name 0 set P_price_wine 1 set P_price_cloth 1 set A_efficiency_wine 1 set A_efficiency_cloth .5 set a_return_to_labor_wine 0.7 set a_return_to_labor_cloth 0.4 set b_return_to_kapital_wine 0.7 set b_return_to_kapital_cloth 0.4 ] ;; nation 1 -- Ghana ask nation 1 [ set Nation_name 1 set P_price_wine 1 set P_price_cloth 1 set A_efficiency_wine .2 set A_efficiency_cloth .2 set a_return_to_labor_wine 0.7 set a_return_to_labor_cloth 0.4 set b_return_to_kapital_wine 0.7 set b_return_to_kapital_cloth 0.4 ] ] ;; create citizens create-citizens 500 [ set myNation one-of nations with [Nation_name = 0] set otherNation one-of nations with [Nation_name = 1] set myJob random 2 set myInvestment random 2 ] create-citizens 100 [ set myNation one-of nations with [Nation_name = 1] set otherNation one-of nations with [Nation_name = 0] set myJob random 2 set myInvestment random 2 ] ;; plot initial state of system ;;my-update-plots reset-ticks end to auto_run_samuelson if ticks = 0 [setup_samuelson] if ticks = 500 [set trade? true] if ticks = 1000 [set partner_develops? true] if ticks = 2000 [stop] go end to auto_run_gomory_baumol if ticks = 0 [setup_gomory_baumol] if ticks = 500 [set trade? true] if ticks = 1000 [set partner_develops? true] if ticks = 1500 [set trade? false] if ticks = 2000 [set trade? true] if ticks = 3000 [stop] go end to auto_run_capital_mobility auto_run_gomory_baumol if ticks = 2500 [set capital_mobility? true] if ticks = 3000 [stop] end to go ask nations [ set W_wage_wine wage_wine set W_wage_cloth wage_cloth set I_ROI_wine ROI_wine set I_ROI_cloth ROI_cloth if Nation_name = 1 and partner_develops? [ set A_efficiency_cloth development_shock_cloth set A_efficiency_wine development_shock_wine] adjust_prices ifelse trade? [adjust_trade_level][set trade_volume 0] ] ask citizens [ if random-float 1 < .004 [ consider_new_job consider_new_investment ] ] tick end ;; run by citizens to consider_new_job ifelse ([W_wage_wine] of myNation > [W_wage_cloth] of myNation) [set myJob 0] [set myJob 1] end to consider_new_investment let myInvestmentValue 0 ifelse ([I_ROI_wine] of myNation > [I_ROI_cloth] of myNation) [ set myInvestment 0 set myInvestmentValue [I_ROI_wine] of myNation] [set myInvestment 1 set myInvestmentValue [I_ROI_cloth] of myNation] if capital_mobility? [ ; consider investing abroad ifelse ([I_ROI_wine] of otherNation > [I_ROI_cloth] of otherNation) [ if [I_ROI_wine] of otherNation > myInvestmentValue [set myInvestment 2] ;if wine is the best return abroad, and better than my investment, move into it ][if [I_ROI_cloth] of otherNation > myInvestmentValue [set myInvestment 3] ] ] end to-report individual_income let wage_income 0 let investment_income 0 ifelse myJob = 0 [set wage_income [W_wage_wine] of myNation][set wage_income [W_wage_cloth] of myNation] if myInvestment = 0 [set investment_income [I_ROI_wine] of myNation] if myInvestment = 1 [set investment_income [I_ROI_cloth] of myNation] ; amount of foreign investment revenue that is repatriated if myInvestment = 2 [set investment_income [I_ROI_wine] of otherNation * repatriation_pct] if myInvestment = 3 [set investment_income [I_ROI_cloth] of otherNation * repatriation_pct] report wage_income + investment_income end to-report individual_foreign_income let foreign_investment_income 0 ; amount of foreign investment that is consumed in country of investment if myInvestment = 2 [set foreign_investment_income [I_ROI_wine] of otherNation * (1 - repatriation_pct)] if myInvestment = 3 [set foreign_investment_income [I_ROI_cloth] of otherNation * (1 - repatriation_pct)] report foreign_investment_income end to-report individual_wine_demand report individual_income / (2 * ([P_price_wine] of myNation)) end to-report individual_cloth_demand report individual_income / (2 * ([P_price_cloth] of myNation)) end to-report individual_foreign_wine_demand report individual_foreign_income / (2 * ([P_price_wine] of otherNation)) end to-report individual_foreign_cloth_demand report individual_income / (2 * ([P_price_cloth] of otherNation)) end ;; run by nations to adjust_prices ifelse (cloth_demand > cloth_supply) [set P_price_cloth P_price_cloth + (P_price_cloth * .02)] [set P_price_cloth P_price_cloth - (P_price_cloth * .02)] end to adjust_trade_level let wine0 [wine_production] of nation 0 let wine1 [wine_production] of nation 1 let cloth0 [cloth_production] of nation 0; * [P_price_cloth] of nation 0 ; value of cloth production in nation 0 let cloth1 [cloth_production] of nation 1; * [P_price_cloth] of nation 1 ; value of cloth production in nation 1 ifelse ([P_price_cloth] of nation 0 > [P_price_cloth] of nation 1) [set trade_volume trade_volume - .5] [set trade_volume trade_volume + .5] if (wine0 < trade_volume and wine1 < trade_volume) [ ifelse wine0 > wine1 [set trade_volume wine0][set trade_volume wine1] ] end to-report wine_demand let ntlDemandWine 0 let thisNation self ;total wine consumption by citizens ask citizens with [myNation = thisNation] [ set ntlDemandWine ntlDemandWine + individual_wine_demand ] ;add wine total local consumption by foreign investors ask citizens with [myNation = otherNation] [ set ntlDemandWine ntlDemandWine + individual_foreign_wine_demand ] report ntlDemandWine end to-report cloth_demand let ntlDemandCloth 0 let thisNation self ;total cloth consumption by citizens ask citizens with [myNation = thisNation] [ set ntlDemandCloth ntlDemandCloth + individual_cloth_demand ] ;add total cloth consumption by foreign investors ask citizens with [myNation = otherNation] [ set ntlDemandCloth ntlDemandCloth + individual_foreign_cloth_demand ] report ntlDemandCloth end to-report wine_supply let wine_traded 0 ifelse (Nation_name = 0) [set wine_traded trade_volume][set wine_traded -1 * trade_volume] let calc_wine_supply wine_production + wine_traded if calc_wine_supply <= 0 [set calc_wine_supply .0001] report calc_wine_supply end to-report cloth_supply let cloth_traded 0 ; if a bolt of cloth costs 5 bottles of wine (price_cloth = 5) then 1/5 of a bolt of cloth will be traded for each bottle of wine ifelse (Nation_name = 0) [set cloth_traded -1 * trade_volume / P_price_cloth ][set cloth_traded trade_volume / P_price_cloth ] let calc_cloth_supply cloth_production + cloth_traded if calc_cloth_supply <= 0 [set calc_cloth_supply .0001] report calc_cloth_supply end to-report ROI_wine let wine_wage_bill (wage_wine * labor_wine) ;Return on investment for wine is what is left once the wage bill is paid, divided by the number of investors let calculated_IR_wine ((P_price_wine * wine_production) - wine_wage_bill) / kapital_wine report calculated_IR_wine end to-report ROI_cloth let cloth_wage_bill (wage_cloth * labor_cloth) ;Return on investment for cloth is what is left once the wage bill is paid, divided by the number of investors let calculated_IR_cloth ((P_price_cloth * cloth_production) - cloth_wage_bill) / kapital_cloth report calculated_IR_cloth end to-report National_utility report sqrt(cloth_supply * wine_supply) end to-report World_utility report [National_utility] of nation 0 + [National_utility] of nation 1 end to-report wine_production report A_efficiency_wine * labor_wine ^ a_return_to_labor_wine * kapital_wine ^ b_return_to_kapital_wine end to-report wage_wine ;wage is the marginal product of labor -- i.e. the amount of wine produced by adding one more worker let incremented_labor labor_wine + 1 let incremented_production A_efficiency_wine * incremented_labor ^ a_return_to_labor_wine * kapital_wine ^ b_return_to_kapital_wine report P_price_wine * (incremented_production - wine_production) end to-report wage_cloth ;wage is the marginal product of labor -- i.e. the amount of cloth produced by adding one more worker let incremented_labor labor_cloth + 1 let incremented_production A_efficiency_cloth * incremented_labor ^ a_return_to_labor_cloth * kapital_cloth ^ b_return_to_kapital_cloth report P_price_cloth * (incremented_production - cloth_production) end to-report cloth_production report A_efficiency_cloth * labor_cloth ^ a_return_to_labor_cloth * kapital_cloth ^ b_return_to_kapital_cloth end to-report labor_wine let thisNation self let wine_labor count citizens with [((myNation = thisNation) and (myJob = 0))] if wine_labor < 1 [set wine_labor 1] ; maintain at least one worker in wine report wine_labor end to-report kapital_wine let thisNation self ;count of domestic investors let k_wine count citizens with [((myNation = thisNation) and (myInvestment = 0))] ;add count of foreign investors set k_wine k_wine + count citizens with [((otherNation = thisNation) and (myInvestment = 2))] if k_wine < 1 [set k_wine 1] ; maintain a token investment in wine report k_wine end to-report labor_cloth let thisNation self let cloth_labor count citizens with [((myNation = thisNation) and (myJob = 1))] if cloth_labor < 1 [set cloth_labor 1] ;maintain at least one worker in cloth report cloth_labor end to-report kapital_cloth let thisNation self ;count of domestic investors let k_cloth count citizens with [((myNation = thisNation) and (myInvestment = 1))] ;add count of foreign investors set k_cloth k_cloth + count citizens with [((otherNation = thisNation) and (myInvestment = 3))] if k_cloth < 1 [set k_cloth 1] ;maintain a token investment in cloth report k_cloth end @#$#@#$#@ GRAPHICS-WINDOW 784 897 1029 1093 -1 -1 4.13 1 10 1 1 1 0 1 1 1 0 39 0 39 1 1 1 ticks 30.0 PLOT 312 10 959 200 National Utilties NIL NIL 0.0 3000.0 0.0 400.0 true true "" "" PENS "World " 1.0 0 -16777216 true "" "plot World_utility" "USA" 1.0 0 -13345367 true "" "plot [National_utility] of nation 0" "Partner" 1.0 0 -2674135 true "" "plot [National_utility] of nation 1" BUTTON 5 33 154 66 Set Up Samuelson Case setup_samuelson NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 5 606 68 639 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 MONITOR 227 56 308 101 USA Utility [National_utility] of nation 0 1 1 11 MONITOR 226 106 308 151 Partner Utility [National_utility] of nation 1 1 1 11 SWITCH 5 650 108 683 trade? trade? 0 1 -1000 PLOT 312 202 959 377 Labor NIL NIL 0.0 3000.0 0.0 500.0 true true "" "" PENS "USA Winemakers" 1.0 0 -13345367 true "" "plot [labor_wine] of nation 0" "Partner Winemakers" 1.0 0 -2674135 true "" "plot [labor_wine] of nation 1" "USA Clothmakers" 1.0 0 -11221820 true "" "plot [labor_cloth] of nation 0" "Partner Clothmakers" 1.0 0 -2382653 true "" "plot [labor_cloth] of nation 1" MONITOR 169 202 309 247 USA WineMakers [labor_wine] of Nation 0 0 1 11 MONITOR 169 246 309 291 Partner Winemakers [labor_wine] of nation 1 0 1 11 MONITOR 168 289 309 334 USA Clothmakers [labor_cloth] of nation 0 0 1 11 MONITOR 168 332 309 377 Partner Clothmakers [labor_cloth] of nation 1 0 1 11 PLOT 312 557 959 722 Production of Goods NIL NIL 0.0 3000.0 0.0 4000.0 true true "" "" PENS "USA Wine Prod." 1.0 0 -13345367 true "" "plot [wine_production] of nation 0" "USA Cloth Prod." 1.0 0 -11221820 true "" "plot [cloth_production] of nation 0" "Partner Wine Prod." 1.0 0 -2674135 true "" "plot [wine_production] of nation 1" "Partner Cloth Prod. " 1.0 0 -2382653 true "" "plot [cloth_production] of nation 1" MONITOR 169 557 309 602 USA Wine Production [wine_production] of nation 0 1 1 11 MONITOR 170 595 309 640 Partner Wine Production [wine_production] of nation 1 1 1 11 MONITOR 170 636 309 681 USA Cloth Production [cloth_production] of nation 0 1 1 11 MONITOR 170 677 309 722 Partner Cloth Production [cloth_production] of nation 1 1 1 11 PLOT 312 725 959 893 Prices NIL NIL 0.0 3000.0 0.0 10.0 true true "" "" PENS "USA Wine Price" 1.0 0 -13345367 true "" "plot [P_price_wine] of nation 0" "Partner Wine Price" 1.0 0 -2674135 true "" "Plot [P_price_wine] of nation 1" "USA Cloth Price" 1.0 0 -11221820 true "" "plot [P_price_cloth] of nation 0" "Partner Cloth Price " 1.0 0 -2382653 true "" "plot [P_price_cloth] of nation 1" MONITOR 171 725 309 770 USA Wine Price [P_price_wine] of nation 0 2 1 11 MONITOR 171 764 309 809 Partner Wine Price [P_price_wine] of nation 1 2 1 11 MONITOR 171 806 309 851 USA Cloth Price [P_price_cloth] of nation 0 3 1 11 MONITOR 171 848 309 893 Partner Cloth Price [P_price_cloth] of nation 1 3 1 11 PLOT 312 896 959 1062 Supply and Demand NIL NIL 0.0 3000.0 0.0 10.0 true true "" "" PENS "USA Cloth Supply" 1.0 0 -13345367 true "" "plot [cloth_supply] of nation 0" "USA Cloth Demand" 1.0 0 -11221820 true "" "plot [cloth_demand] of nation 0" "Partner Cloth Supply" 1.0 0 -2674135 true "" "plot [cloth_supply] of nation 1" "Partner Cloth Dem." 1.0 0 -2382653 true "" "plot [cloth_demand] of nation 1" SWITCH 4 688 158 721 partner_develops? partner_develops? 0 1 -1000 BUTTON 5 69 154 102 Set Up Increasing Returns setup_gomory_baumol NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 7 406 142 439 Run Gomory Baumol auto_run_gomory_baumol T 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 7 332 142 365 Run Samuelson auto_run_samuelson T 1 T OBSERVER NIL NIL NIL NIL 1 TEXTBOX 8 309 158 327 Automated Runs 14 0.0 1 TEXTBOX 9 440 149 482 trade @ 500, development @ 1000, autarky @ 1500, trade @ 2000 11 0.0 1 TEXTBOX 11 366 145 392 trade @ 500, development @ 1000 11 0.0 1 TEXTBOX 6 584 156 602 Manual Runs 14 0.0 1 MONITOR 6 250 160 295 Partner Efficiency in Cloth [A_efficiency_cloth] of nation 1 2 1 11 MONITOR 6 202 160 247 Partner Efficiency in Wine [A_efficiency_wine] of nation 1 2 1 11 MONITOR 170 153 308 198 Time Step ticks 0 1 11 SWITCH 3 725 162 758 capital_mobility? capital_mobility? 0 1 -1000 BUTTON 4 490 139 523 Run Capital Mobility auto_run_capital_mobility T 1 T OBSERVER NIL NIL NIL NIL 1 TEXTBOX 7 527 157 555 Gomory Baumol +Capital Mobility @ 2500\n 11 0.0 1 SLIDER 3 761 162 794 repatriation_pct repatriation_pct 0 1 0 .01 1 NIL HORIZONTAL TEXTBOX 9 10 159 28 Set Up 14 0.0 1 MONITOR 227 10 308 55 World Utility world_utility 1 1 11 MONITOR 6 105 160 150 USA Efficiency Wine [A_efficiency_wine] of nation 0 2 1 11 MONITOR 6 153 160 198 USA Efficiency Cloth [A_efficiency_cloth] of nation 0 2 1 11 PLOT 312 378 959 554 Investment NIL NIL 0.0 3000.0 0.0 500.0 true true "" "" PENS "USA Wine Investors" 1.0 0 -13345367 true "" "plot [kapital_wine] of nation 0" "Partner Wine Inv." 1.0 0 -2674135 true "" "plot [kapital_wine] of nation 1" "USA Cloth Investors" 1.0 0 -8990512 true "" "plot [kapital_cloth] of nation 0" "Partner Cloth Inv." 1.0 0 -2382653 true "" "plot [kapital_cloth] of nation 1" MONITOR 168 378 309 423 USA Wine Investors [kapital_wine] of nation 0 0 1 11 MONITOR 168 421 309 466 Partner Wine Investors [kapital_wine] of nation 1 17 1 11 MONITOR 168 463 309 508 USA Cloth Investors [kapital_cloth] of nation 0 0 1 11 MONITOR 168 508 309 553 Partner Cloth Investors [kapital_cloth] of nation 1 0 1 11 @#$#@#$#@ ## WHAT IS IT? In an effort to gain insight into the mechanisms involved with international trade and development, we can construct a simple agent-based model of production and trade. This model will follow the basic outline of the classic Hecksher-Ohlin trade model (Jones 1956), but will further disaggregate the model, resting it on the behavior of individuals and firms. The model is capable of reproducing a contemporary analysis of trade from Paul Samuelson (2004) as well as verifying the retainability of industries as described by Gomory and Baumol (discussed above) and demonstrating how recognition of this retainability has important implications for the long discredited infant industries argument for protection of developing markets. ## HOW IT WORKS There are two types of agents: citizens and nations. Citizens are each associated with one nation and possess one unit each of labor and capital, which they choose to deploy in one of two national industries depending on which pays the higher wage or higher return to capital (they may choose to work in one industry and invest in the other). They use these wages and returns to demand goods. Nations possess national industries (we can follow convention by thinking of them as wine and cloth) that produce goods according to Cobb-Douglass production functions using the labor and capital that the citizen agents provide. They calculate wages and returns to capital along with prices for each of the goods produced. When trade is enabled, they also engage in trade, importing more of a good if its price is lower in the other country and paying for these imports by bartering with goods from the industry where their price is lower. More specifically, the citizen agents have three basic state variables: a job, an investment, and a demand function. In each round, each agent does these things: Asks the nation for the current price of both wine and cloth. Asks the nation for the current wage in the industry where the agent works. Asks the nation for the current return on capital in the industry where the agent has invested. Calculates its demand for both wine and cloth based on its income (from wages and investments) and the prices of the two goods using the simple hyperbolic demand function Dw = Y/2Pw. This amounts to saying that each agent spends half of its income on each good – buying less and more of the good as the price goes up and down. With a probability of one percent, the agent reexamines its job and investment choice, changing jobs or shifting its investment to the industry that provides the higher wage or return to capital. The low rate of turnover in employment and investment insures that the model is able to adjust to each change, thus avoiding stampedes from one industry to another that dramatically overshoot the required correction in the employment or investment level. The nation agent also has several state variables. The structure of the nation’s two industries is given by a pair of Cobb-Douglas production functions of the form Qw = A*Lαw*Kβw, where the quantity of wine produced Qw is the product of an efficiency A, the amount of labor devoted to wine Lw to some exponent α and the amount of capital Kw devoted to wine to some exponent β. These parameters (A, α, and β) are state variables. Because the model relies on barter rather than money, the price of one good (wine) is fixed at 1, while the price of the other good (cloth) adjusts to reflect its relative scarcity. The price of cloth is adjusted upward by a small amount when demand for cloth exceeds its supply and down by a similar amount when supply exceeds demand. Because wages and returns on investment are calculated as shares of current production, Walras’ law ensures that if the cloth market clears, the wine market will also clear. The price of cloth is a state variable. Finally, when trade is opened, the nations barter goods. Cloth flows from the country in which its price (relative to wine) is lower to that where its price is higher, with compensation being made in wine according to the current price of cloth. When the international market is out of equilibrium (i.e. when the price of cloth differs between the two countries) the trade price of cloth is taken to be the average price between the two countries. The amount of cloth exported is increased by a small amount when the nation’s partner has a higher relative price for cloth and is decreased by a small amount when the partner has a lower relative price for cloth. This level of trade is the nation’s final state variable. In each round, each nation does these things: Counts the number of citizens working and investing in each industry. Determines the quantity of each good which it will produce using each industry’s production function and the current level of employment and investment in each industry. Determines the wage for each industry by calculating the marginal product of labor in that industry by subtracting the current level of production from the production that would result from the addition of one additional unit of labor. Determines the return to capital for each industry by subtracting the wage bill for that industry from the total output of the industry (at current prices) and dividing by the number of investors in the industry. Adjusts the price of cloth as described above. Adjusts the level of trade to reflect the new price level in both countries as described above. ## HOW TO USE IT To reproduce the runs presented in the paper, click "Reset for Auto Runs" then click either "Run Samuelson" or "Run Increasing Returns" to examine each case. If you would like to experiment with different orders of events and timing, the "Manual Runs" controls allow you to set up either case and to turn trade and development on at different times. ## THINGS TO NOTICE The Samuelson case demonstrates that not all technological changes need be beneficial for both nations. For the sake of this example, he posits a tremendous technological improvement in China’s cloth sector (where the US had previously been stronger) from 0.05 to 0.8. This leaves cloth productivity substantially below the US level of 2, but much higher than it had been. This change serves to equalize the factor prices in both countries (the ratio of the efficiencies in both nations is now 4). This equalization removes all incentive to trade, reducing the problem to calculating the output of each country in autarky. The result is a boon for China and a plague for the US. China is now capable of producing 400 units of cloth and 100 units of wine for a total utility of (400*100)0.5 or 200 (0.2 per capita), while US once again can produce (100*25)0.5 or 50 (0.5 per capita). Chinese consumption thus expands by a factor of four while US consumption is halved. In the increasing returns case the developed nation is more efficient in both industries, having an efficiency in agriculture (wine) of A=0.5 and an efficiency in manufactures (cloth) of B=1.0. The developing nation begins with equal efficiency in both industries: A=0.2 and B=0.2. This gives the developing nation a comparative advantage in agriculture and the industrialized nation a comparative advantage in manufactures. We run the model forward as we did in the Samuelson case. For the first 500 rounds, both countries produce and consume as best they can in autarky. For the next 500 rounds, the nations trade, both realizing gains because they are able to specialize in the area where they are most efficient. As in the Samuelson case, at round 1000, we introduce a substantial exogenous change in productivity in one of its industries. In this case, the developing country drastically increases its productivity in manufactures from a paltry 0.2 to an impressive 1.5, jumping from 20% of the developed nation’s productivity to 150%. At this point, however, we observe a marked contrast to Samuelson’s giant increase in productivity: nothing happens. Because the developing nation has specialized in agriculture, it has virtually no industry in manufactures. Any attempt to start such an industry is bound to fail because the industrialized country has attained a scale such that it can produce manufactures more cheaply than the developing nation – even given the developing nation’s new, superior productivity at any given point on the production functions. In each round, the citizens and investors of the developing nation examine the feasibility of moving into manufactures, and in each round they find that they can do better by sticking to agriculture. The industrialized nation is thus able to retain the industry despite the fact that, all else being equal, it is no longer the most efficient producer in either absolute or relative terms. In the Samuelson case, we cut off trade at round 1500 and found that there was no impact on utility in either country because their proportional productivities had become similar. If we cut off trade in this case, something even more surprising happens. After an initial plunge in utility, the developing country begins to restructure its economy. Where its manufactures had been unable to compete with cheap, mass produced imports in its domestic market, they are now the only game in town. Workers and investors begin to shift away from agriculture and into manufactures. Initially, this sector is not terribly productive, but with experience and scale, it becomes more and more productive. In time, given the parameters we have chosen, the manufacturing sector becomes so productive that the small nation is actually able to do better in autarky than it previously did through trade! Finally, in round 2000, we reopen trade. The newly industrialized country is now in a much stronger position to compete on the international market and sees a substantial gain. The larger, more established country actually looses more utility as a result of this trade over autarky. It is forced to restructure its economy to produce the lower productivity agricultural good. Because this good has decreasing rather than increasing returns, its productivity erodes as it becomes more specialized, leading to a long term decline in income as compared to autarky. ## THINGS TO TRY ## EXTENDING THE MODEL ## NETLOGO FEATURES ## CREDITS AND REFERENCES This model, and the preceding explanation, is adapted from Timothy Gulden, "Agent-based Modeling as a Tool for Trade and Development Theory" -- publication data pending ## HOW TO CITE ## COPYRIGHT NOTICE Copyright 2012 Timothy Gulden. All rights reserved. Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed: a) this copyright notice is included. b) this model will not be redistributed for profit without permission from Timothy Gulden. Contact Timothy Gulden for appropriate licenses for redistribution for profit. @#$#@#$#@ 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 person active false 0 Polygon -13791810 true false 135 90 150 105 135 165 150 180 165 165 150 105 165 90 Polygon -2674135 true false 195 135 240 30 210 15 165 120 Circle -7500403 true true 110 5 80 Rectangle -7500403 true true 127 79 172 94 Polygon -2674135 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 -2674135 true false 105 135 60 30 90 15 135 120 Polygon -6459832 true false 195 15 270 60 270 75 195 30 person jailed false 0 Circle -7500403 true true 110 5 80 Polygon -16777216 true false 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 -16777216 true false 195 90 210 150 195 180 165 105 Polygon -16777216 true false 105 90 90 150 105 180 135 105 person quiet false 0 Polygon -13791810 true false 135 90 150 105 135 165 150 180 165 165 150 105 165 90 Polygon -1184463 true false 195 90 240 195 210 210 165 105 Circle -7500403 true true 110 5 80 Rectangle -7500403 true true 127 79 172 94 Polygon -1184463 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 -1 true false 100 210 130 225 145 165 85 135 63 189 Polygon -13791810 true false 90 210 120 225 135 165 67 130 53 189 Polygon -1 true false 120 224 131 225 124 210 Line -16777216 false 139 168 126 225 Line -16777216 false 140 167 76 136 Polygon -1184463 true false 105 90 60 195 90 210 135 105 person soldier false 10 Rectangle -7500403 true false 127 79 172 94 Polygon -13345367 true true 105 90 60 195 90 210 135 105 Polygon -13345367 true true 195 90 240 195 210 210 165 105 Circle -7500403 true false 110 5 80 Polygon -13345367 true true 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 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 15 0 270 300 270 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 5.0.2 @#$#@#$#@ setup repeat 5 [ go ] @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@ 0 @#$#@#$#@