diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index aaa3b341..0d77f2e5 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -289,7 +289,7 @@ function obc_constraint_optim_fun(res::Vector{S}, X::Vector{S}, jac::Matrix{S}, ๐“‚ = p[4] if length(jac) > 0 - jac .= ๐’œ.jacobian(๐’ท, xx -> ๐“‚.obc_violation_function(xx, p), X)[1]' + jac .= ๐’œ.jacobian(๐’ท(), xx -> ๐“‚.obc_violation_function(xx, p), X)[1]' end res .= ๐“‚.obc_violation_function(X, p) diff --git a/src/get_functions.jl b/src/get_functions.jl index c318ae7b..7d03b0be 100644 --- a/src/get_functions.jl +++ b/src/get_functions.jl @@ -1233,7 +1233,8 @@ function get_steady_state(๐“‚::โ„ณ; if algorithm == :third_order dSSS = ๐’œ.jacobian(๐’ท(), x->begin - SSS = SSS_third_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose)[collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] + SSS = SSS_third_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose) + [collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] end, ๐“‚.parameter_values[param_idx])[1] return KeyedArray(hcat(SS[[var_idx...,calib_idx...]], dSSS); Variables_and_calibrated_parameters = axis1, Steady_state_and_โˆ‚steady_stateโˆ‚parameter = axis2) @@ -1241,7 +1242,8 @@ function get_steady_state(๐“‚::โ„ณ; elseif algorithm == :pruned_third_order dSSS = ๐’œ.jacobian(๐’ท(), x->begin - SSS = SSS_third_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose, pruning = true)[collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] + SSS = SSS_third_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose, pruning = true) + [collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] end, ๐“‚.parameter_values[param_idx])[1] return KeyedArray(hcat(SS[[var_idx...,calib_idx...]], dSSS); Variables_and_calibrated_parameters = axis1, Steady_state_and_โˆ‚steady_stateโˆ‚parameter = axis2) @@ -1249,7 +1251,8 @@ function get_steady_state(๐“‚::โ„ณ; elseif algorithm == :pruned_second_order dSSS = ๐’œ.jacobian(๐’ท(), x->begin - SSS = SSS_second_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose, pruning = true)[collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] + SSS = SSS_second_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose, pruning = true) + [collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] end, ๐“‚.parameter_values[param_idx])[1] return KeyedArray(hcat(SS[[var_idx...,calib_idx...]], dSSS); Variables_and_calibrated_parameters = axis1, Steady_state_and_โˆ‚steady_stateโˆ‚parameter = axis2) @@ -1257,7 +1260,8 @@ function get_steady_state(๐“‚::โ„ณ; else dSSS = ๐’œ.jacobian(๐’ท(), x->begin - SSS = SSS_second_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose)[collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] + SSS = SSS_second_order_parameter_derivatives(x, param_idx, ๐“‚, verbose = verbose) + [collect(SSS[1])[var_idx]...,collect(SSS[3])[calib_idx]...] end, ๐“‚.parameter_values[param_idx])[1] return KeyedArray(hcat(SS[[var_idx...,calib_idx...]], dSSS); Variables_and_calibrated_parameters = axis1, Steady_state_and_โˆ‚steady_stateโˆ‚parameter = axis2)