dot-sfcr_gauss_seidel: Gauss Seidel algorithm

Description Usage Arguments Details Author(s)

Description

Gauss Seidel algorithm

Usage

1
.sfcr_gauss_seidel(m, equations, periods, max_ite, tol)

Arguments

m

The initialized matrix obtained with .make_matrix().

equations

Prepared equations with .prep_equations().

periods

Total number of rows (periods) in the model.

max_ite

Maximum number of iterations allowed per block per period.

tol

Tolerance accepted to determine convergence.

Details

This algorithm simulates the model by recursion by using nested for loops. At each round of iteration, the values calculated are compared to the previous values. If the difference is below a tolerance value set by the user, the round of calculations have converged and the algorithm jump to the next block of equations.

The algorithm modifies a matrix in place to optimize its performance.

Author(s)

João Macalós


sfcr documentation built on Oct. 11, 2021, 9:09 a.m.