OPEN PROM

0.1

created with goxygen 1.4.5

RestOfEnergy module (03_RestOfEnergy)

Description

This is the RestOfEnergy module.

Interfaces

Interfaces to other modules

Input

module inputs (A: legacy)
  Description Unit A
VmConsFuel
(allCy, DSBS, EF, YTIME)
Consumption of fuels in each demand subsector, excluding heat from heatpumps \(Mtoe\) x
VmConsFuelCDRProd
(allCy, EF, YTIME)
Annual fuel demand in DAC regionally \(Mtoe\) x
VmConsFuelElecProd
(allCy, EFS, YTIME)
x
VmConsFuelH2Prod
(allCy, EF, YTIME)
Total fuel consumption for hydrogen production in Mtoe x
VmConsFuelSteProd
(allCy, STEMODE, EFS, YTIME)
x
VmDemFinEneTranspPerFuel
(allCy, TRANSE, EF, YTIME)
Final energy demand in transport subsectors per fuel \(Mtoe\) x
VmDemSecH2
(allCy, SBS, YTIME)
Demand for H2 by sector in mtoe x
VmDemTotH2
(allCy, YTIME)
Hydrogen production requirement in Mtoe for meeting final demand x
VmDemTotSte
(allCy, YTIME)
x
VmProdElec
(allCy, PGALL, YTIME)
Electricity production \(TWh\) x
VmProdSte
(allCy, TSTEAM, YTIME)
x

Output

module outputs
  Description Unit
VmConsFiEneSec
(allCy, SSBS, EFS, YTIME)
Final consumption in energy sector \(Mtoe\)
VmConsFinEneCountry
(allCy, EF, YTIME)
Total final energy consumnption \(Mtoe\)
VmConsFinNonEne
(allCy, EFS, YTIME)
Final non energy consumption \(Mtoe\)
VmImpNetEneBrnch
(allCy, EFS, YTIME)
Net Imports \(Mtoe\)
VmLossesDistr
(allCy, EFS, YTIME)
Distribution losses \(Mtoe\)

Realizations

(A) legacy

This is the legacy realization of the RestOfEnergy module.

sets
SECtoEFPROD(SSBS,EFS)      "Energy forms produced by each supply sector"
/
SLD.(HCL,LGN,BMSWAS)
LQD.(CRO,GSL,BGSL,GDO,BGDO,RFO,LPG,KRS,BKRS,OLQ,MET,ETH)
GAS.(NGS,OGS)
PG.(ELC,NUC)
H2P.H2F
STEAMP.STE
/
;
Equations

*** REST OF ENERGY BALANCE SECTORS EQUATIONS

Q03OutTransfCHP(allCy,TOCTEF,YTIME)                            "Compute the transformation output from CHP (Mtoe)"
Q03OutTransfRefSpec(allCy,EFS,YTIME)                       "Compute the transformation output from refineries"
Q03OutTransfGasses(allCy,EFS,YTIME) 
Q03OutTransfSolids(allCy,EFS,YTIME)
Q03InputTransfRef(allCy,EFS,YTIME)                         "Compute the transformation input to liquids"
Q03InputTransfSolids(allCy,EFS,YTIME)                        "Compute the transformation input to solids"
Q03InputTransfGasses(allCy,EFS,YTIME)                        "Compute the transformation input to gasses"
Q03InpTotTransf(allCy,SSBS,EFS,YTIME)                          "Compute total transformation input"
Q03OutTotTransf(allCy,SSBS,EFS,YTIME)                          "Compute total transformation output"
Q03Transfers(allCy,EFS,YTIME)                              "Compute transfers"
Q03ConsGrssInlNotEneBranch(allCy,EFS,YTIME)                "Compute gross inland consumption not including consumption of energy branch"
Q03ConsGrssInl(allCy,EFS,YTIME)                            "Compute gross inland consumption"
Q03ProdPrimary(allCy,EFS,YTIME)                            "Compute primary production"
Q03Exp(allCy,EFS,YTIME)                                    "Compute fake exports"
Q03Imp(allCy,EFS,YTIME)                                    "Compute fake imports"

Interdependent Equations

Q03ImpNetEneBrnch(allCy,EFS,YTIME)                         "Compute net imports"
Q03ConsFiEneSec(allCy,SSBS,EFS,YTIME)                          "Compute energy branch final consumption"
Q03ConsFinEneCountry(allCy,EFS,YTIME)                      "Compute total final energy consumption"
Q03ConsFinNonEne(allCy,EFS,YTIME)                          "Compute final non-energy consumption"
Q03LossesDistr(allCy,EFS,YTIME)                            "Compute distribution losses"
;
Variables

*** REST OF ENERGY BALANCE SECTORS VARIABLES

V03OutTransfCHP(allCy,TOCTEF,YTIME)                            "Transformation output from CHP (Mtoe)"
V03OutTransfRefSpec(allCy,EFS,YTIME)                       "Transformation output from refineries (Mtoe)"
V03OutTransfGasses(allCy,EFS,YTIME) 
V03OutTransfSolids(allCy,EFS,YTIME)
V03InputTransfRef(allCy,EFS,YTIME)                         "Transformation input to liquids supply sector (Mtoe)"
V03InputTransfSolids(allCy,EFS,YTIME)                        "Transformation input to solids supply sector (Mtoe)"
V03InputTransfGasses(allCy,EFS,YTIME)                        "Transformation input to gasses supply sector (Mtoe)"
V03InpTotTransf(allCy,SSBS,EFS,YTIME)                          "Total transformation input (Mtoe)"
V03OutTotTransf(allCy,SSBS,EFS,YTIME)                          "Total transformation output (Mtoe)"
V03Transfers(allCy,EFS,YTIME)                              "Transfers (Mtoe)"
V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME)                "Gross Inland Consumption not including consumption of energy branch (Mtoe)"
V03ConsGrssInl(allCy,EFS,YTIME)                            "Gross Inland Consumption (Mtoe)"
V03ProdPrimary(allCy,EFS,YTIME)                            "Primary Production (Mtoe)"
V03Exp(allCy,EFS,YTIME)                                    "Exports fake (Mtoe)"
V03Imp(allCy,EFS,YTIME)                                    "Fake Imports for all fuels except natural gas (Mtoe)"

Interdependent Variables

VmImpNetEneBrnch(allCy,EFS,YTIME)                          "Net Imports (Mtoe)"
VmConsFiEneSec(allCy,SSBS,EFS,YTIME)                            "Final consumption in energy sector (Mtoe)"
VmConsFinEneCountry(allCy,EF,YTIME)                        "Total final energy consumnption (Mtoe)"
VmConsFinNonEne(allCy,EFS,YTIME)                           "Final non energy consumption (Mtoe)"
VmLossesDistr(allCy,EFS,YTIME)                             "Distribution losses (Mtoe)"
;

GENERAL INFORMATION Equation format: “typical useful energy demand equation” The main explanatory variables (drivers) are activity indicators (economic activity) and corresponding energy costs. The type of “demand” is computed based on its past value, the ratio of the current and past activity indicators (with the corresponding elasticity), and the ratio of lagged energy costs (with the corresponding elasticities). This type of equation captures both short term and long term reactions to energy costs. * REST OF ENERGY BALANCE SECTORS The equation computes the total final energy consumption in million tonnes of oil equivalent for each country , energy form sector, and time period. The total final energy consumption is calculated as the sum of final energy consumption in the Industry and Tertiary sectors and the sum of final energy demand in all transport subsectors. The consumption is determined by the relevant link between model subsectors and fuels.

Q03ConsFinEneCountry(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    VmConsFinEneCountry(allCy,EFS,YTIME)
        =E=
    sum(INDDOM,
      sum(EF$(EFtoEFS(EF,EFS) $SECtoEF(INDDOM,EF) ), VmConsFuel(allCy,INDDOM,EF,YTIME))
    ) +
    sum(TRANSE,
      sum(EF$(EFtoEFS(EF,EFS) $SECtoEF(TRANSE,EF)),
        VmDemFinEneTranspPerFuel(allCy,TRANSE,EF,YTIME)
      )
    ) +
    VmConsFuelCDRProd(allCy,EFS,YTIME);

The equation computes the total final energy consumption in million tonnes of oil equivalent for all countries at a specific time period. This is achieved by summing the final energy consumption for each energy form sector across all countries.

$ontext
q03ConsTotFinEne(YTIME)$(TIME(YTIME))..
         v03ConsTotFinEne(YTIME) =E= sum((allCy,EFS), VmConsFinEneCountry(allCy,EFS,YTIME) );     
$offtext

The equation computes the final non-energy consumption in million tonnes of oil equivalent for a given energy form sector. The calculation involves summing the consumption of fuels in each non-energy and bunkers demand subsector based on the corresponding fuel aggregation for the supply side. This process is performed for each time period.

Q03ConsFinNonEne(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    VmConsFinNonEne(allCy,EFS,YTIME)
        =E=
    sum(NENSE$(not sameas("BU",NENSE) and SECtoEF(NENSE,EFS)),
      VmConsFuel(allCy,NENSE,EFS,YTIME)
    );  

The equation computes the distribution losses in million tonnes of oil equivalent for a given energy form sector. The losses are determined by the rate of losses over available for final consumption multiplied by the sum of total final energy consumption and final non-energy consumption. This calculation is performed for each time period. Please note that distribution losses are not considered for the hydrogen sector.

Q03LossesDistr(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    VmLossesDistr(allCy,EFS,YTIME)
        =E=
    (
      imRateLossesFinCons(allCy,EFS,YTIME) * 
      (
        VmConsFinEneCountry(allCy,EFS,YTIME) + 
        VmConsFinNonEne(allCy,EFS,YTIME) +
        V03ProdPrimary(allCy,EFS,YTIME)$sameas(EFS,"CRO")
      )
    )$(not H2EF(EFS)) +
    !! FIXME: Do we need to add LQD,GAS,SLD here too?
    (
      VmDemTotH2(allCy,YTIME) -
      sum(SBS$SECtoEF(SBS,"H2F"), VmDemSecH2(allCy,SBS,YTIME))
    )$H2EF(EFS)
;  
Q03OutTransfCHP(allCy,TOCTEF,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03OutTransfCHP(allCy,TOCTEF,YTIME)
        =E=
    sum(TSTEAM$TCHP(TSTEAM),
      VmProdSte(allCy,TSTEAM,YTIME)
    )$sameas("STE",TOCTEF) +
    (V04ProdElecEstCHP(allCy,YTIME) * smTWhToMtoe)$sameas("ELC",TOCTEF);
$ontext

The equation calculates the refineries’ capacity for a given scenario and year. The calculation is based on a residual factor, the previous year’s capacity, and a production scaling factor that takes into account the historical consumption trends for different energy forms. The scaling factor is influenced by the base year and the production scaling parameter. The result represents the refineries’ capacity in million barrels per day (Million Barrels/day).

Q03CapRef(allCy,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03CapRef(allCy,YTIME)
        =E=
    [
      i03ResRefCapacity(allCy,YTIME) * V03CapRef(allCy,YTIME-1) *
      (1$(ord(YTIME) le 10) +
      (prod(rc,
      (sum(EFS$EFtoEFA(EFS,"LQD"),VmConsFinEneCountry(allCy,EFS,YTIME-(ord(rc)+1)))/sum(EFS$EFtoEFA(EFS,"LQD"),VmConsFinEneCountry(allCy,EFS,YTIME-(ord(rc)+2))))**(0.5/(ord(rc)+1)))
      )
      $(ord(YTIME) gt 10)
      )     
    ]$i03RefCapacity(allCy,"%fStartHorizon%")+0;
$offtext

The equation calculates the transformation output from refineries for a specific energy form in a given scenario and year. The output is computed based on a residual factor, the previous year’s output, and the change in refineries’ capacity. The calculation includes considerations for the base year and adjusts the result accordingly. The result represents the transformation output from refineries for the specified energy form in million tons of oil equivalent.

Q03OutTransfRefSpec(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEFPROD("LQD",EFS))..
    V03OutTransfRefSpec(allCy,EFS,YTIME)
        =E=
    i03ResTransfOutputRefineries(allCy,EFS,YTIME) * 
    V03OutTransfRefSpec(allCy,EFS,YTIME-1) *
    (
      SUM(EFS2$SECtoEFPROD("LQD",EFS2),VmConsFinEneCountry(allCy,EFS2,YTIME)) /
      (SUM(EFS2$SECtoEFPROD("LQD",EFS2),VmConsFinEneCountry(allCy,EFS2,YTIME-1)) + 1e-6)
    ) ** (0.98); 
Q03OutTransfSolids(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEFPROD("SLD",EFS))..
    V03OutTransfSolids(allCy,EFS,YTIME)
        =E=
    V03OutTransfSolids(allCy,EFS,YTIME-1) *
    (
      VmConsFinEneCountry(allCy,EFS,YTIME) /
      (VmConsFinEneCountry(allCy,EFS,YTIME-1) + 1e-6)
    ) ** (0.98);
Q03OutTransfGasses(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEFPROD("GAS",EFS))..
    V03OutTransfGasses(allCy,EFS,YTIME)
        =E=
    V03OutTransfGasses(allCy,EFS,YTIME-1) *
    (
      VmConsFinEneCountry(allCy,EFS,YTIME) /
      (VmConsFinEneCountry(allCy,EFS,YTIME-1) + 1e-6)
    ) ** (0.98);

The equation calculates the transformation input to refineries for the energy form Crude Oil in a specific scenario and year. The input is computed based on the previous year’s input to refineries, multiplied by the ratio of the transformation output from refineries for the given energy form and year to the output in the previous year. This calculation is conditional on the refineries’ capacity being active in the specified starting horizon.The result represents the transformation input to refineries for crude oil in million tons of oil equivalent.

Q03InputTransfRef(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEF("LQD",EFS))..
    V03InputTransfRef(allCy,EFS,YTIME)
        =E=
    V03InputTransfRef(allCy,EFS,YTIME-1) *
    sum(EFS2$SECtoEFPROD("LQD",EFS2), V03OutTransfRefSpec(allCy,EFS2,YTIME)) /
    (sum(EFS2$SECtoEFPROD("LQD",EFS2), V03OutTransfRefSpec(allCy,EFS2,YTIME-1)) + 1e-6);                   
Q03InputTransfSolids(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEF("SLD",EFS))..
    V03InputTransfSolids(allCy,EFS,YTIME)
        =E=
    V03InputTransfSolids(allCy,EFS,YTIME-1) *
    sum(EFS2$SECtoEFPROD("SLD",EFS2), V03OutTransfSolids(allCy,EFS2,YTIME)) /
    (sum(EFS2$SECtoEFPROD("SLD",EFS2), V03OutTransfSolids(allCy,EFS2,YTIME-1)) + 1e-6); 
Q03InputTransfGasses(allCy,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEF("GAS",EFS))..
    V03InputTransfGasses(allCy,EFS,YTIME)
        =E=
    V03InputTransfGasses(allCy,EFS,YTIME-1) *
    sum(EFS2$SECtoEFPROD("GAS",EFS2), V03OutTransfGasses(allCy,EFS2,YTIME)) /
    (sum(EFS2$SECtoEFPROD("GAS",EFS2), V03OutTransfGasses(allCy,EFS2,YTIME-1)) + 1e-6); 
            

The equation calculates the total transformation input for a specific energy branch in a given scenario and year. The result is obtained by summing the transformation inputs from different sources, including thermal power plants, District Heating Plants, nuclear plants, patent fuel and briquetting plants, and refineries. In the case where the energy branch is “OGS” (Other Gas), the total transformation input is calculated as the difference between the total transformation output and various consumption and loss components. The outcome represents the total transformation input in million tons of oil equivalent.

Q03InpTotTransf(allCy,SSBS,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy))$SECtoEF(SSBS,EFS))..
    V03InpTotTransf(allCy,SSBS,EFS,YTIME)
        =E=
    VmConsFuelElecProd(allCy,EFS,YTIME)$sameas("PG",SSBS) + 
    VmConsFuelSteProd(allCy,"CHP",EFS,YTIME)$sameas("CHP",SSBS) +
    VmConsFuelSteProd(allCy,"DHP",EFS,YTIME)$sameas("STEAMP",SSBS) +
    V03InputTransfRef(allCy,EFS,YTIME)$sameas("LQD",SSBS) + 
    V03InputTransfSolids(allCy,EFS,YTIME)$sameas("SLD",SSBS) +
    V03InputTransfGasses(allCy,EFS,YTIME)$sameas("GAS",SSBS);            

The equation calculates the total transformation output for a specific energy branch in a given scenario and year. The result is obtained by summing the transformation outputs from different sources, including thermal power stations, District Heating Plants, nuclear plants, patent fuel and briquetting plants, coke-oven plants, blast furnace plants, and gas works as well as refineries. The outcome represents the total transformation output in million tons of oil equivalent.

Q03OutTotTransf(allCy,SSBS,EFS,YTIME)$(TIME(YTIME)$runCy(allCy)$SECtoEFPROD(SSBS,EFS))..
    V03OutTotTransf(allCy,SSBS,EFS,YTIME)
        =E=
    smTWhToMtoe * 
    (
      sum(PGALL,VmProdElec(allCy,PGALL,YTIME))$sameas("PG",SSBS) +
      V04ProdElecEstCHP(allCy,YTIME)$sameas("CHP",SSBS)
    )$ELCEF(EFS) +
    VmDemTotSte(allCy,YTIME)$(sameas("STEAMP",SSBS) and STEAM(EFS)) +
    !!FIXME: Add all liquids
    V03OutTransfRefSpec(allCy,EFS,YTIME)$sameas("LQD",SSBS) +  
    V03OutTransfSolids(allCy,EFS,YTIME)$sameas("SLD",SSBS) +
    V03OutTransfGasses(allCy,EFS,YTIME)$sameas("GAS",SSBS) +  
    VmDemTotH2(allCy,YTIME)$(sameas(EFS, "H2F") and sameas("H2P",SSBS));

The equation calculates the transfers of a specific energy branch in a given scenario and year. The result is computed based on a complex formula that involves the previous year’s transfers, the residual for feedstocks in transfers, and various conditions. In particular, the equation includes terms related to feedstock transfers, residual feedstock transfers, and specific conditions for the energy branch “CRO” (crop residues). The outcome represents the transfers in million tons of oil equivalent.

Q03Transfers(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03Transfers(allCy,EFS,YTIME) 
        =E=
    ( 
      (
        V03Transfers(allCy,EFS,YTIME-1) *
        (
          VmConsFinEneCountry(allCy,EFS,YTIME) /
          (VmConsFinEneCountry(allCy,EFS,YTIME-1) + 1e-6)
        ) ** 0.3
      )$(not sameas(EFS,"CRO")) +
      (
        V03Transfers(allCy,"CRO",YTIME-1) *
        SUM(EFS2$EFTOEFA(EFS2,"LQD"),V03Transfers(allCy,EFS2,YTIME)) /
        SUM(EFS2$EFTOEFA(EFS2,"LQD"),V03Transfers(allCy,EFS2,YTIME-1))
      )$sameas(EFS,"CRO")   
    )$i03FeedTransfr(allCy,EFS,"%fStartHorizon%");         

The equation calculates the gross inland consumption excluding the consumption of a specific energy branch in a given scenario and year. The result is computed by summing various components, including total final energy consumption, final non-energy consumption, total transformation input and output, distribution losses, and transfers. The outcome represents the gross inland consumption excluding the consumption of the specified energy branch in million tons of oil equivalent.

Q03ConsGrssInlNotEneBranch(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME)
        =E=
    VmConsFinEneCountry(allCy,EFS,YTIME) + 
    VmConsFinNonEne(allCy,EFS,YTIME) + 
    SUM(SSBS,V03InpTotTransf(allCy,SSBS,EFS,YTIME)) - 
    SUM(SSBS,V03OutTotTransf(allCy,SSBS,EFS,YTIME)) + 
    VmLossesDistr(allCy,EFS,YTIME) - 
    V03Transfers(allCy,EFS,YTIME)
; 

The equation calculates the gross inland consumption. This quantity is equal to the total energy supply for each country.

Q03ConsGrssInl(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03ConsGrssInl(allCy,EFS,YTIME)
        =E=
    VmConsFinEneCountry(allCy,EFS,YTIME) + 
    VmConsFinNonEne(allCy,EFS,YTIME) + 
    SUM(SSBS,
      VmConsFiEneSec(allCy,SSBS,EFS,YTIME) +
      V03InpTotTransf(allCy,SSBS,EFS,YTIME) -
      V03OutTotTransf(allCy,SSBS,EFS,YTIME)
    ) + 
    VmLossesDistr(allCy,EFS,YTIME) - 
    V03Transfers(allCy,EFS,YTIME)
;  

The equation calculates the primary production for a specific primary production definition in a given scenario and year. The computation involves different scenarios based on the type of primary production definition: For primary production definitions the primary production is directly proportional to the rate of primary production in total primary needs, and it depends on gross inland consumption not including the consumption of the energy branch. For Natural Gas primary production, the calculation considers a specific formula involving the rate of primary production in total primary needs, residuals for hard coal, natural gas, and oil primary production, the elasticity related to gross inland consumption for natural gas, and other factors. Additionally, there is a lag effect with coefficients for primary oil production. For Crude Oil primary production, the computation includes the rate of primary production in total primary needs, residuals for hard coal, natural gas, and oil primary production, the fuel primary production, and a product term involving the polynomial distribution lag coefficients for primary oil production. The result represents the primary production in million tons of oil equivalent.

Q03ProdPrimary(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    V03ProdPrimary(allCy,EFS,YTIME)
        =E=  
    [
      (
        !!i03RatePriProTotPriNeeds(allCy,EFS,YTIME) *
        V03ProdPrimary(allCy,EFS,YTIME-1) *
        (V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME) + 1e-6) /
        (V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME-1) + 1e-6)
      )$(not (sameas(EFS,"CRO") or sameas(EFS,"NGS"))) +
      (
        i03ResHcNgOilPrProd(allCy,EFS,YTIME) * 
        V03ProdPrimary(allCy,EFS,YTIME-1) *
        (
          (V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME) + 1e-6) /
          (V03ConsGrssInlNotEneBranch(allCy,EFS,YTIME-1) + 1e-6)
        ) !!** i03NatGasPriProElst(allCy)
      )$(sameas(EFS,"NGS")) +
      (
        i03ResHcNgOilPrProd(allCy,EFS,YTIME) * 
        V03ProdPrimary(allCy,EFS,YTIME-1) *
        prod(kpdl$(ord(kpdl) lt 5),
          (
            imPriceFuelsInt("WCRO",YTIME-(ord(kpdl)+1)) /
            imPriceFuelsIntBase("WCRO",YTIME-(ord(kpdl)+1))
          ) ** (0.2 * i03PolDstrbtnLagCoeffPriOilPr(kpdl))
        )
      )$sameas(EFS,"CRO")   
    ];   

The equation calculates the fake exports for a specific energy branch in a given scenario and year. The computation is based on the fuel exports for the corresponding energy branch. The result represents the fake exports in million tons of oil equivalent.

Q03Exp(allCy,EFS,YTIME)$(TIME(YTIME) $IMPEF(EFS) $runCy(allCy))..
    V03Exp(allCy,EFS,YTIME)
        =E=
    imFuelExprts(allCy,EFS,YTIME)
;

The equation computes the fake imports for a specific energy branch in a given scenario and year. The calculation is based on different conditions for various energy branches, such as electricity, crude oil, and natural gas. The equation involves gross inland consumption, fake exports, consumption of fuels in demand subsectors, electricity imports, and other factors. The result represents the fake imports in million tons of oil equivalent for all fuels except natural gas.

Q03Imp(allCy,EFS,YTIME)$(TIME(YTIME) $IMPEF(EFS) $runCy(allCy))..
    V03Imp(allCy,EFS,YTIME)
        =E=
    (
      i03RatioImpFinElecDem(allCy,YTIME) * 
      (VmConsFinEneCountry(allCy,EFS,YTIME) + VmConsFinNonEne(allCy,EFS,YTIME)) +
      V03Exp(allCy,EFS,YTIME) !! + i03ElecImp(allCy,YTIME)
    )$ELCEF(EFS) +
    (
      V03ConsGrssInl(allCy,EFS,YTIME) + 
      V03Exp(allCy,EFS,YTIME) +
      VmConsFuel(allCy,"BU",EFS,YTIME)$SECtoEF("BU",EFS) -
      V03ProdPrimary(allCy,EFS,YTIME)
    )$(sameas(EFS,"CRO")) +
    (
      V03ConsGrssInl(allCy,EFS,YTIME) + 
      V03Exp(allCy,EFS,YTIME) + 
      VmConsFuel(allCy,"BU",EFS,YTIME)$SECtoEF("BU",EFS) -
      V03ProdPrimary(allCy,EFS,YTIME)
    )$(sameas(EFS,"NGS")) +
    (
      (1-i03RatePriProTotPriNeeds(allCy,EFS,YTIME)) *
      (
        V03ConsGrssInl(allCy,EFS,YTIME) +
        V03Exp(allCy,EFS,YTIME) +
        VmConsFuel(allCy,"BU",EFS,YTIME)$SECtoEF("BU",EFS)
      )
    )$(not (ELCEF(EFS) or sameas(EFS,"NGS") or sameas(EFS,"CRO")));

The equation computes the net imports for a specific energy branch in a given scenario and year. It subtracts the fake exports from the fake imports for all fuels except natural gas . The result represents the net imports in million tons of oil equivalent.

Q03ImpNetEneBrnch(allCy,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy)))..
    VmImpNetEneBrnch(allCy,EFS,YTIME)
        =E=
    V03Imp(allCy,EFS,YTIME) - 
    V03Exp(allCy,EFS,YTIME);
                               

The equation calculates the final energy own consumption in the energy sector. It considers the rate of energy branch consumption over the total transformation output. The final consumption is determined based on the total transformation output and primary production for energy branches, excluding Oil, Coal, and Gas. The result, VmConsFiEneSec, represents the final consumption in million tons of oil equivalent for the specified scenario and year.

Q03ConsFiEneSec(allCy,SSBS,EFS,YTIME)$(TIME(YTIME)$(runCy(allCy))$SECtoEF(SSBS,EFS))..
    VmConsFiEneSec(allCy,SSBS,EFS,YTIME)
        =E=
    i03RateEneBranCons(allCy,SSBS,EFS,YTIME) *
    SUM(EFS2$SECtoEFPROD(SSBS,EFS2), 
      V03OutTotTransf(allCy,SSBS,EFS2,YTIME) +
      V03ProdPrimary(allCy,EFS2,YTIME)$(not PGRENEF(EFS2))
    ) +
    VmConsFuelH2Prod(allCy,EFS,YTIME)$sameas("H2P",SSBS);                               
table i03DataGrossInlCons(allCy,EF,YTIME)         "Data for Gross Inland Conusmption (Mtoe)"
$ondelim
$include"./iDataGrossInlCons.csv"
$offdelim
;
table i03DataOwnConsEne(allCy,SSBS,EFS,YTIME)         "Data for Consumption of Energy Branch (Mtoe)"
$ondelim
$include"./iDataOwnConsEne.csv"
$offdelim
;
table i03SuppTransfers(allCy,EFS,YTIME)           "Supplementary Parameter for Transfers (Mtoe)"
$ondelim
$include"./iSuppTransfers.csv"
$offdelim
;
table i03PrimProd(allCy,EFS,YTIME)                "Primary Production (Mtoe)"
$ondelim
$include"./iPrimProd.csv"
$offdelim
;
table i03SuppRatePrimProd(allCy,EF,YTIME)         "Supplementary Parameter for iRatePrimProd (1)"   
$ondelim
$include"./iSuppRatePrimProd.csv"
$offdelim
;
table i03ElcNetImpShare(allCy,SUPOTH,YTIME)       "Ratio of electricity imports in total final demand (1)"
$ondelim
$include "./iElcNetImpShare.csv"
$offdelim
;
table i03OutTotTransfProcess(allCy,SSBS,EFS,YTIME)        "Total transformation output of supply sectors (Mtoe)"    
$ondelim
$include"./iOutTransfProcess.csv"
$offdelim
;
table i03InpTotTransfProcess(allCy,SSBS,EFS,YTIME)        "Total transformation input of supply sectors (Mtoe)" 
$ondelim
$include"./iInpTransfProcess.csv"
$offdelim
;
table i03RateEneBranCons(allCy,SSBS,EFS,YTIME)        "Rate of Energy Branch Consumption over total transformation output (1)"
$ondelim
$include"./iRatioBranchOwnCons.csv"
$offdelim
;
parameter i03NatGasPriProElst(allCy)              "Natural Gas primary production elasticity related to gross inland consumption (1)" /
$ondelim
$include "./iNatGasPriProElst.csv"
$offdelim
/;
parameter i03PolDstrbtnLagCoeffPriOilPr(kpdl)     "Polynomial Distribution Lag Coefficients for primary oil production (1)"
/
a1 1.666706504,
a2 1.333269594,
a3 1.000071707,
a4 0.666634797,
a5 0.33343691
/;
Parameters
i03SupTrnasfOutputRefineries(allCy,EF,YTIME)      "Supplementary parameter for the transformation output from refineries (Mtoe)"
i03SupResRefCapacity(allCy,SUPOTH,YTIME)          "Supplementary Parameter for the residual in refineries Capacity (1)"
i03TotEneBranchCons(allCy,EF,YTIME)               "Total Energy Branch Consumption (Mtoe)"
i03FeedTransfr(allCy,EFS,YTIME)                   "Feedstocks in Transfers (Mtoe)"
i03ResTransfOutputRefineries(allCy,EF,YTIME)      "Residual in Transformation Output from Refineries (Mtoe)"
i03RatePriProTotPriNeeds(allCy,EF,YTIME)          "Rate of Primary Production in Total Primary Needs (1)"   
i03ResHcNgOilPrProd(allCy,EF,YTIME)               "Residuals for Hard Coal, Natural Gas and Oil Primary Production (1)"
i03RatioImpFinElecDem(allCy,YTIME)                "Ratio of imports in final electricity demand (1)"    
;
i03SupResRefCapacity(runCy,SUPOTH,YTIME) = 1;
i03SupTrnasfOutputRefineries(runCy,EF,YTIME) = 1;
i03DataOwnConsEne(runCy,SSBS,EFS,YTIME)$(i03DataOwnConsEne(runCy,SSBS,EFS,YTIME) < 1e-4) = 0;
i03TotEneBranchCons(runCy,EFS,YTIME) = SUM(SSBS,i03DataOwnConsEne(runCy,SSBS,EFS,YTIME));
i03FeedTransfr(runCy,EFS,YTIME) = i03SuppTransfers(runCy,EFS,YTIME);
i03ResTransfOutputRefineries(runCy,EFS,YTIME) = i03SupTrnasfOutputRefineries(runCy,EFS,YTIME);
i03RateEneBranCons(runCy,SSBS,EFS,YTIME)$AN(YTIME) = i03RateEneBranCons(runCy,SSBS,EFS,"%fBaseY%");
i03RatePriProTotPriNeeds(runCy,EFS,YTIME) = i03SuppRatePrimProd(runCy,EFS,"%fBaseY%");
i03ResHcNgOilPrProd(runCy,"HCL",YTIME)$an(YTIME)   = i03SupResRefCapacity(runCy,"HCL_PPROD",YTIME);
i03ResHcNgOilPrProd(runCy,"NGS",YTIME)$an(YTIME)   = i03SupResRefCapacity(runCy,"NGS_PPROD",YTIME);
i03ResHcNgOilPrProd(runCy,"CRO",YTIME)$an(YTIME)   = i03SupResRefCapacity(runCy,"OIL_PPROD",YTIME);
i03RatioImpFinElecDem(runCy,YTIME)$an(YTIME) = i03ElcNetImpShare(runCy,"ELC_IMP",YTIME);
imRateLossesFinCons(runCy,EFS,YTIME) = 
[
  imDistrLosses(runCy,EFS,YTIME) /
  (sum(DSBS, imFuelConsPerFueSub(runCy,DSBS,EFS,YTIME)) + i03PrimProd(runCy,"CRO",YTIME)$sameas("CRO",EFS))
]$(sum(DSBS, imFuelConsPerFueSub(runCy,DSBS,EFS,YTIME)) + i03PrimProd(runCy,"CRO",YTIME)$sameas("CRO",EFS));
imRateLossesFinCons(runCy,EFS,YTIME)$AN(YTIME) = imRateLossesFinCons(runCy,EFS,"%fBaseY%");

VARIABLE INITIALISATION

V03OutTransfRefSpec.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEFPROD("LQD",EFS)) = i03OutTotTransfProcess(runCy,"LQD",EFS,YTIME);
V03OutTransfRefSpec.FX(runCy,EFS,YTIME)$(not SECtoEFPROD("LQD",EFS)) = 0;
V03OutTransfSolids.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEFPROD("SLD",EFS)) = i03OutTotTransfProcess(runCy,"SLD",EFS,YTIME);
V03OutTransfSolids.FX(runCy,EFS,YTIME)$(not SECtoEFPROD("SLD",EFS)) = 0;
V03OutTransfGasses.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEFPROD("GAS",EFS)) = i03OutTotTransfProcess(runCy,"GAS",EFS,YTIME);
V03OutTransfGasses.FX(runCy,EFS,YTIME)$(not SECtoEFPROD("GAS",EFS)) = 0;
V03ConsGrssInlNotEneBranch.L(runCy,EFS,YTIME) = i03DataGrossInlCons(runCy,EFS,"%fBaseY%") - i03TotEneBranchCons(runCy,EFS,"%fBaseY%");
V03ConsGrssInlNotEneBranch.FX(runCy,EFS,YTIME)$DATAY(YTIME) = i03DataGrossInlCons(runCy,EFS,YTIME) - i03TotEneBranchCons(runCy,EFS,YTIME);
V03InputTransfRef.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEF("LQD",EFS)) = -i03InpTotTransfProcess(runCy,"LQD",EFS,YTIME);
V03InputTransfRef.FX(runCy,EFS,YTIME)$(not SECtoEF("LQD",EFS)) = 0;
V03InputTransfSolids.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEF("SLD",EFS)) = -i03InpTotTransfProcess(runCy,"SLD",EFS,YTIME);
V03InputTransfSolids.FX(runCy,EFS,YTIME)$(not SECtoEF("SLD",EFS)) = 0;
V03InputTransfGasses.FX(runCy,EFS,YTIME)$(DATAY(YTIME) and SECtoEF("GAS",EFS)) = -i03InpTotTransfProcess(runCy,"GAS",EFS,YTIME);
V03InputTransfGasses.FX(runCy,EFS,YTIME)$(not SECtoEF("GAS",EFS)) = 0;
V03ConsGrssInl.L(runCy,EFS,YTIME) = i03DataGrossInlCons(runCy,EFS,"%fBaseY%");
V03ConsGrssInl.FX(runCy,EFS,YTIME)$DATAY(YTIME) = i03DataGrossInlCons(runCy,EFS,YTIME);
V03Transfers.FX(runCy,EFS,YTIME)$(not An(YTIME)) = i03FeedTransfr(runCy,EFS,YTIME);
V03ProdPrimary.L(runCy,EFS,YTIME) = i03PrimProd(runCy,EFS,"%fBaseY%") + 1;
V03ProdPrimary.FX(runCy,EFS,YTIME)$DATAY(YTIME) = i03PrimProd(runCy,EFS,YTIME);
V03Imp.FX(runCy,"NGS",YTIME)$(not An(YTIME)) = imFuelImports(runCy,"NGS",YTIME);
V03Imp.FX(runCy,EFS,YTIME)$(not IMPEF(EFS)) = 0;
V03Exp.FX(runCy,EFS,YTIME)$(not An(YTIME)) = imFuelExprts(runCy,EFS,YTIME);
V03Exp.FX(runCy,"NGS",YTIME)$(not An(YTIME)) = imFuelExprts(runCy,"NGS",YTIME);
V03Exp.FX(runCy,EFS,YTIME)$(not IMPEF(EFS)) = 0;
VmConsFiEneSec.L(runCy,SSBS,EFS,YTIME) = i03DataOwnConsEne(runCy,SSBS,EFS,"%fBaseY%");
VmConsFiEneSec.FX(runCy,SSBS,EFS,YTIME)$(DATAY(YTIME) and SECtoEF(SSBS,EFS)) = i03DataOwnConsEne(runCy,SSBS,EFS,YTIME);
VmConsFiEneSec.FX(runCy,SSBS,EFS,YTIME)$(not SECtoEF(SSBS,EFS)) = 0;
VmLossesDistr.FX(runCy,EFS,YTIME)$DATAY(YTIME) = imDistrLosses(runCy,EFS,YTIME);
V03OutTotTransf.L(runCy,SSBS,EFS,YTIME) = i03OutTotTransfProcess(runCy,SSBS,EFS,"%fBaseY%");
V03OutTotTransf.FX(runCy,SSBS,EFS,YTIME)$(DATAY(YTIME) and SECtoEFPROD(SSBS,EFS)) = i03OutTotTransfProcess(runCy,SSBS,EFS,YTIME);
V03OutTotTransf.FX(runCy,SSBS,EFS,YTIME)$(not SECtoEFPROD(SSBS,EFS)) = 0;
V03InpTotTransf.FX(runCy,SSBS,EFS,YTIME)$(DATAY(YTIME) and SECtoEF(SSBS,EFS)) = -i03InpTotTransfProcess(runCy,SSBS,EFS,YTIME);
V03InpTotTransf.FX(runCy,SSBS,EFS,YTIME)$(not SECtoEF(SSBS,EFS)) = 0;
V03OutTransfCHP.FX(runCy,TOCTEF,YTIME)$DATAY(YTIME) = i03OutTotTransfProcess(runCy,"CHP",TOCTEF,YTIME);
VmConsFinEneCountry.LO(runCy,EFS,YTIME) = 0;
VmConsFinEneCountry.FX(runCy,EFS,YTIME)$DATAY(YTIME) = 
sum(DSBS$(not NENSE(DSBS)), 
  imFuelConsPerFueSub(runCy,DSBS,EFS,YTIME)
);
VmConsFinNonEne.FX(runCy,EFS,YTIME)$DATAY(YTIME) = 
SUM(NENSE$(not sameas("BU",NENSE) and SECtoEF(NENSE,EFS)),
  imFuelConsPerFueSub(runCy,NENSE,EFS,YTIME)
);

Limitations There are no known limitations.

Definitions

Objects

module-internal objects (A: legacy)
  Description Unit A
i03DataGrossInlCons
(allCy, EF, YTIME)
Data for Gross Inland Conusmption \(Mtoe\) x
i03DataOwnConsEne
(allCy, SSBS, EFS, YTIME)
Data for Consumption of Energy Branch \(Mtoe\) x
i03ElcNetImpShare
(allCy, SUPOTH, YTIME)
Ratio of electricity imports in total final demand \(1\) x
i03FeedTransfr
(allCy, EFS, YTIME)
Feedstocks in Transfers \(Mtoe\) x
i03InpTotTransfProcess
(allCy, SSBS, EFS, YTIME)
Total transformation input of supply sectors \(Mtoe\) x
i03NatGasPriProElst
(allCy)
Natural Gas primary production elasticity related to gross inland consumption \(1\) x
i03OutTotTransfProcess
(allCy, SSBS, EFS, YTIME)
Total transformation output of supply sectors \(Mtoe\) x
i03PolDstrbtnLagCoeffPriOilPr
(kpdl)
Polynomial Distribution Lag Coefficients for primary oil production \(1\) x
i03PrimProd
(allCy, EFS, YTIME)
Primary Production \(Mtoe\) x
i03RateEneBranCons
(allCy, SSBS, EFS, YTIME)
Rate of Energy Branch Consumption over total transformation output \(1\) x
i03RatePriProTotPriNeeds
(allCy, EF, YTIME)
Rate of Primary Production in Total Primary Needs \(1\) x
i03RatioImpFinElecDem
(allCy, YTIME)
Ratio of imports in final electricity demand \(1\) x
i03ResHcNgOilPrProd
(allCy, EF, YTIME)
Residuals for Hard Coal, Natural Gas and Oil Primary Production \(1\) x
i03ResTransfOutputRefineries
(allCy, EF, YTIME)
Residual in Transformation Output from Refineries \(Mtoe\) x
i03SuppRatePrimProd
(allCy, EF, YTIME)
Supplementary Parameter for iRatePrimProd \(1\) x
i03SuppTransfers
(allCy, EFS, YTIME)
Supplementary Parameter for Transfers \(Mtoe\) x
i03SupResRefCapacity
(allCy, SUPOTH, YTIME)
Supplementary Parameter for the residual in refineries Capacity \(1\) x
i03SupTrnasfOutputRefineries
(allCy, EF, YTIME)
Supplementary parameter for the transformation output from refineries \(Mtoe\) x
i03TotEneBranchCons
(allCy, EF, YTIME)
Total Energy Branch Consumption \(Mtoe\) x
Q03ConsFiEneSec
(allCy, SSBS, EFS, YTIME)
Compute energy branch final consumption x
Q03ConsFinEneCountry
(allCy, EFS, YTIME)
Compute total final energy consumption x
Q03ConsFinNonEne
(allCy, EFS, YTIME)
Compute final non-energy consumption x
Q03ConsGrssInl
(allCy, EFS, YTIME)
Compute gross inland consumption x
Q03ConsGrssInlNotEneBranch
(allCy, EFS, YTIME)
Compute gross inland consumption not including consumption of energy branch x
Q03Exp
(allCy, EFS, YTIME)
Compute fake exports x
Q03Imp
(allCy, EFS, YTIME)
Compute fake imports x
Q03ImpNetEneBrnch
(allCy, EFS, YTIME)
Compute net imports x
Q03InpTotTransf
(allCy, SSBS, EFS, YTIME)
Compute total transformation input x
Q03InputTransfGasses
(allCy, EFS, YTIME)
Compute the transformation input to gasses x
Q03InputTransfRef
(allCy, EFS, YTIME)
Compute the transformation input to liquids x
Q03InputTransfSolids
(allCy, EFS, YTIME)
Compute the transformation input to solids x
Q03LossesDistr
(allCy, EFS, YTIME)
Compute distribution losses x
Q03OutTotTransf
(allCy, SSBS, EFS, YTIME)
Compute total transformation output x
Q03OutTransfCHP
(allCy, TOCTEF, YTIME)
Compute the transformation output from CHP \(Mtoe\) x
Q03OutTransfGasses
(allCy, EFS, YTIME)
x
Q03OutTransfRefSpec
(allCy, EFS, YTIME)
Compute the transformation output from refineries x
Q03OutTransfSolids
(allCy, EFS, YTIME)
x
Q03ProdPrimary
(allCy, EFS, YTIME)
Compute primary production x
Q03Transfers
(allCy, EFS, YTIME)
Compute transfers x
V03ConsGrssInl
(allCy, EFS, YTIME)
Gross Inland Consumption \(Mtoe\) x
V03ConsGrssInlNotEneBranch
(allCy, EFS, YTIME)
Gross Inland Consumption not including consumption of energy branch \(Mtoe\) x
V03Exp
(allCy, EFS, YTIME)
Exports fake \(Mtoe\) x
V03Imp
(allCy, EFS, YTIME)
Fake Imports for all fuels except natural gas \(Mtoe\) x
V03InpTotTransf
(allCy, SSBS, EFS, YTIME)
Total transformation input \(Mtoe\) x
V03InputTransfGasses
(allCy, EFS, YTIME)
Transformation input to gasses supply sector \(Mtoe\) x
V03InputTransfRef
(allCy, EFS, YTIME)
Transformation input to liquids supply sector \(Mtoe\) x
V03InputTransfSolids
(allCy, EFS, YTIME)
Transformation input to solids supply sector \(Mtoe\) x
V03OutTotTransf
(allCy, SSBS, EFS, YTIME)
Total transformation output \(Mtoe\) x
V03OutTransfCHP
(allCy, TOCTEF, YTIME)
Transformation output from CHP \(Mtoe\) x
V03OutTransfGasses
(allCy, EFS, YTIME)
x
V03OutTransfRefSpec
(allCy, EFS, YTIME)
Transformation output from refineries \(Mtoe\) x
V03OutTransfSolids
(allCy, EFS, YTIME)
x
V03ProdPrimary
(allCy, EFS, YTIME)
Primary Production \(Mtoe\) x
V03Transfers
(allCy, EFS, YTIME)
Transfers \(Mtoe\) x

Sets

sets in use
  description
allCy All Countries Used in the Model
an(ytime) Years for which the model is running
DSBS(SBS) All Demand Subsectors
EF Energy Forms
EFS(EF) Energy Forms used in Supply Side
EFtoEFS(EF, EFS) Fuel Aggregation for Supply Side
ELCEF(EF) Electricity
H2EF(EF) Hydrogen
IMPEF(EFS) Fuels considered in Imports and Exports
INDDOM(DSBS) Industry and Tertiary
kpdl counter for Polynomial Distribution Lag
NENSE(DSBS) Non Energy and Bunkers
PGALL(STECH) Power Generation Plant Types
PGRENEF Renewable energy forms in power generation
runCy(allCy) Countries for which the model is running
runCyL(allCy) Countries for which the model is running (used in countries loop)
SBS(ALLSBS) Model Subsectors
SECtoEF(SBS, EF) Link between Model Subsectors and Energy Forms consumed
SECtoEFPROD(SSBS, EFS) Energy forms produced by each supply sector
SSBS(SBS) All Supply Subsectors
STEAM(EFS) Steam
STEMODE Steam production modes
SUPOTH Indicators related to supply side
TCHP(TSTEAM) CHP plant technologies
TOCTEF(EFS) Energy forms produced by power plants and boilers
TRANSE(DSBS) All Transport Subsectors
TSTEAM CHP & DHP plant technologies
WEF Imported Energy Forms (affecting fuel prices)

See Also

01_Transport, 02_Industry, 04_PowerGeneration, 05_Hydrogen, 06_CO2, 07_Emissions, 09_Heat, 11_Economy

References