Social network in Labour Market
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Labor market model extended with social network job search matching ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; extensions[csv nw table rnd] ;; For reading/writing CSV files; create network; store temporatory date in table ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Agent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; breed [seekers seeker] breed [companies company] breed [vacancies vacancy] breed [occupations occupation] breed [agencies agency] ; Represents intermediaries that may help match job seekers and companies. undirected-link-breed [PSNs PSN] ; Personal social network links PSNs-own [weight] ; Represents the weight of the influence of social network resources undirected-link-breed [NGs NG] ; Negotiation link between seeker and vacancy NGs-own[competence Nwage] undirected-link-breed [EMPs EMP] ; Employment link between seeker and company links-own [Lstrategy] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Global variable ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; globals [ NRI-SL-wage-pair mean-wages unemployment-history vacancy-history mean-wage-history market-tightness ;;Labor market tension (number of jobs/number of unemployments) log-income-bins tolerance success-FS success-SS success-R;;三种寻找方式的成功数量 wage-diff-FS wage-diff-SS wage-diff-R;;三种寻找方式工资的回报率 wage-FS wage-SS wage-R wage-diff-table wage-table success-table V-rate U-rate ] occupations-own[ vacancy-value ;; The economic value of the job opening to the company. asof-wage age ;; Tracks how long the vacancy has remained open; older vacancies may increase wages to attract applicants. candidate-list ;; The list of seekers who have applied or been recommended for the vacancy. wage ;; The offered salary, subject to negotiation based on candidate expectations and fit. average-demand filled-value ;; The value if the vacancy is occupied. offered-wage ;; The initial salary filled? ;; Boolean indicating whether the position has been filled. MC ;; The mother company (employer) managing the vacancy skill-demand ;; The skill level required for the position (1 = low, 2 = medium, 3 = high). industry ;; A reserved attribute to represent sectoral classification. hiring? ;;whether this job is still hiring ] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Job seeker ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; seekers-own [ strategy wage-diff my-payoff unemployment-value ;;Value of job seekers when unemployed ; tolerance ;;Tolerance of low wages,this affects the acceptance of offers below the desired salary offers best-offer best-wage AS? ;;Whether or not to search aggressively,deciding whether or not to use enhanced social network searches my-company expected-wage ;;Expected wages of job seekers, dynamically changing during initialization and negotiation prestige ;;To calculate Network Resource Index NRI ;;Network Resource Index decides the value if the company hires the agent offer-list duration ;;Unemployment duration skill-level strategy-set education-level work-experience sex age degree graduates? ;daily-contacts ;; A randomly generated number of daily contacts (between 6 and 10), used to form social ties. salary expected-salary job-seeked? ;; Whether employed or not my-wage assigned-wage ] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Company ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; companies-own [ ;;social-impact ;TBD vaca ;; A dynamic list of current vacancies linked to the company. std-production ;; Standard value mean-production ;; Placeholder variables intended for tracking variability in company output. production-level ;; The firm's current production capacity, which is influenced by successful hiring and strategic adjustments. ;growth-rate ;; A factor to simulate productivity growth (currently static but extendable with stochastic elements). hiring-value ;; A derived variable calculated from the value of filled positions and the social capital (NRI) of hired seekers.; Etype ;; Ownership type of the firm, categorized as public (pub), independent (ind), or foreign-funded (for), assigned probabilistically to reflect market structure. hired-list ;; A container to keep track of recruited seekers. position-adjustment ;; Determines whether new positions will be added or reduced in the next round, based on productivity. total-cost ;; Reserved for accounting total hiring and wage expenditures. ] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Job vacancy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; vacancies-own[ asof-wage vacancy-value ;; The economic value of the job opening to the company. age ;; Tracks how long the vacancy has remained open; older vacancies may increase wages to attract applicants. candidate-list ;; The list of seekers who have applied or been recommended for the vacancy. wage ;; The offered salary, subject to negotiation based on candidate expectations and fit. average-demand filled-value ;; The value if the vacancy is occupied. offered-wage ;; The initial salary filled? ;; Boolean indicating whether the position has been filled. MC ;; The mother company (employer) managing the vacancy skill-demand ;; The skill level required for the position (1 = low, 2 = medium, 3 = high). industry ;; A reserved attribute to represent sectoral classification. hiring? ;;whether this job is still hiring ] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Agency;;TBD ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; agencies-own [ matching-efficiency ;; Represents the agency’s effectiveness in connecting seekers with appropriate vacancies. reigistered-workers];; A list or count of job seekers enrolled with the agency. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Social network setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to generate-network create-companies num-companies [setup-companies] (ifelse network-type = "Small-World" [nw:generate-watts-strogatz seekers PSNs num-seekers 5 rewire-probability ; Set up small-world network ask PSNs [set weight 1]] network-type = "BA" [nw:generate-preferential-attachment seekers PSNs num-seekers 3 ask PSNs [set weight 1]] [nw:generate-random seekers PSNs num-seekers 0.03 ask PSNs [set weight 1]]) setup-seekers repeat 25 [layout-spring turtles PSNs 0.8 20 1] ; Visualize the layout of social networks ask links [hide-link] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Create job seeker ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-seekers set NRI-SL-wage-pair (list) set wage-diff-table table:make set wage-table table:make set success-table table:make ask seekers [ set shape "person" ;set my-company nobody set AS? false ;Whether to use agency search strategy ;; Set initial employment status set my-company ifelse-value random-float 1 < jobless-rate [nobody] ; According to the unemployment rate ratio, some people will be unemployed from the beginning [one-of companies]; Otherwise, hire randomly to a company if my-company != nobody [ set color green ; Green for employed people create-EMP-with my-company ; Create a Employment Link(EMP link) move-to one-of [patches in-radius 5] of my-company ; Create an EMP link ] ;; Set skill-level (artificially divided into 3 levels) let SL-i random-float 1 set skill-level ( ifelse-value SL-i < 0.1 [random-float 3 + 13] ; 15% High Skill SL-i < 0.25 [random-float 3 + 10] ; 25% Medium Skill SL-i < 0.4 [random-float 3 + 7] SL-i < 0.65 [random-float 3 + 4] [random-float 3 + 1] ; 60% Low Skill ) ;; Set expected salary: minimum salary + skills * 1000 ;let base-wage skill-level * 200 + minimum-wage let bin rnd:weighted-one-of-list log-income-bins [ [x] -> last x ] let lower first bin let upper item 1 bin let log-income lower + random-float (upper - lower) set assigned-wage exp(log-income) * (1 + (skill-level / 20)) set expected-wage assigned-wage * (1 + (random-float 0.3 - 0.05)) ;set expected-wage 10 ^ sample-log-income * (1 + skill-level / 20.0) ;set tolerance 0.01 ; Tolerance during salary negotiation affects whether to accept an offer ;; The setting of social status prestige let prestige-i random-float 1 set prestige ( ifelse-value prestige-i < 0.15 [2] ; 15% High status prestige-i < 0.85 [1] ; 70% Medium status [0.5] ; 15% Low status ) ;; Set global variables: all unemployed people set UMP ;set daily-contacts random 5 + 6 ; 6~10 contacts ;; Create random social links through daily-contacts (no duplication with already connected people) create-PSNs-with n-of daily-contacts other seekers who-are-not link-neighbors [set weight 0.5] ; The strength of the initial social relationship is 0.5 ] ;set UMP seekers with [my-company = nobody] ask seekers with [my-company = nobody] [set color red] ; The unemployed are shown in red ;; Calculate NRI:Network Resource Index,Used to simulate the ability of a person to get help through social interaction. ask seekers [ set NRI sum [prestige * [weight] of PSN-with myself] of PSN-neighbors ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Create agency ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-agencies end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Create company ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-companies setxy random 10 - 5 random 10 - 5 set color white set shape "house" set vaca no-turtles ;; Initialization The company has no vacancy yet set production-level 10 ;; The default company productivity level is set to 10 let Ei random-float 1 ;; precent of company type set Etype (ifelse-value Ei < 0.6 ["pub"] Ei < 0.35 ["ind"] ["for"]);; 60% public,25% indepedent,15% foreign end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Model initialization setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup __clear-all-and-reset-ticks set log-income-bins [[6.2 6.4 0.000348675034867503] [6.4 6.6 0.000174337517433752] [6.6 6.8 0.000698700348675035] [6.8 7.0 0.000698700348675035] [7.0 7.2 0.00157103757103757] [7.2 7.4 0.00362811791280149] [7.4 7.6 0.00675034867503486] [7.6 7.8 0.0128840970350404] [7.8 8.0 0.0215402843601896] [8.0 8.2 0.0333216726220632] [8.2 8.4 0.0445386192310276] [8.4 8.6 0.0542782288111644] [8.6 8.8 0.0583664459161148] [8.8 9.0 0.0568432407763511] [9.0 9.2 0.0510662177329532] [9.2 9.4 0.0422757051773294] [9.4 9.6 0.0333962729316361] [9.6 9.8 0.0272430472648114] [9.8 10.0 0.0208178785056326] [10.0 10.2 0.0163269605372615] [10.2 10.4 0.0138058540841553] [10.4 10.6 0.0112847476310491] [10.6 10.8 0.00801423723490814] [10.8 11.0 0.00586703096539162] [11.0 11.2 0.00464322638324506] [11.2 11.4 0.00326982097109785] [11.4 11.6 0.00219821382605634] [11.6 11.8 0.00139600928620765] [11.8 12.0 0.000698700348675035] ] set tolerance initial-tolerance generate-network initialize-vacancies ;; Initialize records set unemployment-history [] set vacancy-history [] set mean-wage-history [] vacancies-to-occupations end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; initialize-vacancies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to initialize-vacancies let total-vacancies 1000 while [count vacancies < total-vacancies] [ new-vacancy (one-of companies) 1 ] ask vacancies [set offered-wage asof-wage * (1 - random-float 0.04)] end to new-vacancy[belong-company num] let target-initial-unfilled initial-vacancies ask belong-company [ hatch-vacancies num [ let bin rnd:weighted-one-of-list log-income-bins [ [x] -> last x ] let lower first bin let upper item 1 bin let log-income lower + random-float (upper - lower) set hiring? true let SD-i random-float 1 set skill-demand ( ifelse-value SD-i < 0.1 [random-float 3 + 13] SD-i < 0.25 [random-float 3 + 10] SD-i < 0.4 [random-float 3 + 7] SD-i < 0.65 [random-float 3 + 4] [random-float 3 + 1] ) set shape "dot" set color brown set MC myself set filled-value 0 set asof-wage exp(log-income) * (1 + skill-demand / 20) set age 0 set filled? (count vacancies > target-initial-unfilled) move-to mc rt random 360 fd 1.5 set size 1 create-EMP-with MC ] set vaca vacancies with [EMP-neighbor? myself = true] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Model simulation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to go if ticks >= 10 and count vacancies = 0 [ export-wage-data ;export-beveridge-data stop ] ;; The first 12 monthes are warm-up ,The simulation duration is set to 500 ticks ;update-environment ;; Update the current tightness of the labor market (ratio of jobs to job seekers). update-seekers update-vacancies ;record-beveridge let current-wage-mean mean [expected-wage] of seekers with [my-company != nobody] set mean-wage-history lput current-wage-mean mean-wage-history ; let current-unemployed-skill mean [skill-level] of seekers with [my-company = nobody] ; let current-opening-demand mean [skill-demand] of vacancies with [filled? = false] ;show count vacancies with [filled? = false] ;print(word "vac(f) " count vacancies with [filled? = false]) if ticks > 1 [collect-ids] tick ;;update if looking next round, update social capital, update job search status ifelse any? seekers with [my-company = nobody] [ask seekers with [my-company = nobody] [search] ;; Have all unemployed people conduct formal/informal job search. wage-negotiation update-company][stop] ;;Updating productivity, deciding on a recruitment strategy for the next round, updating vacancy end to update-seekers if new-UMP? [ask seekers with [my-company != nobody] [if random-float 1 < ifelse-value network-type = "no-network" [0.0015] [0.0005] [set my-company nobody ask my-EMPs [die]]]] ;set UMP seekers with [my-company = nobody] ; Filter out all job seekers who are currently unemployed ask seekers with [my-company = nobody] [ set offers nobody ; Initialization: Clear the job opportunities received by each unemployed person. set duration duration + 1 ;; The longer you are unemployed, the more you tolerate low-wage jobs, if dynamic-adaption? [set tolerance tolerance + 0.01 if ticks mod 2 = 0 [set expected-wage expected-wage * 0.9]] ; If a job seeker has been unemployed for more than one year or has a skill level below 2, there is an 80% chance that he or she will start looking for a job through an agency search. if AS? = false and (duration > 12 or skill-level < 2) [if random-float 1 < 0.8 [set AS? true]] set NRI NRI * 0.9 + 0.1 * count PSN-neighbors with [my-company != nobody]/ count PSN-neighbors set unemployment-value 0.6 * expected-wage + 0.4 * 0.8 * minimum-wage] ;Estimating the utility of unemployment ; print (word "initial UMP count: " count seekers with [my-company = nobody]) end to update-vacancies ask vacancies[ set age age + 1 ;Simulate the situation in real life when recruitment is difficult and companies raise salaries to attract talent. if dynamic-adaption? and age > 5 [set offered-wage offered-wage * 1.05]] ;After a position exists for more than 5 ticks, the salary will increase by 1% every turn end ;;Job search process to search ;; Initialize the recommended variables to empty let recommendation no-turtles ;; Set the sensitivity parameter for wage-skill matching let wage-eclasity 0.02 let skill-eclasity 1 / 14 ;; Maximum number of positions to search each time let search-unit 5 ;; Social network recommendations: filter positions from friends' companies (my-company is not empty) ;; If the candidate is an enabled candidate (AS? = true) if AS? [set search-unit (round search-unit * 1.5) ;; Increase the intensity of active search set recommendation n-of (min list 2 count vacancies with [1 - (skill-demand / [skill-level] of myself) < 1.1]) vacancies with [1 - (skill-demand / [skill-level] of myself) < 1.1]] ;;Mandatory recommendation of 2 positions that match agent's skills ; Filter socially recommended positions that match your skills and salary expectations let social-search no-turtles if network-type != "no-network" [ set social-search turtle-set [vaca] of (turtle-set [my-company] of PSN-neighbors with [my-company != nobody]) set social-search (social-search) with [abs (1 - skill-demand / [skill-level] of myself) < [skill-eclasity] of myself and (abs 1 - offered-wage / [expected-wage] of myself) < wage-eclasity]] ; Search through formal channels (job board, etc.) for positions that meet the requirements let formal-search vacancies with [abs (1 - skill-demand / [skill-level] of myself) < skill-eclasity and (abs 1 - offered-wage / [expected-wage] of myself) < wage-eclasity] set formal-search one-of formal-search let offer-table table:make (table:put offer-table "FS" formal-search) (table:put offer-table "R" recommendation) if network-type != "no-network" [ (table:put offer-table "SS" social-search)] foreach ["FS" "SS" "R"] [strategy-i -> if table:has-key? offer-table strategy-i and table:get offer-table strategy-i != nobody [ let target table:get offer-table strategy-i ifelse is-agentset? target [ create-NGs-with target [ set Lstrategy strategy-i set color yellow set competence ([skill-level] of myself - [skill-demand] of other-end) * σ - ([expected-wage] of myself - [offered-wage] of other-end) if strategy-i != "FS" [ set competence competence * (1.05 + random-float 0.2 - 0.1) ] ] ][ create-NG-with target [ set Lstrategy strategy-i set color yellow set competence ([skill-level] of myself - [skill-demand] of other-end) * σ - ([expected-wage] of myself - [offered-wage] of other-end) if strategy-i != "FS" [ set competence competence * (1.05 + random-float 0.2 - 0.1) ] ] ] ]]end ;;Bargining for wage to wage-negotiation ask vacancies with [count NG-neighbors > 0 and NG-neighbors != nobody] ;; Start negotiations for each position with a candidate [set average-demand mean [expected-wage] of NG-neighbors let vaca-now self ;For each candidate (sort by competence from high to low) foreach sort-on [[0 - competence] of NG-with myself] NG-neighbors [? -> if ? != nobody and filled? != false [let ewage [expected-wage] of ? ;; First offer = sticky part * (unemployment value + average expected salary + strategic reward) let first-wage ε * (0.5 * ([unemployment-value] of ? + 0.5 * average-demand ) + (500 * strategy-bonus ?)) + (1 - ε) * offered-wage ;; Salary negotiation: Consider skills match let bargain-wage ewage * ([skill-level] of ? / skill-demand) * σ let final-wage β * first-wage + (1 - β) * bargain-wage ;; Update personal best offer ask ? [if final-wage > [best-offer] of ? [set best-offer final-wage]] ask NG-with ? [set Nwage final-wage] ;; To check if the candidate is willing to accept let willingness ((final-wage - ewage) / ifelse-value ewage = 0[final-wage][ewage]) / (-1 * [ifelse-value tolerance != 0[tolerance][1]] of ?) (ifelse willingness > 1.5 [ask vaca-now [onboard ? set filled? true set hiring? false]] willingness > 1 [ask NG-with ? [die] ] )]]] ;; All job seekers without a company, if they are still looking for a job, will choose the job with the highest bid ask seekers [while [my-company = nobody and count my-in-NGs > 0] [ask my-in-NGs [if Nwage = 0 [set Nwage [offered-wage] of other-end]] let targetVlink max-one-of my-in-NGs [Nwage] ask [other-end] of targetVlink [onboard myself]]] end to-report strategy-bonus [x] let Fmethod 0 if [AS?] of x = true [set Fmethod 0.5] let Gbonus1 0 let Gbonus2 0 ;; Graduate bonus points ifelse [graduates?] of x = true [set Gbonus1 100][set Gbonus1 0] (ifelse [Etype] of mc = "PUB" [set Gbonus2 1.5] [Etype] of mc = "IND" [set Gbonus2 1] [set Gbonus2 0]) let Gbonus Gbonus1 * Gbonus2 report Gbonus * (Fmethod + 1) end ;;update the value to onboard [wk] set filled? true let nlink ng-with wk set wage [Nwage] of nlink ;; Company productivity calculation set filled-value filled-value * ([skill-level] of wk / skill-demand * σ) ;; Job seeker update status ask wk [set my-wage [Nwage] of nlink set wage-diff my-wage - expected-wage set expected-wage max (list expected-wage [Nwage] of nlink) set my-company [MC] of myself move-to one-of [patches in-radius 5] of my-company set color green] ;; Update company recruitment score ask MC [set hiring-value hiring-value + ([filled-value - wage] of myself)] ;; Clear the original negotiation connection ; print (word "Hired: " [who] of wk " | Company: " [who] of MC) let strat first [Lstrategy] of nlink let wd [wage-diff] of wk let mw [my-wage] of wk ifelse table:has-key? wage-diff-table strat [ table:put wage-diff-table strat (table:get wage-diff-table strat) + wd ] [ print "wrong" table:put wage-diff-table strat wd ] ifelse table:has-key? wage-table strat [ table:put wage-table strat (table:get wage-table strat) + mw ] [ print "wrong" table:put wage-table strat mw ] ifelse table:has-key? success-table strat [ table:put success-table strat (table:get success-table strat) + 1 ] [ print "wrong" table:put success-table strat 1 ] ask my-NGs [die] end to update-company ask companies [set hiring-value hiring-value + 0.03 * (sum [NRI] of seekers with [my-company = myself]) ;; Update company recruitment scores based on job seeker willingness values ;; Production level forecast let anticipated-production-level production-level * (1 + growth-rate) + risk-buffer ;;growth-rate暂定为0,按照实际情况决定。同时建议growth-rate引入随机波动。 set production-level production-level + hiring-value foreach range 15 [? -> let FV vaca with [filled? = true and (skill-demand - ?) ^ 2 < 1] if any? FV [let mean-wage mean [wage] of FV let department-hiring-value sum [filled-value - wage] of FV ;; If actual output is higher than forecast, expand job positions if production-level > anticipated-production-level [ let new-vacancies (floor (production-level - anticipated-production-level)) + random 3 new-vacancy self new-vacancies ] ;; If output is low, jobs will be eliminated if position-adjustment < 0 [let nvacas count vaca with [skill-demand = ?] ask n-of min (list (nvacas) (-1 * position-adjustment)) vaca with [skill-demand = ?] [set filled? true]]]]] ask vacancies with [filled? = true][hatch-occupations 1 [set hidden? true] die] end to vacancies-to-occupations ask vacancies with [filled? = true][hatch-occupations 1 die] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Statistics and reporting process ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to-report risk-buffer let delta production-level - mean-production ;; Update mean production set mean-production (mean-production * (ticks - 1) + production-level) / ticks ;; Update standard production ifelse ticks - 1 > 0 [ set std-production sqrt (delta * (production-level - mean-production) / (ticks - 1)) ][ set std-production 0 ] ;; Returns the risk buffer value as a multiple of the 95% confidence interval report 1.96 * std-production end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;Data storage and export ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to collect-ids let strat-list (ifelse-value network-type = "no-network" [(list "R" "F")] [(list "R" "S" "F")]) foreach strat-list [strat -> let s (table:get success-table strat) let w (table:get wage-table strat) let d (table:get wage-diff-table strat) if strat = "R" [ set success-R s set wage-R (w / s) set wage-diff-R (d / s) ] if network-type != "no-network" and strat = "S" [ set success-SS s set wage-SS (w / s) set wage-diff-SS (d / s) ] if strat = "F" [ set success-FS s set wage-FS (w / s) set wage-diff-FS (d / s) ] ] set V-rate count (vacancies) / (count vacancies + count occupations) set U-rate count (seekers with [my-company = nobody]) / count seekers let wage-list table:to-list wage-table let success-list table:to-list success-table set mean-wages (sum item 1 wage-list) / (sum item 1 success-list) ask seekers [if my-wage != 0 [set NRI-SL-wage-pair lput (list NRI skill-level my-wage) NRI-SL-wage-pair]] end to export-wage-data file-open "final-data.csv" let wage-list [ifelse-value [Nwage] of my-NGs != [] [max[Nwage] of my-NGs][0]] of seekers with [my-company != nobody and my-NGs != nobody] foreach wage-list [w -> file-print w ] file-close end
There is only one version of this model, created 3 days ago by QIUTONG CHEN.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.