Skip to content

Commit

Permalink
v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Nov 17, 2024
1 parent 4b96c41 commit 59c541c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/markets/search_and_matching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ function perform_firms_market!(
shuffle!(I_g)
for i in I_g
# select a random firm according to the probabilities
e = rand(F_g_sampler; info=true)
f = F_g[e.idx]
e = rand(F_g_sampler)
f = F_g[e]

# selected firm has sufficient stock
if S_fg[f] > DM_d_ig[i]
Expand Down Expand Up @@ -395,8 +395,8 @@ function perform_firms_market!(

shuffle!(I_g)
for i in I_g
e = rand(F_g_sampler; info=true)
f = F_g[e.idx]
e = rand(F_g_sampler)
f = F_g[e]

if S_fg_[f] > DM_d_ig_[i]
S_fg[f] -= DM_d_ig_[i]
Expand Down Expand Up @@ -483,8 +483,8 @@ function perform_retail_market!(

shuffle!(H_g)
for h in H_g
e = rand(F_g_sampler; info=true)
f = F_g[e.idx]
e = rand(F_g_sampler)
f = F_g[e]

if S_fg[f] > C_d_hg[h] / P_f[f]
S_fg[f] -= C_d_hg[h] / P_f[f]
Expand Down Expand Up @@ -515,8 +515,8 @@ function perform_retail_market!(

shuffle!(H_g)
for h in H_g
e = rand(F_g_sampler; info=true)
f = F_g[e.idx]
e = rand(F_g_sampler)
f = F_g[e]

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

0 comments on commit 59c541c

Please sign in to comment.