A helper function for extending to the useful energy/exergy stage
extend_to_useful_helper.RdThe helper function is needed, because moving from final to useful energy
occurs for both the final demand matrix (Y) and the energy industry own use matrix (U_eiou).
The calculations are identical, so we factor the calculations into this function.
Usage
extend_to_useful_helper(
.sutdata = NULL,
dest_mat,
C_mat,
eta_fu_vec,
product_type = IEATools::row_col_types$product,
industry_type = IEATools::row_col_types$industry,
arr_note = RCLabels::arrow_notation,
from_note = RCLabels::from_notation,
add_to_U = "add_to_U",
add_to_V = "add_to_V",
add_to_dest = "add_to_dest",
details_fu = "details_fu"
)Arguments
- .sutdata
a data frame containing
dest_mat,C_mat, andeta_fu_veccolumns for calculations. Default isNULL.- dest_mat
a
YorU_eioumatrix (Product x Industry) that is a destination for final energy in an energy conversion chain or the string name of such matrices in.sutadata.- C_mat
an allocation matrix (either
YorU_eiou, both Product x Industry), indicating the distribution of final energy carriers (Products) to final-to-useful energy conversion machines (Industries).C_matshould have been created byform_C_mats(). This argument could also be the string name of such matrices in.sutdata.- eta_fu_vec
an efficiency column vector indicating the efficiency (column) of final-to-useful energy conversion machines (rows).
eta_fu_vecshould have been created byform_eta_fu_phi_u_vecs(). This argument could also be the string name of such matrices in.sutdata.- product_type
a string identifying product row or column types. Default is "
IEATools::row_col_types$product".- industry_type
a string identifying industry row or column types. Default is "
IEATools::row_col_types$industry".- arr_note
a row and column name notation vector that indicates a
source -> destinationrelationship.arr_noteis used for theeta_fumatrix, among others. Seematsbyname::notation_vec(). Default isRCLabels::arrow_notation.- from_note
a row and column name notation vector that indicates a
destination [from source]relationship.from_noteis used for the columns of some intermediate matrices. Seematsbyname::notation_vec(). Default isRCLabels::from_notation.- add_to_U
a string name for the matrix to be added to a use matrix. Default is "add_to_U".
- add_to_V
a string name for the matrix to be added to a make matrix. Default is "add_to_V".
- add_to_dest
a string name for the matrix to replace some entries previous destination matrix. Default is "repl_dest".
- details_fu
A string name for the matrix containing detailed information about the final-to-useful extension, namely, final energy product, destination sector, final-to-useful machine, and useful energy product.
Value
a named list containing four items:
add_to_U_f (a matrix to be added to a use (U) matrix),
add_to_V_f (a matrix to be added to a make (V) matrix),
add_to_dest_mat (a matrix to replace the destination matrix, typically Y_f or U_eiou), and
details_fu (a matrix that retails all details for
final energy product,
destination sector,
final-to-useful machine, and
useful energy product).