Skip to content

Commit

Permalink
go back
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Nov 2, 2024
1 parent 3c703c2 commit 98cd9e6
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 @@ -388,7 +388,7 @@ function perform_firms_market!(
DM_d_ig[i] -= S_fg[f]
DM_nominal_ig[i] += @view(S_fg[f]) .* @view(P_f[f])
S_fg[f] = 0
deleteat!(F_g, e)
swap_pop!(F_g, e)
isempty(F_g) && break
pr_price_f = pos(exp.(-2 .* @view(P_f[F_g])) ./ sum(exp.(-2 .* @view(P_f[F_g]))))
pr_size_f = @view(S_f[F_g]) ./ sum(@view(S_f[F_g]))
Expand Down Expand Up @@ -426,7 +426,7 @@ function perform_firms_market!(
DM_d_ig_[i] -= S_fg_[f]
S_fg[f] -= S_fg_[f]
S_fg_[f] = 0
deleteat!(F_g, e)
swap_pop!(F_g, e)
isempty(F_g) && break
pr_price_f = pos(exp.(-2 .* @view(P_f[F_g])) ./ sum(exp.(-2 .* @view(P_f[F_g]))))
pr_size_f = @view(S_f[F_g]) ./ sum(@view(S_f[F_g]))
Expand Down Expand Up @@ -522,7 +522,7 @@ function perform_retail_market!(
C_d_hg[h] -= S_fg[f] * P_f[f]
C_real_hg[h] += S_fg[f]
S_fg[f] = 0
deleteat!(F_g, e)
swap_pop!(F_g, e)
isempty(F_g) && break
pr_price_f = pos(exp.(-2 .* @view(P_f[F_g])) ./ sum(exp.(-2 .* @view(P_f[F_g]))))
pr_size_f = @view(S_f[F_g]) ./ sum(@view(S_f[F_g]))
Expand Down Expand Up @@ -556,7 +556,7 @@ function perform_retail_market!(
C_d_hg_[h] -= S_fg_[f] * P_f[f]
S_fg[f] -= S_fg_[f]
S_fg_[f] = 0
deleteat!(F_g, e)
swap_pop!(F_g, e)
isempty(F_g) && break
pr_price_f = max.(0, exp.(-2 .* @view(P_f[F_g])) ./ sum(exp.(-2 .* @view(P_f[F_g]))))
pr_price_f[isnan.(pr_price_f)] .= 0.0
Expand Down

0 comments on commit 98cd9e6

Please sign in to comment.