Resolvable Matrices and Blocks
The database compute API resolves named blocks and their dependencies for a
scenario. Standalone calc_* functions are listed in
Calculations. To request blocks from a database:
db.resolve("Xa")
db.resolve_many(["u", "s", "Xc"])
db.calc_all(["fc", "pc"])
db.Xa
db.wcc
Use mario.CoreModel.available_matrices to list the block names accepted by the current table, and mario.CoreModel.get_block_spec to inspect their semantic axes.
For SUT databases, the built-in split and quadrant blocks include U, u,
S, s, Xa, Xc, Va, Vc, Ea, Ec, Ya, Yc,
wcc, wca, wac, waa, fa, fc, ma, mc, pa and
pc. The canonical commodity production vector name is Xc; Cx is
not a built-in MARIO matrix name.
Separate-import configurations#
Single-region models with import_representation="separate" add native
imports to the runtime catalogue. Use db.resolve("imp") or the equivalent
db.query("imp") to calculate coefficients. IMP_Y stays an absolute
final-demand block in both flow and coefficient exports.
Rows carry observed import descriptors. The table’s existing productive and final-demand axes determine the columns. See the import-account guide for normalization, total requirements, price equations and balance identities.
IOT import blocks#
| Matrix | Description | Row indices | Column indices | Formula |
|---|---|---|---|---|
| IMP_Y | External imports delivered directly to final demand. | Import descriptors | Region × Consumption category | |
| IMP | External import flows into domestic production. | Import descriptors | Region × Sector | IMP = imp diag(X) |
| imp | External import coefficients per unit of domestic output. | Import descriptors | Region × Sector | imp = IMP diag(X)^-1 |
| im | Direct and indirect import requirements per unit of final output. | Import descriptors | Region × Sector | im = imp (I-z)^-1 or im = imp w |
| IM | Import requirements allocated to domestic final output. | Import descriptors | Region × Sector | IM = im diag(Y 1) |
SUT import blocks#
| Matrix | Description | Row indices | Column indices | Formula |
|---|---|---|---|---|
| IMP_Y | External imports delivered directly to final demand. | Import descriptors | Region × Consumption category | |
| IMP_a | External use imports purchased by domestic activities. | Import descriptors | Region × Activity | IMP_a = imp_a diag(Xa) |
| imp_a | External use import coefficients per unit of activity output. | Import descriptors | Region × Activity | imp_a = IMP_a diag(Xa)^-1 |
| IMP_c | External supply imports entering domestic commodity markets. | Import descriptors | Region × Commodity | IMP_c = imp_c diag(Xc) |
| imp_c | External supply import coefficients per unit of commodity output. | Import descriptors | Region × Commodity | imp_c = IMP_c diag(Xc)^-1 |
| im_a | Direct and indirect import requirements per unit of activity output. | Import descriptors | Region × Activity | im_a = (imp_a + imp_c u) (I-su)^-1 or im_a = (imp_a + imp_c u) waa |
| im_c | Direct and indirect import requirements per unit of commodity output. | Import descriptors | Region × Commodity | im_c = (imp_a s + imp_c) (I-us)^-1 or im_c = (imp_a s + imp_c) wcc |
| IM_a | Import requirements through activity final output, allocated to commodities. | Import descriptors | Region × Commodity | IM_a = im_a s diag(Yc 1) |
| IM_c | Import requirements allocated to commodity final output. | Import descriptors | Region × Commodity | IM_c = im_c diag(Yc 1) |
| IMP | External import flows into domestic production. | Import descriptors | Region × Commodity/Activity | IMP = concatenate(IMP_a, IMP_c) |
| imp | External import coefficients per unit of domestic output. | Import descriptors | Region × Commodity/Activity | imp = concatenate(imp_a, imp_c) |
| im | Direct and indirect import requirements per unit of final output. | Import descriptors | Region × Commodity/Activity | im = concatenate(im_a, im_c) |
| IM | Import requirements allocated to domestic final output. | Import descriptors | Region × Commodity/Activity | IM = concatenate(IM_a, IM_c) |
Use and supply coefficients#
The native use and supply calculations have dedicated block pages:
In particular, u divides each use-flow column by activity production.
s follows the database technology assumption:
The native SUT calculation reference also links production vectors, Leontief/Ghosh quadrants, direct-output coefficients and price vectors.
Core equations#
IOT results follow the equations in Calculations. For SUT,
u maps activity production to commodity inputs and s maps commodity
demand to activity production. The technology assumption determines the
construction of s; see Supply and Use Tables.
Once those coefficients are available, the four Leontief quadrants are:
The total environmental multipliers include direct coefficients on both sides:
The value-added multipliers ma and mc use the same equations with
\(v_a\) and \(v_c\) in place of \(e_a\) and \(e_c\).
For the factor-account representation, price vectors sum all factor rows.
The separate-import representation adds import requirements as described in
the import-account guide.
The solve path evaluates the same multipliers through transposed linear systems. For example:
This avoids constructing wcc when it is not otherwise needed. Runtime
settings and already materialized blocks determine the selected path;
db.explain("fc") describes the current dependency plan. An already stored
result is returned directly, so that plan does not reconstruct how it was
originally calculated.
Block catalog#
The reference table below reuses the authoritative nomenclature matrix catalog and therefore covers both IOT and SUT built-ins, along with their table format, mode and default axes.
For an introduction with block diagrams, see IOT structure and SUT structure. Sets and indices explains the sets and aliases.
* marks extension axes that can carry additional levels via matrix_layouts;
** marks the assumption-dependent definition of s.
| Matrix | Mode | Table format(s) | Also known as | Description | Row indices | Column indices |
|---|---|---|---|---|---|---|
| Z | Flows | IOT | T | Intersectoral transaction flows matrix | Region, Sector | Region, Sector |
| z | Coefficients | IOT | A | Intersectoral transaction coefficients matrix | Region, Sector | Region, Sector |
| w | Coefficients | IOT | L | Leontief inverse matrix | Region, Sector | Region, Sector |
| Y | Flows | IOT | F | Final demand matrix | Region, Sector | Region, Consumption category |
| X | Flows | IOT | x, q | Total production vector | Region, Sector | - |
| V | Flows | IOT | F | Value added transaction flows matrix | Factor of production* | Region, Sector |
| v | Coefficients | IOT | f, B, S | Value added coefficients matrix | Factor of production* | Region, Sector |
| VY | Flows | All | S_Y, F_hh, F_y | Value added transaction matrix for final demand | Factor of production* | Region, Consumption category |
| E | Flows | IOT | F, D_pba, terr | Environmental transaction flows matrix | Satellite account* | Region, Sector |
| e | Coefficients | IOT | f, B, S | Environmental transaction coefficients matrix | Satellite account* | Region, Sector |
| EY | Flows | All | S_Y, F_hh, F_y | Environmental transaction flows matrix for final demand | Satellite account* | Region, Consumption category |
| M | Flows | IOT | Total (direct+indirect) value added transaction matrix | Factor of production* | Region, Sector | |
| m | Coefficients | IOT | Total (direct+indirect) value added coefficients matrix | Factor of production* | Region, Sector | |
| m_ex | Coefficients | IOT | Total (direct+indirect) value added coefficients matrix, exploded by origin region and sector | Factor of production, Region, Sector | Region, Sector | |
| F | Flows | IOT | D_cba, con | Total (direct+indirect) environmental transaction flows matrix | Satellite account* | Region, Sector |
| f | Coefficients | IOT | M | Total (direct+indirect) environmental coefficients matrix | Satellite account* | Region, Sector |
| f_ex | Coefficients | IOT | Total (direct+indirect) environmental coefficients matrix, exploded by origin region and sector | Satellite account, Region, Sector | Region, Sector | |
| p | Coefficients | IOT | Price index vector | Region, Sector | - | |
| p_ex | Coefficients | IOT | Price index, exploded by origin region and sector | Factor of production, Region, Sector | Region, Sector | |
| U | Flows | SUT | T | Use transaction flows matrix | Region, Commodity | Region, Activity |
| u | Coefficients | SUT | A | Use transaction coefficients matrix | Region, Commodity | Region, Activity |
| S | Flows | SUT | V, M, T | Make transaction flows matrix | Region, Activity | Region, Commodity |
| s | Coefficients | SUT | A | Make transaction coefficients matrix - Market share or inverted product-mix matrix** | Region, Activity | Region, Commodity |
| c | Coefficients | SUT | Product-mix matrix | Region, Commodity | Region, Activity | |
| wcc | Coefficients | SUT | w | Leontief inverse matrix, commodity-by-commodity coefficients | Region, Commodity | Region, Commodity |
| wca | Coefficients | SUT | w | Leontief inverse matrix, commodity-by-activity coefficients | Region, Commodity | Region, Activity |
| wac | Coefficients | SUT | w | Leontief inverse matrix, activity-by-commodity coefficients | Region, Activity | Region, Commodity |
| waa | Coefficients | SUT | w | Leontief inverse matrix, activity-by-activity coefficients | Region, Activity | Region, Activity |
| Yc | Flows | SUT | F | Final demand of commodities matrix | Region, Commodity | Region, Consumption category |
| Ya | Flows | SUT | F | Final demand of activities matrix | Region, Activity | Region, Consumption category |
| Xc | Flows | SUT | Q | Total demand (or production) of commodities vector | Region, Commodity | - |
| Xa | Flows | SUT | X | Total demand (or production) of activities vector | Region, Activity | - |
| Vc | Flows | SUT | Value added transaction flows by commodity matrix | Factor of production* | Region, Commodity | |
| Va | Flows | SUT | Value added transaction flows by activity matrix | Factor of production* | Region, Activity | |
| vc | Coefficients | SUT | Value added transaction coefficients by commodity matrix | Factor of production* | Region, Commodity | |
| va | Coefficients | SUT | Value added transaction coefficients by activity matrix | Factor of production* | Region, Activity | |
| Ec | Flows | SUT | Environmental transaction flows by commodity matrix | Satellite account* | Region, Commodity | |
| Ea | Flows | SUT | Environmental transaction flows by activity matrix | Satellite account* | Region, Activity | |
| ec | Coefficients | SUT | Environmental transaction coefficients by commodity matrix | Satellite account* | Region, Commodity | |
| ea | Coefficients | SUT | Environmental transaction coefficients by activity matrix | Satellite account* | Region, Activity | |
| Mc | Flows | SUT | Total (direct+indirect) value added transaction by commodity matrix | Factor of production* | Region, Commodity | |
| Ma | Flows | SUT | Total (direct+indirect) value added transaction by activity matrix | Factor of production* | Region, Activity | |
| mc | Coefficients | SUT | Total (direct+indirect) value added coefficients by commodity matrix | Factor of production* | Region, Commodity | |
| ma | Coefficients | SUT | Total (direct+indirect) value added coefficients by activity matrix | Factor of production* | Region, Activity | |
| mc_ex | Coefficients | IOT | Total (direct+indirect) value added coefficients by commodity matrix, exploded by origin region and activity | Factor of production, Region, Activity | Region, Commodity | |
| ma_ex | Coefficients | IOT | Total (direct+indirect) value added coefficients by activity matrix, exploded by origin region and activity | Factor of production, Region, Activity | Region, Activity | |
| Fc | Flows | SUT | Total (direct+indirect) environmental transaction flows by commodity matrix | Satellite account* | Region, Commodity | |
| Fa | Flows | SUT | Total (direct+indirect) environmental transaction flows by actvity matrix | Satellite account* | Region, Activity | |
| fc | Coefficients | SUT | Total (direct+indirect) environmental coefficients by commodity matrix | Satellite account* | Region, Commodity | |
| fa | Coefficients | SUT | Total (direct+indirect) environmental coefficients by activity matrix | Satellite account* | Region, Activity | |
| fc_ex | Coefficients | IOT | Total (direct+indirect) environmental coefficients by commodity matrix, exploded by origin region and activity | Satellite account, Region, Activity | Region, Commodity | |
| fa_ex | Coefficients | IOT | Total (direct+indirect) environmental coefficients by activity matrix, exploded by origin region and activity | Satellite account, Region, Activity | Region, Activity | |
| pc | Coefficients | SUT | Price index vector by commodity | Region, Commodity | - | |
| pa | Coefficients | SUT | Price index vector by activity | Region, Activity | - | |
| pc_ex | Coefficients | IOT | Price indices by commodity, exploded by origin region and activity | Factor of production, Region, Activity | Region, Commodity | |
| pa_ex | Coefficients | IOT | Price indices by activity, exploded by origin region and activity | Factor of production, Region, Activity | Region, Activity | |
| g | Coefficients | IOT | G | Ghosh coefficients matrix | Region, Sector | Region, Sector |
| b | Coefficients | IOT | B | Intersectoral transaction direct-output coefficients matrix | Region, Sector | Region, Sector |
Detailed block reference#
These pages describe database access to the native SUT blocks and link to
the corresponding standalone calc_* functions.