Skip to content

Commit

Permalink
Update search_and_matching.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Oct 27, 2024
1 parent 76b7504 commit bccb9ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/markets/search_and_matching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function perform_firms_market!(
i = I_g[j]

# select a random firm according to the probabilities
e = wsample(1:length(F_g), pr_cum_f_)
e = wsample_single(1:length(F_g), pr_cum_f_)
#e = randf(pr_cum_f)
f = F_g[e]

Expand Down Expand Up @@ -423,7 +423,7 @@ function perform_firms_market!(
for j in eachindex(I_g)
i = I_g[j]

e = wsample(1:length(F_g), pr_cum_f_)
e = wsample_single(1:length(F_g), pr_cum_f_)
f = F_g[e]

if S_fg_[f] > DM_d_ig_[i]
Expand Down Expand Up @@ -521,7 +521,7 @@ function perform_retail_market!(
for j in eachindex(H_g)
h = H_g[j]

e = wsample(1:length(F_g), pr_cum_f_) # SLOW
e = wsample_single(1:length(F_g), pr_cum_f_) # SLOW
f = F_g[e]

if S_fg[f] > C_d_hg[h] / P_f[f]
Expand Down Expand Up @@ -557,7 +557,7 @@ function perform_retail_market!(
H_g = shuffle(H_g)
for j in eachindex(H_g)
h = H_g[j]
e = wsample(1:length(F_g), pr_cum_f_)
e = wsample_single(1:length(F_g), pr_cum_f_)
f = F_g[e]

if S_fg_[f] > C_d_hg_[h] / P_f[f]
Expand Down

0 comments on commit bccb9ed

Please sign in to comment.