From a670e7ff4cef5c7f599fdc80049b997b67e74939 Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Sat, 30 Nov 2024 02:57:48 +0100 Subject: [PATCH] Update search_and_matching_labour.jl --- src/markets/search_and_matching_labour.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/markets/search_and_matching_labour.jl b/src/markets/search_and_matching_labour.jl index 2693660..3dbd6a0 100644 --- a/src/markets/search_and_matching_labour.jl +++ b/src/markets/search_and_matching_labour.jl @@ -31,10 +31,9 @@ function search_and_matching_labour(firms::AbstractFirms, model) shuffle!(H_E) # fire workers if vacancies are negative - for e in eachindex(H_E) + for h in H_E # find employer of worker - h = H_E[e] i = O_h[h] # if employer has negative vacancies, fire the worker @@ -53,9 +52,7 @@ function search_and_matching_labour(firms::AbstractFirms, model) # while there are no more vacancies or unemployed workers while !isempty(H_U) && !isempty(I_V) shuffle!(I_V) - for f in eachindex(I_V) - # select random vacancy - i = I_V[f] + for i in I_V # select random unemployed worker h = H_U[1] # employ worker