An attempt to evaluate the minimum wage
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
globals [
seed-used
]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; DEFINE AGENTS IN THE MODEL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
breed [firms firm]
breed [workers worker]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; AGENT'S ASSETS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; FIRM'S ASSETS
firms-own [
f-production
technology
f-employees
f-capital
f-vacancy
f-wage-offer
f-init-tech
alpha
intensity
f-labor-cost
f-capital-cost
f-total-cost
f-unit-cost
f-unit-price
markup
f-inventory
f-revenue
f-profit
x-position
y-position
min-wage-inc
]
workers-own [
employed
w-pot-firms
w-firm
w-wage
income
mpc
w-savings
w-stores
w-stores-l
gini
wealth
]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; SETUP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
to setup
clear-all
start-firms number-of-firms
start-workers number-of-workers
initialize-variables
firms-produce
labor-market-opens
reset-ticks
end
to initialize-variables
ask firms
[
set f-production 1
set technology 1
set f-employees no-turtles
set alpha random-float 1
set intensity 2 * ((alpha / (1 - alpha)) ^ 2)
set f-init-tech 1 + random-float 1
set markup 1 + random-float 1
set f-capital 100
set f-vacancy 0
set f-wage-offer min-wage
set f-labor-cost 0
set f-capital-cost 0
set f-inventory 0
set f-revenue 0
set f-profit 0
set min-wage-inc 0
]
ask workers
[
set employed false
set w-pot-firms no-turtles
set w-firm nobody
set mpc 0
set income 0
set w-savings 0
set gini 0
set w-stores no-turtles
set w-stores-l no-turtles
set wealth 0
]
end
to go
if (ticks >= 500
)
[stop]
goods-market
labor-market
ask firms
[
set technology (f-init-tech) * ( (1 + tech-progress) ^ (ln (1 + ticks) ) )
if (ticks >= 100) [set min-wage-inc min-wage-increase]
]
tick
end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; MARKET'S ACTIONS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
to labor-market
labor-market-opens
end
to goods-market
firms-produce
workers-income
firms-revenue
firing-steps
end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; AGENT'S ACTIONS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; LABOR MARKET
to labor-market-opens
ask firms
[
set f-vacancy 12
]
let pot-firms firms with [f-vacancy > 0]
ask workers with [not employed]
[
ifelse (not empty? [w-firm] of w-pot-firms)
[set w-pot-firms (turtle-set w-firm n-of (3 - 1 ) pot-firms)]
[set w-pot-firms n-of (min (list 3 count pot-firms)) pot-firms]
]
hiring-step 2
ask workers with [not employed][
set w-wage 0
rt random 360
fd (random 4) + 1
]
ask firms
[
set label count f-employees
]
end
;;;;;;;;;;;;;;;;;;;;;; HIRING
to hiring-step [trials]
while [trials > 0]
[
ask workers with [not employed and any? w-pot-firms]
[
move-to max-one-of w-pot-firms [f-wage-offer]
]
ask firms with [f-vacancy > 0 ]
[
let pot-workers workers-here with [not employed]
let quantity count pot-workers
let workers-hired n-of (min list quantity f-vacancy) pot-workers
let wage-employees f-wage-offer
set f-employees (turtle-set f-employees workers-hired)
set f-vacancy f-vacancy - (count workers-hired)
ask f-employees with [not employed]
[
set color white
set employed true
set w-wage wage-employees
set w-firm firms-here
set w-pot-firms no-turtles
]
]
set trials trials - 1
ask workers with [not employed and any? w-pot-firms][
set w-pot-firms min-n-of min (list trials count w-pot-firms) w-pot-firms [f-wage-offer]
]
]
end
;;;;;;;;;;;;;;;;;;;;;; FIRM'S PRODUCTION
to firms-produce
ask firms
[
set f-production technology * ((count f-employees) ^ (1 - alpha)) * (f-capital ^ (alpha))
set f-capital-cost f-capital * 1
set f-total-cost f-labor-cost + f-capital-cost
set f-wage-offer min-wage + min-wage-inc + intensity
set f-labor-cost (count f-employees) * f-wage-offer
if f-production > 0 [
set f-unit-cost f-total-cost / f-production
]
if f-production = 0 [
set f-unit-cost 0
]
set f-unit-price f-unit-cost * markup
]
end
to workers-income
ask firms
[
let wage-stipend f-wage-offer
ask f-employees
[
set w-wage wage-stipend
]
]
ask workers[
ifelse w-wage >= (mean [w-wage] of workers)
[set mpc (mean [w-wage] of workers) / w-wage]
[set mpc (w-wage / (mean [w-wage] of workers))]
set income w-wage
let income-for-cons mpc * income
set w-savings income - income-for-cons
ifelse (any? turtle-set w-stores-l)
[
let id-store [who] of w-stores-l
set w-stores (turtle-set w-stores-l n-of ( min list (x2 - 1) count firms with [who != id-store] ) firms with [who != id-store])
]
[
set w-stores n-of ( min list x2 count firms ) firms
]
set w-stores-l max-one-of w-stores [f-production]
if (count w-stores != x2) [show (word "Number of my stores " count w-stores " who " who)]
buying-steps x2 income-for-cons
]
ask workers
[
set wealth w-savings
]
end
to buying-steps [trials money]
while [trials > 0 and money > 0]
[
let cheapest-store min-one-of w-stores [f-unit-price]
let possible-goods-to-buy min list money [f-inventory] of cheapest-store
set money money - possible-goods-to-buy
ask cheapest-store [
set f-inventory f-inventory - possible-goods-to-buy
]
ask [patch-here] of cheapest-store [
set pcolor blue
]
set trials trials - 1
set w-stores max-n-of trials w-stores [f-unit-price]
]
end
to firms-revenue
ask firms [
set f-revenue f-unit-price * (f-production - f-inventory)
set f-profit f-revenue - f-total-cost
]
end
to firing-steps
ask firms with [f-profit <= 0] [
ask f-employees [
set employed false
]
set f-production 0
set f-inventory 0
]
ask firms with [f-profit <= 0 ] [die]
end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; VISUALIZATION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
to start-firms [#firms]
create-firms #firms [
set x-position random-pxcor * 0.8
set y-position random-pycor * 0.8
setxy x-position y-position
set color blue
set size 2
set shape "flag"
]
end
to start-workers [#workers]
create-workers #workers [
setxy random-pxcor random-pycor
set color yellow
set size 0.5
set shape "person"
]
end
to-report all-workers-savings
report [w-savings] of workers
end
There are 2 versions of this model.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.
Download this model