;; Implements a simple minimum wages income model ;; Some ideas from the model of Zero-intelligence trading based on the article ;; by Gode and Sunder in the NetLogo version published by ;; ;; Mark E. McBride ;; Department of Economics ;; Miami University ;; Oxford, OH 45056 ;; mark.mcbride@muohio.edu ;; http://mcbridme.sba.muohio.edu/ ;; ;; were used in this implementation. ;; ;; This implementation developed by Mehmet Hadi Tohum und Peyman Jazayeri ;; under supervision Klaus G. Troitzsch and Gregor van der Beek ;; afterwards slightly simplifies by Klaus G. Troitzsch globals [transactionWages ;; current transaction wages nOfEmployees ;; number of workers employed and employers employing nOfEmployers nOfEmployersFastfood nOfEmployersCleaner nOfEmployersConstruction numberEmployersFastfood numberEmployersCleaner numberEmployersConstruction maxExpectedExpense minExpectedExpense maxExpectedWages minExpectedWages maxNOfEmployed mWages maxLengthWorkerList equilibriumWages equilibriumJobs maxSurplus currentSurplus tickcount workersfood ] breed [employers employer] breed [workers worker] breed [data datum] employers-own [ EmployerType EmployerTypeName expectedExpense demandedWages currOfferedWages employs? ok? wages branchMinWage nOfworkers workerList ] workers-own [ expectedWages offeredWages currDemandedWages employed? ok? wages currentEmployer nOfEmployments time-when-this-employment-began duration-of-this-employment workerType xinit yinit ] data-own ;; one for every contract, just for bookkeeping [ Wages EmploymentDuration ] to setup ;; (for this model to work with NetLogo's new plotting features, ;; __clear-all-and-reset-ticks should be replaced with clear-all at ;; the beginning of your setup procedure and reset-ticks at the end ;; of the procedure.) __clear-all-and-reset-ticks clear-output set maxNOfEmployed 0 ask n-of numberOfemployers patches [ sprout-employers 1 [init-employer] ] ask patches [ if any? employers-on turtles-here [ ask neighbors [set pcolor grey]]] ask n-of numberOfworkers patches [ sprout-workers 1 [init-worker] ] ;; warming-up phase: repeat numberOfWorkers * 6 [ start-negotiation ] end to go if ticks >= maxNumberOfCycles [ stop ] start-negotiation set nOfEmployees count workers with [ employed? ] set nOfEmployers count employers with [ employs? ] set nOfEmployersFastfood count employers with [ employs? AND employerType = 2] set nOfEmployersCleaner count employers with [ employs? AND employerType = 1] set nOfEmployersConstruction count employers with [ employs? AND employerType = 0] if nOfEmployees > maxNOfEmployed [ set maxNOfEmployed nOfEmployees ] ask workers [ adjust-worker-expectation ] ask employers [ adjust-employer-expectation ] draw-histogram-expectancies draw-employment-duration-histogram draw-wages-histogram calc-equilibrium set tickcount tickcount + 1 set minExpectedWages min [ expectedWages ] of workers set maxExpectedWages max [ expectedWages ] of workers set minExpectedExpense min [ expectedExpense ] of employers set maxExpectedExpense max [ expectedExpense ] of employers tick end to adjust-worker-expectation let minW min [ expectedWages ] of workers in-radius radius let maxW max [ expectedWages ] of workers in-radius radius set expectedWages minW + random-float 1 * ( maxW - minW ) end to adjust-employer-expectation let minW min [ expectedExpense ] of employers in-radius radius if employerType = 0 [ if minW < minWageConstruction [ set minW minWageConstruction]] if employerType = 1 [ if minW < minWageCleaning [ set minW minWageCleaning]] if employerType = 2 [ if minW < minWageFastfood [ set minW minWageFastfood]] if minW < minWages [ set minW minWages ] let maxW max [ expectedExpense ] of employers in-radius radius if maxW < minW [ set maxW minW ] set expectedExpense minW + random-float 1 * ( maxW - minW ) end to init-employer set employerType random 3 if employerType = 0 [ set color red set EmployerTypeName "constructionEmployer" ] if employerType = 2 [ set color 65 set EmployerTypeName "fastfoodEmployer" ] if employerType = 1 [ set color 105 set EmployerTypeName "cleanerEmployer" ] set shape "factory" set size 2 set workerList [] set expectedExpense random-float maxemployerExpense fire set ok? false set numberEmployersFastfood count employers with [ employerType = 2] set numberEmployersCleaner count employers with [ employerType = 1] set numberEmployersConstruction count employers with [ employerType = 0] loop [ ifelse (count(turtles in-radius 5) > 1 or (xcor < 5 or xcor > max-pxcor - 5) or (ycor < 5 or ycor > max-pycor - 5)) [ setxy random 100 random 100 ] [ stop ] ] end to fire set employs? false set nOfworkers max list 0 ( nOfworkers - 1 ) if ( nOfworkers > maxLengthWorkerList ) [ set maxLengthWorkerList nOfworkers ] if ( nOfworkers != length workerList ) [ stop ] end to hire set employs? true set nOfworkers nOfworkers + 1 end to init-worker set xinit xcor set yinit ycor set workerType 3 set color white set shape "person" set expectedWages minWages + random-float ( maxworkerWages - minWages ) be-fired set nOfEmployments 0 set currentEmployer nobody set ok? false while [ any? turtles with [pcolor = 5] ] [ setxy random 100 random 100] set xinit xcor set yinit ycor end to be-fired set employed? false set duration-of-this-employment ticks - time-when-this-employment-began set color white setxy xinit yinit set workerType 3 ; (unemployed) end to be-hired set employed? true set time-when-this-employment-began ticks set nOfEmployments nOfEmployments + 1 set color ( [ color ] of currentEmployer ) move-to currentEmployer move-to one-of neighbors set workerType [employerType] of currentEmployer end to-report seek-worker let potential-worker one-of workers in-radius radius ask potential-worker [ set currDemandedWages demandWages ] set currOfferedWages offerWages report potential-worker end to-report seek-employer let potential-employer one-of employers in-radius radius ;ask potential-employer [ set currOfferedWages offerWagesByEmployer[branchMinWage]] ask potential-employer [ set currOfferedWages expectedExpense - (random-float 1) * ( expectedExpense - branchMinWage ) ] set currDemandedWages demandWages report potential-employer end to-report seek-cheapest-worker set currOfferedWages offerWages report min-one-of workers in-radius radius [ demandWages ] end to-report seek-best-employer set currDemandedWages demandWages report max-one-of employers in-radius radius [ offerWages ] end ;to-report offerWagesByEmployer [wage] ;set currOfferedWages expectedExpense - (random-float 1) * ( expectedExpense - wage ) ; report currOfferedWages ;end to-report offerWages let maxRandom 1 if ( length workerlist > 0 and maxLengthWorkerList > 0 ) [ set maxRandom length workerList / maxLengthWorkerList ] set currOfferedWages expectedExpense - (random-float maxRandom ) * ( expectedExpense - minWages ) report currOfferedWages end to-report demandWages set currDemandedWages expectedWages if ( employed? ) [ set currDemandedWages currDemandedWages + (random-float 1) * ( maxemployerExpense - expectedWages ) ] report currDemandedWages end to start-negotiation let potentialEmployer one-of employers let potentialEmployee one-of workers let employment-duration -1 if who-seeks-whom = "employer seeks random worker" [ set potentialEmployer one-of employers ask potentialEmployer [ set potentialEmployee seek-worker ] if potentialEmployee = nobody [ stop ] ] if who-seeks-whom = "worker seeks random employer" [ set potentialEmployee one-of workers ask potentialEmployee [ set potentialEmployer seek-employer ] if potentialEmployer = nobody [ stop ] ] if who-seeks-whom = "employer seeks cheapest worker" [ set potentialEmployer one-of employers ask potentialEmployer [ set potentialEmployee seek-cheapest-worker ] if potentialEmployee = nobody [ stop ] ] if who-seeks-whom = "worker seeks best employer" [ set potentialEmployee one-of workers ask potentialEmployee [ set potentialEmployer seek-best-employer ] if potentialEmployer = nobody [ stop ] ] let currentlyOfferedWages [ currOfferedWages ] of potentialEmployer ask potentialEmployee [ set offeredWages currentlyOfferedWages ] ;; employer and worker determine offer and demand and keep these in memory let currentlyDemandedWages [ currDemandedWages ] of potentialEmployee ask potentialEmployer [ set demandedWages currentlyDemandedWages ] ifelse ( currentlyDemandedWages < currentlyOfferedWages ) ;; if less is demanded than is offered, the final wages lie somewhere in between [ let transWages currentlyDemandedWages + (random-float 1) * (currentlyOfferedWages - currentlyDemandedWages) ifelse [ employs? ] of potentialEmployer [ let wagesAvailable ( [ wages ] of potentialEmployer ) * numberOfWorkers / numberOfEmployers - sum ( [wages ] of workers with [ currentEmployer = potentialEmployer ]) ifelse currentlyDemandedWages < wagesAvailable ;; the potential employer is ready to contract [ ask potentialEmployer [ set ok? true ] ] [ ask potentialEmployer [ set expectedExpense currentlyDemandedWages ] ] ] [ ask potentialEmployer [ set ok? true ] ] ifelse [ employed? ] of potentialEmployee [ ifelse currentlyOfferedWages > ( [ wages ] of potentialEmployee ) ;; the potential employee is reaady to contract [ ask potentialEmployee [ set ok? true ] ] [ ask potentialEmployee [ set expectedWages currentlyOfferedWages if expectedWages < minWages [ set expectedWages minWages ] ] ] ] [ ask potentialEmployee [ set ok? true ] ] if ( [ ok? ] of potentialEmployee ) and ( [ ok? ] of potentialEmployer ) ;; the contract is perfect [ ask potentialEmployer [ set wages transWages hire set workerList fput potentialEmployee workerList set workerList sort-by [[wages] of ?1 < [wages] of ?2] workerList set label length workerList if ( label > maxLengthWorkerList ) [ set maxLengthWorkerList label ] ] ask potentialEmployee [ set wages transWages if ( currentEmployer != nobody ) [ be-fired set employment-duration duration-of-this-employment ask currentEmployer [ set workerlist remove potentialEmployee workerList ] ] set currentEmployer potentialEmployer be-hired ] if transWages > maxExpectedWages [ set maxExpectedWages transWages ] if transWages < minExpectedWages [ set minExpectedWages transWages ] set transactionWages transWages create-data 1 [ set Wages transWages set EmploymentDuration employment-duration set color black ] let fired? false ask potentialEmployer [ if length (workerList) > (1 + count workers / count employers) [ ask last workerList [be-fired] set employment-duration [ duration-of-this-employment ] of last workerList set workerList remove last workerList workerList set fired? true ] ] if fired? [ create-data 1 [ set Wages transWages set EmploymentDuration employment-duration set color black ] ] ] ] [ ask potentialEmployee [ set expectedWages offeredWages if expectedWages < minWages [ set expectedWages minWages ] ] ask potentialEmployer [ set expectedExpense demandedWages ] ] end to calc-equilibrium let bids [] let asks [] let lastbid 0 let lastask 0 set bids sort-by [ ?1 > ?2 ] [expectedExpense] of employers set asks sort-by [ ?1 < ?2 ] [expectedWages] of workers ifelse length bids > length asks [ repeat length bids - length asks [ set asks fput ((random last asks - first asks) + first asks) asks set asks sort-by [ ?1 < ?2 ] asks ] ] [ repeat length asks - length bids [ set bids fput ((random last bids - first bids) + first bids) bids set bids sort-by [ ?1 < ?2 ] bids ] ] set equilibriumWages 0 set equilibriumJobs 0 let actualJobs count workers with [ employed? ] set maxSurplus 0 set currentSurplus 0 ( foreach bids asks n-values length bids [ ? ] [ ifelse ( ?1 - ?2 > 0.0) [ set equilibriumWages ( ?1 + ?2 ) / 2 set lastbid ?1 set lastask ?2 set equilibriumJobs ?3 set maxSurplus maxSurplus + ?1 - ?2 if ?3 < actualJobs [ set currentSurplus currentSurplus + ?1 - ?2 ] ] [ set equilibriumWages ( lastbid + lastask ) / 2 set equilibriumJobs ?3 set maxSurplus maxSurplus + ?1 - ?2 if ?3 < actualJobs [ set currentSurplus currentSurplus + ?1 - ?2 ] ] ] ) end to plot-labour-demand-supply set-current-plot "Demand-Supply" set-plot-x-range 0 1 ;1 / numberOfemployers;0-100 oder 0-1 set-current-plot-pen "number of employers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / (numberOfemployers - 1) foreach sort-by [ [expectedExpense] of ?1 > [expectedExpense] of ?2 ] employers [ plot [expectedExpense] of ? ] set-current-plot-pen "number of workers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / (numberOfworkers - 1) foreach sort-by [ [expectedWages] of ?1 < [expectedWages] of ?2 ] workers [ plot [expectedWages] of ? ] end to plot-labour-demand-supply-food set-current-plot "Demand-Supply-Food" if numberEmployersFastfood = 0 [set numberEmployersFastfood 2] set-plot-x-range 0 1 set-current-plot-pen "number of employers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / ( numberEmployersFastfood - 1 ) foreach sort-by [ [expectedExpense] of ?1 > [expectedExpense] of ?2 ] employers with [ employerType = 2 ] [ plot [expectedExpense] of ? ] set-current-plot-pen "number of workers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / (numberOfworkers - 1) foreach sort-by [ [expectedWages] of ?1 < [expectedWages] of ?2 ] workers [ plot [expectedWages] of ? ] end to plot-labour-demand-supply-construction set-current-plot "Demand-Supply-Construction" if numberEmployersConstruction = 0 [set numberEmployersConstruction 1] set-plot-x-range 0 1 set-current-plot-pen "number of employers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / ( numberEmployersConstruction - 1) ;; here occurred a problem ... foreach sort-by [ [expectedExpense] of ?1 > [expectedExpense] of ?2 ] employers with [ employerType = 0 ] [ plot [expectedExpense] of ? ] set-current-plot-pen "number of workers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / (numberOfworkers - 1) foreach sort-by [ [expectedWages] of ?1 < [expectedWages] of ?2 ] workers; with [workerTypes = 0] [ plot [expectedWages] of ? ] end to plot-labour-demand-supply-cleaner set-current-plot "Demand-Supply-cleaner" if numberEmployersCleaner = 0 [set numberEmployersCleaner 1] set-plot-x-range 0 1 set-current-plot-pen "number of employers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / ( numberEmployersCleaner - 1 ) foreach sort-by [ [expectedExpense] of ?1 > [expectedExpense] of ?2 ] employers with [ employerType = 1 ] [ plot [expectedExpense] of ? ] set-current-plot-pen "number of workers vs. expected wages" plot-pen-reset set-plot-pen-interval 1 / (numberOfworkers - 1) foreach sort-by [ [expectedWages] of ?1 < [expectedWages] of ?2 ] workers [ plot [expectedWages] of ? ] end to draw-wages-histogram let minX floor ( min ( list minExpectedWages minExpectedExpense ) - 0.5 ) let maxX ceiling ( max ( list maxExpectedWages maxExpectedExpense ) + 0.5 ) set-current-plot "Wage Distribution" set-plot-pen-mode 1 set-histogram-num-bars 15 set-plot-x-range minX maxX histogram [wages] of workers with [ employed? ] end to draw-employment-duration-histogram if length filter [ ? > -1 ] [ EmploymentDuration ] of data > 0 [ set-current-plot "Employment time distribution" set-plot-pen-mode 1 let xmax 100 * ceiling ( 0.01 * max [ EmploymentDuration ] of data ) if ( xmax > 20 ) [ set-plot-x-range 0 xmax set-plot-pen-interval xmax / 10 histogram filter [ ? > 0 ] [ EmploymentDuration ] of data ] set-current-plot "Number of consecutive jobs per worker" set-plot-pen-mode 1 set-plot-x-range 0 1 + max [ nOfEmployments ] of workers set-plot-pen-interval 1 histogram [ nOfEmployments ] of workers ] end to draw-histogram-expectancies let minX floor ( min ( list minExpectedWages minExpectedExpense ) - 0.5 ) let maxX ceiling ( max ( list maxExpectedWages maxExpectedExpense ) + 0.5 ) set-current-plot "Employers' expectancies" set-plot-pen-mode 1 set-histogram-num-bars 15 set-plot-x-range minX maxX histogram [ expectedExpense ] of employers set-current-plot "Workers' expectancies" set-plot-pen-mode 1 set-histogram-num-bars 15 set-plot-x-range minX maxX histogram [ expectedWages ] of workers end to plot-n-of-workers set-current-plot "n-of-workers" set-plot-pen-mode 0 set-current-plot-pen "n-of-workerfood" plot count workers with [workerType = 2] ;; / (count employers with [employertype = 2] * 2) set-current-plot-pen "n-of-workerconstruction" plot count workers with [workerType = 0] ;; / (count employers with [employertype = 0] * 2) set-current-plot-pen "n-of-workercleaner" plot count workers with [workerType = 1] ;; / (count employers with [employertype = 1] * 2) set-current-plot-pen "n-of-unemployed" plot count workers with [workerType = 3] ;; / (count employers with [employertype = 1] * 2) end to plot-wage-expectations set-current-plot "Min and max expected wages" set-current-plot-pen "min workers" plot minExpectedWages set-current-plot-pen "max workers" plot maxExpectedWages set-current-plot-pen "min employers" plot minExpectedExpense set-current-plot-pen "max employers" plot maxExpectedExpense set-current-plot-pen "equilibrium wages" plot equilibriumWages set-current-plot-pen "average wages" ifelse count workers with [ employed? ] = 0 [ plot 0 ] [ plot mean [ wages ] of workers with [ employed? ] ] set-current-plot-pen "minWages" plot minWages end @#$#@#$#@ GRAPHICS-WINDOW 976 271 1491 807 -1 -1 5.0 1 10 1 1 1 0 1 1 1 0 100 0 100 0 0 1 ticks 30.0 SLIDER 164 10 336 43 numberOfEmployers numberOfEmployers 5 150 30 5 1 NIL HORIZONTAL SLIDER 164 43 336 76 numberOfWorkers numberOfWorkers 5 500 85 5 1 NIL HORIZONTAL SLIDER 164 77 336 110 maxEmployerExpense maxEmployerExpense 1 60 20 1 1 NIL HORIZONTAL SLIDER 164 111 336 144 maxWorkerWages maxWorkerWages 1 60 30 1 1 NIL HORIZONTAL SLIDER 164 144 336 177 maxNumberOfCycles maxNumberOfCycles 500 10000 1500 500 1 NIL HORIZONTAL BUTTON 10 10 76 43 Setup setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 86 51 151 84 Run go T 1 T OBSERVER NIL NIL NIL NIL 1 PLOT 342 10 968 212 Demand-Supply Jobs Wages 0.0 1.0 0.0 30.0 true true "" "" PENS "number of workers vs. expected wages" 0.0050 0 -2674135 true "" "" "number of employers vs. expected wages" 1.0 0 -13345367 true "" "" "number of jobs vs. mean wages" 1.0 0 -16777216 true "" "" MONITOR 10 138 105 183 Current contract transactionWages 2 1 11 MONITOR 10 89 87 134 Avg Wages mean [wages] of employers with [ employs? ] 2 1 11 MONITOR 80 89 139 134 Std Dev standard-deviation [wages] of employers with [ employs? ] 2 1 11 PLOT 9 416 329 536 Wage Distribution Wages Frequency 0.0 30.0 0.0 5.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "" MONITOR 10 188 90 233 Employment list count workers with [ employed? ] count employers with [ employs? ] 17 1 11 SLIDER 164 182 336 215 minWages minWages 0 30 0 1 1 NIL HORIZONTAL MONITOR 9 292 154 337 min/max expected wages list precision minExpectedWages 2 precision maxExpectedWages 2 2 1 11 PLOT 11 666 329 786 Employers' expectancies Expected expense Frequency 0.0 40.0 0.0 10.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "" PLOT 10 541 329 661 Workers' expectancies Expected wages Frequency 0.0 40.0 0.0 10.0 true false "" "" PENS "default" 1.0 1 -16777216 true "" "" CHOOSER 164 362 336 407 who-seeks-whom who-seeks-whom "employer seeks random worker" "worker seeks random employer" "employer seeks cheapest worker" "worker seeks best employer" 3 SLIDER 164 325 336 358 radius radius 0 100 100 1 1 NIL HORIZONTAL MONITOR 9 340 156 385 min/max expected expense list precision minExpectedExpense 2 precision maxExpectedExpense 2 2 1 11 PLOT 342 382 967 676 Min and max expected wages Time Wages 0.0 10.0 0.0 10.0 true true "" "" PENS "min workers" 1.0 0 -2674135 true "" "" "max workers" 1.0 0 -2674135 true "" "" "min employers" 1.0 0 -13345367 true "" "" "max employers" 1.0 0 -13345367 true "" "" "equilibrium wages" 1.0 0 -10899396 true "" "" "average wages" 1.0 0 -16777216 true "" "" "minWages" 1.0 0 -7500403 true "" "" MONITOR 9 237 151 282 Mean employment duration ifelse-value ( length filter [ ? > -1 ] [ EmploymentDuration ] of data > 0 ) \n[ \n mean filter [ ? > -1 ] [ EmploymentDuration ] of data \n]\n[\n -1 \n] 2 1 11 BUTTON 10 51 76 84 Step go NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 164 217 336 250 minWageFastfood minWageFastfood 0 30 0 1 1 NIL HORIZONTAL SLIDER 164 252 336 285 minWageConstruction minWageConstruction 0 30 0 1 1 NIL HORIZONTAL SLIDER 164 287 336 320 minWageCleaning minWageCleaning 0 30 0 1 1 NIL HORIZONTAL PLOT 340 219 546 378 Demand-Supply-Food Jobs Wages 0.0 0.5 0.0 30.0 true false "" "" PENS "number of workers vs. expected wages" 1.0E-4 0 -2674135 true "" "" "number of employers vs. expected wages" 1.0 0 -13345367 true "" "" PLOT 552 218 745 377 Demand-Supply-Construction jobs wages 0.0 1.0 0.0 30.0 true false "" "" PENS "default" 1.0 0 -2674135 true "" "" "number of workers vs. expected wages" 1.0 0 -2674135 true "" "" "number of employers vs. expected wages" 1.0 0 -13345367 true "" "" PLOT 750 219 965 378 Demand-Supply-Cleaner jobs wages 0.0 0.1 0.0 10.0 true false "" "" PENS "default" 1.0 0 -13345367 true "" "" "number of employers vs. expected wages" 1.0 0 -13345367 true "" "" "number of workers vs. expected wages" 1.0 0 -2674135 true "" "" PLOT 977 11 1490 268 n-of-workers Time Number 0.0 1.0 0.0 1.0 true true "" "" PENS "n-of-workerfood" 1.0 0 -10899396 true "" "" "n-of-workerconstruction" 1.0 0 -2674135 true "" "" "n-of-workercleaner" 1.0 0 -13345367 true "" "" "n-of-unemployed" 1.0 0 -7500403 true "" "" MONITOR 1355 110 1477 155 n-of-EmployerFood count employers with [employertype = 2] 17 1 11 MONITOR 1355 158 1478 203 n-of-employerConstruction count employers with [employertype = 0] 17 1 11 MONITOR 1355 210 1477 255 n-of-employerCleaner count employers with [employertype = 1] 17 1 11 PLOT 340 680 643 830 Employment time distribution NIL NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "pen-0" 1.0 0 -7500403 true "" "" PLOT 651 681 962 831 Number of consecutive jobs per worker NIL NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "default" 1.0 0 -16777216 true "" "" @#$#@#$#@ ## WHAT IS IT? This model is a simple agent-based model of negotiations between potential employers and potential employees in an artificial economy in which minimum wages are expected to be introduced. In the current version both groups can have different sizes, and every employer can employ more than one worker. The current version makes a distinction between three employer types (fast food providers, providers of cleaning services and providers of simple construction services). ## HOW IT WORKS The market between potential employers and potential employees works as follows: in every round one potential employer seeks a potential employee or the other way round, either randomly or looking for the cheapest worker or the most generous potential employee. Both have expectations about the wages. If the wages demanded are lower than the wages offered (and, in case one or both have a current contract with another partner, the new conditions are better than the old ones), the two partners contract, and the wages agreed upon are somewhere between the demanded and offered wages. There can be a minimum wages as a lower bound of mutual expectations and contracted wages, either for all three trades the same or different values for the three trades. Contracts terminate when one of the two partners finds a more profitable relationship or when an employer employs more than (1 + numberOfWorkers / numberOfEmployers) workers (in the latter case the worker with the highest wages is fired). The model is in some features inspired by the zero-intelligence constrained (ZI-C) traders from Gode and Sunder. The ZI-C traders cannot make a trade that will yield a negative profit, i.e., buyers cannot buy at a price higher than their buyer value and sellers cannot sell for a price below their seller cost. In contrast to that model, both partners in this model can adjust their expectations according to the experiences made by themselves and/or their neighbours within a user-defined radius. ## HOW TO USE IT To run the model, select the numbers of employers and workers, their respective maximum expectations, and the maximum number of rounds. Next press the setup button to initialize the model. Also select among four version of the matching algorithm ("who-seeks-whom"). Decide whether you want to introduce a general minimum wages, different minimum wages per trade or no minimum wages at all (all sliders set to 0). A graph is displayed which shows something like supply and demand curves (and later on the trajectory of the realised number of contracts and the respective wages), and the agents are placed on the toroidal cellular automaton. The worker agents (little persons) move to the shops (little houses) of their employers (and back again to their initial place when they are fired), but the landscape shows the distances between employers and workers. The setup phase is something like a warming-up phase where all workers have a chance to get hired. The go button starts the simulation. When a contract is entered into, the contractual wages is shown in a monitor, and the trajectory of the realised number of contracts and the average of currently valid contracts is added to the demand-supply diagram and the market statistics are updated. The model will automatically stop when the maxNumberOfTrades is reached. The model can be stopped and resumed earlier by clicking the go button again. More plots show results of the simulation: Min and max expected wages show the distribution of the expectations of both sides over time as well as the (theoretical) equilibrium wages and the average of the currently valid wages. Wages distribution shows a histogram of the current contractual wages. Workers' and employers' expectancies show the current distribution of the expectations of both sides. ## THINGS TO NOTICE Averages of currently valid wages approximate the equilibrium wages soon, but the equilibrium employment volume is reached only very seldom. It might be interesting to know how long a contract between employer and employee is in force before one of the two finds a more profitable partner. See the employment time distributions and also the distribution of the number of consecutive jobs per worker. ## THINGS TO TRY Try several different "minimum wages", starting from 0! Try what happens when the radius is smaller (~3) or higher (a radius of 72 covers all potential partners!). ## EXTENDING THE MODEL ## REFERENCES Dhanaanjay K. Gode and Shyam Sunder. 1993. Allocative Efficiency of Markets with Zero-Intelligence Traders: Market as a Partial Substitute for Individual Rationality. The Journal of Political Economy. 101 (Feb. 1993). 119-137. NetLogo implementation of Gode and Sunder 1993 developed by: Mark E. McBride, Department of Economics, Miami University, Oxford, OH 45056, mark.mcbride@muohio.edu, http://mcbridme.sba.muohio.edu/, last updated: July 19, 2006, as ZITrading.nlogo in the NetLogo Model Library Documentation of this version: Peyman Jazayeri and Mehmet Hadi Tohum. Auswirkung der Einführung eines Mindestlohns auf den Arbeitsmarkt, anhand eines Simulationsmodells. http://kola.opus.hbz-nrw.de/volltexte/2012/759/, 2012. ## CREDITS Current implementation by Prof. Dr. Klaus G. Troitzsch Institut f�r Wirtschafts- und Verwaltungsinformatik Universit�t Koblenz-Landau kgt@uni-koblenz.de http://www.uni-koblenz.de/~kgt @#$#@#$#@ 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 factory false 0 Rectangle -7500403 true true 76 180 300 270 Rectangle -7500403 true true 15 105 90 231 Rectangle -16777216 true false 90 210 270 240 Line -7500403 true 90 195 90 255 Line -7500403 true 120 195 120 255 Line -7500403 true 150 195 150 240 Line -7500403 true 180 195 180 255 Line -7500403 true 210 210 210 240 Line -7500403 true 240 210 240 240 Line -7500403 true 90 225 270 225 Circle -1 true false 37 73 32 Circle -1 true false 55 38 54 Circle -1 true false 96 21 42 Circle -1 true false 105 40 32 Circle -1 true false 129 19 42 Rectangle -7500403 true true 14 228 78 270 Polygon -7500403 true true 120 180 165 150 165 180 210 150 210 180 255 150 255 180 300 150 300 180 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 link true 0 Line -7500403 true 150 0 150 300 link direction true 0 Line -7500403 true 150 150 30 225 Line -7500403 true 150 150 270 225 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go mean [ wages ] of workers with [ employed? ] 1 - count workers with [ employed? ] / numberOfWorkers setup go count data count workers with [ employed? ] ifelse-value ( length filter [ ? > -1 ] [ EmploymentDuration ] of data > 0 ) [ mean filter [ ? > -1 ] [ EmploymentDuration ] of data ][ -1 ] setup go count data count workers with [ employed? ] maxNOfEmployed ifelse-value ( length filter [ ? > -1 ] [ EmploymentDuration ] of data > 0 ) [ mean filter [ ? > -1 ] [ EmploymentDuration ] of data ][ -1 ] mean [ nOfEmployments ] of workers setup go count data count workers with [ employed? ] maxNOfEmployed ifelse-value ( length filter [ ? > -1 ] [ EmploymentDuration ] of data > 0 ) [ mean filter [ ? > -1 ] [ EmploymentDuration ] of data ][ -1 ] mean [ nOfEmployments ] of workers setup go count turtles setup go count turtles setup go mean [ wages ] of workers with [ employed? ] 1 - count workers with [ employed? ] / numberOfWorkers setup go mean [ wages ] of workers with [ employed? ] 1 - count workers with [ employed? ] / numberOfWorkers @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@