From 8692758b901f7957b4225c3c3deb96cb23c15dae Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Sat, 30 Nov 2024 02:54:41 +0100 Subject: [PATCH] Update search_and_matching_credit.jl --- src/markets/search_and_matching_credit.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/markets/search_and_matching_credit.jl b/src/markets/search_and_matching_credit.jl index f95ae1d..69dcf32 100644 --- a/src/markets/search_and_matching_credit.jl +++ b/src/markets/search_and_matching_credit.jl @@ -20,9 +20,9 @@ function search_and_matching_credit(firms::AbstractFirms, model) DL_i = zeros(size(DL_d_i)) I_FG = findall(DL_d_i .> 0) shuffle!(I_FG) - s = sum(L_e_i) + sum(DL_i) + s_L_e_i = sum(L_e_i) for i in I_FG - DL_i[i] = max(0.0, min(DL_d_i[i], zeta_LTV * K_e_i[i] - L_e_i[i], E_k / zeta - s)) + DL_i[i] = max(0.0, min(DL_d_i[i], zeta_LTV * K_e_i[i] - L_e_i[i], E_k / zeta - s_L_e_i - sum(DL_i))) end return DL_i end