fluxopt.leontief
¶
Cross-effect propagation: the Leontief inverse of contribution_from.
An effect that contributes to another — CO2 priced into cost — makes the
effect system a linear one, and (I - C)^-1 is what solves it. Two
consumers need it and neither is the other's: the binder folds it into the
coefficients it hands the solver (so the model never multiplies it at build
time), and the post-solve breakdown applies it to attribute the full
priced-in cost to each contributor.
It lives here because it is neither's. Before, the binder imported it from the reader, which had the dependency backwards.
Functions:
| Name | Description |
|---|---|
leontief |
Compute Leontief inverse (I - C)^-1 from cross-effect coefficients. |
apply_leontief |
Apply Leontief inverse to an array with an |
leontief
¶
Compute Leontief inverse (I - C)^-1 from cross-effect coefficients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
DataArray
|
Cross-effect coefficients with dims |
required |
Source code in src/fluxopt/leontief.py
apply_leontief
¶
Apply Leontief inverse to an array with an effect dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
DataArray
|
Leontief inverse |
required |
|
DataArray
|
Array whose |
required |