mario.set_compute_method#

mario.set_compute_method(method: str)#

Set the default runtime method used for demand-driven IOT/SUT calculations.

Parameters:

method

One of "auto", "inverse" or "solve".

  • "auto" lets MARIO choose between explicit-inverse and solve-based formulas according to the requested target and the estimated memory cost of materializing the w Leontief inverse matrix.

  • "inverse" forces the historical path based on the explicit w Leontief inverse matrix.

  • "solve" prefers linear-system solves that avoid materializing explicit inverse blocks for large demand-driven targets such as the IOT X total production vector, f total (direct+indirect) environmental transaction coefficients matrix, F total (direct+indirect) environmental transaction flows matrix, m total (direct+indirect) value added coefficients matrix, M total (direct+indirect) value added transaction matrix, p price index vector and the analogous split SUT targets.

Notes

This setting is used whenever no per-call override is passed to mario.CoreModel.calc_all(), mario.CoreModel.resolve() or mario.CoreModel.resolve_many(). Dotted access such as db.f also goes through this default because it delegates to calc_all() without explicit overrides.