diff --git a/message_ix/macro/__init__.py b/message_ix/macro/__init__.py index 878519bd2..275d1d9f2 100644 --- a/message_ix/macro/__init__.py +++ b/message_ix/macro/__init__.py @@ -38,6 +38,13 @@ def initialize(cls, scenario, with_data=False): #: ixmp items (sets, parameters, variables, and equations) for MACRO. _set("sector") _set("mapping_macro_sector", "sector c l") +par("EMIN", "node") +par("alpha", "node") +par("wage", "n y") +par("h", "n sector") +par("beta_rc_spec", "node") +par("beta_rc_therm", "node") +par("beta_transport", "node") par("MERtoPPP", "n y") par("aeei", "n sector y") par("cost_MESSAGE", "n y") @@ -59,10 +66,11 @@ def initialize(cls, scenario, with_data=False): var("COST_NODAL_NET", "n y", "Net of trade and emissions cost") var("DEMAND", "n c l y h") var("EC", "n y") +var("EC_household", "n y") +var("EC_production", "n y") var("GDP", "n y") var("I", "n y", "Total investment") var("K", "n y") -var("KN", "n y") var("MAX_ITER", "") var("N_ITER", "") var("NEWENE", "n sector y") @@ -71,7 +79,7 @@ def initialize(cls, scenario, with_data=False): var("PRODENE", "n sector y") var("UTILITY", "") var("Y", "n y") -var("YN", "n y") +var("Y_GOODS", "n y") var("aeei_calibrate", "n sector y") var("grow_calibrate", "n y") equ("COST_ACCOUNTING_NODAL", "n y") diff --git a/message_ix/macro/calibrate.py b/message_ix/macro/calibrate.py index 7b0a27ce9..240096da7 100644 --- a/message_ix/macro/calibrate.py +++ b/message_ix/macro/calibrate.py @@ -58,6 +58,13 @@ "lotol", "MERtoPPP", "price_ref", + "EMIN", + "alpha", + "wage", + "h", + "beta_rc_spec", + "beta_rc_therm", + "beta_transport", ] diff --git a/message_ix/model/MACRO/macro_calibration.gms b/message_ix/model/MACRO/macro_calibration.gms index b3aa764a3..52beeb8d9 100644 --- a/message_ix/model/MACRO/macro_calibration.gms +++ b/message_ix/model/MACRO/macro_calibration.gms @@ -43,7 +43,7 @@ demand_new(node_macro,sector,year) = demand_scale(node_macro,sector,year) * dema If (mod(ctr, 2) eq 0, * calculate correction factor for labour force growth rate and apply for next iteration of MACRO - gdp_mer_macro(node_macro,year) = (I.L(node_macro,year) + C.L(node_macro,year) + EC.L(node_macro,year)) * 1000 ; + gdp_mer_macro(node_macro,year) = Y.L(node_macro,year) * 1000 ; gdp_scale(node_macro,year) = gdp_mer_macro(node_macro,year)/gdp_calibrate(node_macro,year) ; growth_correction(node_macro,year) $ (NOT macro_base_period(year)) = SUM(year2 $ seq_period(year2,year), ((gdp_calibrate(node_macro,year)/gdp_calibrate(node_macro,year2))**(1/duration_period(year))) - ((gdp_mer_macro(node_macro,year)/gdp_mer_macro(node_macro,year2))**(1/duration_period(year))) ) ; diff --git a/message_ix/model/MACRO/macro_core.gms b/message_ix/model/MACRO/macro_core.gms index 23b3ba259..4da7f7877 100755 --- a/message_ix/model/MACRO/macro_core.gms +++ b/message_ix/model/MACRO/macro_core.gms @@ -35,21 +35,27 @@ * ================================== ================================================================================================================================ * Parameter Description * ================================== ================================================================================================================================ -* :math:`\text{duration_period}_y` Number of years in time period :math:`y` (forward diff) -* :math:`\text{total_cost}_{n,y}` Total system costs in region :math:`n` and period :math:`y` from MESSAGE model run -* :math:`\text{enestart}_{n,s,y}` Consumption level of (commercial) end-use services :math:`s` in region :math:`n` and period :math:`y` from MESSAGE model run -* :math:`\text{eneprice}_{n,s,y}` Shadow prices of (commercial) end-use services :math:`s` in region :math:`n` and period :math:`y` from MESSAGE model run +* :math:`\text{period}_t` Number of years in time period :math:`t` (forward diff) +* :math:`\text{total_cost}_{n,t}` Total system costs in region :math:`n` and period :math:`t` from MESSAGE model run +* :math:`\text{enestart}_{n,s,t}` Consumption level of (commercial) end-use services :math:`s` in region :math:`n` and period :math:`t` from MESSAGE model run +* :math:`\text{p}_{n,s,t}` Shadow prices of (commercial) end-use services :math:`s` in region :math:`n` and period :math:`t` from MESSAGE model run +* :math:`\text{E}_{min,n,s,t}` Subsistence level of direct energy consumption (end-use service) in region :math:`n`, sector :math:`s` and period :math:`t` +* :math:`\text{h}_{n,s,t}` Share of the direct energy consumption of the total energy production in region :math:`n`, sector :math:`s` and period :math:`t` + * :math:`\epsilon_n` Elasticity of substitution between capital-labor and total energy in region :math:`n` -* :math:`\rho_n` :math:`\epsilon - 1 / \epsilon` where :math:`\epsilon` is the elasticity of subsitution in region :math:`n` -* :math:`\text{depr}_n` Annual depreciation rate in region :math:`n` +* :math:`\rho_n` :math:`\epsilon - 1 / \epsilon` where :math:`\epsilon` is the elasticity of substitution in region :math:`n` +* :math:`\beta_n` Consumption value share parameter in region :math:`n` +* :math:`\sigma_{n,s}` Direct energy consumption value share parameter in region :math:`n` and of sector :math:`s` +* :math:`\delta_n` Annual depreciation rate in region :math:`n` * :math:`\alpha_n` Capital value share parameter in region :math:`n` * :math:`a_n` Production function coefficient of capital and labor in region :math:`n` -* :math:`b_{n,s}` Production function coefficients of the different end-use sectors in region :math:`n`, sector :math:`s` and period :math:`y` -* :math:`\text{udf}_{n,y}` Utility discount factor in period year in region :math:`n` and period :math:`y` -* :math:`\text{newlab}_{n,y}` New vintage of labor force in region :math:`n` and period :math:`y` -* :math:`\text{grow}_{n,y}` Annual growth rates of potential GDP in region :math:`n` and period :math:`y` -* :math:`\text{aeei}_{n,s,y}` Autonomous energy efficiency improvement (AEEI) in region :math:`n`, sector :math:`s` and period :math:`y` -* :math:`\text{fin_time}_{n,y}` finite time horizon correction factor in utility function in region :math:`n` and period :math:`y` +* :math:`b_{n,s}` Production function coefficients of the different end-use sectors in region :math:`n`, sector :math:`s` and period :math:`t` +* :math:`\text{udf}_{n,t}` Utility discount factor in period year in region :math:`n` and period :math:`t` +* :math:`\text{L}_{n,t}` Labor force in region :math:`n` and period :math:`t` +* :math:`\text{w}_{n,t}` Wage rate in region :math:`n` and period :math:`t` +* :math:`\text{grow}_{n,t}` Annual growth rates of potential GDP in region :math:`n` and period :math:`t` +* :math:`\text{aeei}_{n,s,t}` Autonomous energy efficiency improvement (AEEI) in region :math:`n`, sector :math:`s` and period :math:`t` +* :math:`\text{fin_time}_{n,t}` Finite time horizon correction factor in utility function in region :math:`n` and period :math:`t` * ================================== ================================================================================================================================ *** @@ -65,15 +71,12 @@ * Variable Definition Description * =============================== =========================================================== ============================================================================================================== * :math:`\text{K}_{n,y}` :math:`\text{K}_{n, y}\geq 0 ~ \forall n, y` Capital stock in region :math:`n` and period :math:`y` -* :math:`\text{KN}_{n,y}` :math:`\text{KN}_{n, y}\geq 0 ~ \forall n, y` New Capital vintage in region :math:`n` and period :math:`y` * :math:`\text{Y}_{n,y}` :math:`\text{Y}_{n, y}\geq 0 ~ \forall n, y` Total production in region :math:`n` and period :math:`y` -* :math:`\text{YN}_{n,y}` :math:`\text{YN}_{n, y}\geq 0 ~ \forall n, y` New production vintage in region :math:`n` and period :math:`y` * :math:`\text{C}_{n,y}` :math:`\text{C}_{n, y}\geq 0 ~ \forall n, y` Consumption in region :math:`n` and period :math:`y` -* :math:`\text{I}_{n,y}` :math:`\text{I}_{n, y}\geq 0 ~ \forall n, y` Investment in region :math:`n` and period :math:`y` * :math:`\text{PHYSENE}_{n,s,y}` :math:`\text{PHYSENE}_{n, s, y}\geq 0 ~ \forall n, s, y` Physical end-use service use in region :math:`n`, sector :math:`s` and period :math:`y` -* :math:`\text{PRODENE}_{n,s,y}` :math:`\text{PRODENE}_{n, s, y}\geq 0 ~ \forall n, s, y` Value of end-use service in the production function in region :math:`n`, sector :math:`s` and period :math:`y` -* :math:`\text{NEWENE}_{n,s,y}` :math:`\text{NEWENE}_{n, s, y}\geq 0 ~ \forall n, s, y` New end-use service in the production function in region :math:`n`, sector :math:`s` and period :math:`y` -* :math:`\text{EC}_{n,y}` :math:`\text{EC} \in \left[-\infty..\infty\right]` Approximation of system costs based on MESSAGE results +* :math:`\text{TE}_{n,s,y}` :math:`\text{TE}_{n, s, y}\geq 0 ~ \forall n, s, y` Value of total end-use service in the production function and utility function in region :math:`n`, sector :math:`s` and period :math:`y` +* :math:`\text{E}_{n,s,y}` :math:`\text{E}_{n, s, y}\geq 0 ~ \forall n, s, y` Value of direct energy consumption of end-use service of households in the utility function in region :math:`n`, sector :math:`s` and period :math:`y` +* :math:`\text{YE}_{n,s,y}` :math:`\text{YE}_{n, s, y}\geq 0 ~ \forall n, s, y` Value of end-use service energy consumption in the production function in region :math:`n`, sector :math:`s` and period :math:`y` * :math:`\text{UTILITY}` :math:`\text{UTILITY} \in \left[-\infty..\infty\right]` Utility function (discounted log of consumption) * =============================== =========================================================== ============================================================================================================== * @@ -85,21 +88,18 @@ POSITIVE VARIABLES K(node, year_all) Capital stock in period year - KN(node, year_all) New Capital vintage in period year - Y(node, year_all) Production in period year - YN(node, year_all) New production vintage in period year + Y(node, year_all) Total GDP - PHYSENE(node, sector, year_all) Physical end-use service or commodity use - PRODENE(node, sector, year_all) Value of end-use services or commodities in the production function - NEWENE(node, sector, year_all) New end-use service or commodity (production function value) + PHYSENE(node, sector, year_all) + TE(node, sector, year_all) Value of end-use services or commodities in the production function + E(node, sector, year_all) + YE(node, sector, year_all) C(node, year_all) Consumption (Trillion $) - I(node, year_all) Investment (Trillion $) ; VARIABLES UTILITY Utility function (discounted log of consumption) - EC(node, year_all) System costs (Trillion $) based on MESSAGE model run ; Variables @@ -113,19 +113,18 @@ Variables EQUATIONS UTILITY_FUNCTION Utility function (discounted log of consumption summed over all projection periods) - CAPITAL_CONSTRAINT(node, year_all) Capital constraint + + CAPITAL(node, year_all) Capital (wealth) formation - NEW_CAPITAL(node, year_all) New capital - NEW_PRODUCTION(node, year_all) New production + PRODUCTION(node, year_all) Total production across all vintages - TOTAL_CAPITAL(node, year_all) Total capital stock across all vintages - TOTAL_PRODUCTION(node, year_all) Total production across all vintages + ENERGY_ACCOUNTING(node, sector, *) New Energy Accounting Equations: Splitting TE into E and YE + ENERGY_ACCOUNTING2(node, sector, *) New Energy Accounting Equations: Defining E as share of the total energy TE + TE_EQUATION(node, sector, *) New Energy Accounting Equations: Determining TE based on optimal direct energy consumption of the households - NEW_ENERGY(node, sector, year_all) New end-use services or commodities (production function) - ENERGY_SUPPLY(node, sector, *) Supply of end-use services or commodities + ENERGY_SUPPLY(node, sector, year_all) New Energy Accounting Equations: PHYSENE - TE relation with aeei - COST_ENERGY(node, year_all) system costs approximation based on MESSAGE input - TERMINAL_CONDITION(node, year_all) Terminal condition + TERMINAL_CONDITION(node, year_all) New terminal condition ; * ------------------------------------------------------------------------------ @@ -135,17 +134,14 @@ EQUATIONS *** * Equation UTILITY_FUNCTION * --------------------------------- -* The utility function which is maximized sums up the discounted logarithm of consumption of a single representative producer-consumer over the entire time horizon -* of the model. +* The utility function, which is maximized, sums the discounted logarithm of consumption :math:`\text{C}_{n,y}` and direct energy consumption +* of end-use services :math:`\text{E}_{n,s,y}` of a single representative household over the entire time horizon of the model. +* +* The utility function and the capital formulation of the optimization problem are derived in previously (See equations 10 and 13 of the model documentation). * -* .. math:: \text{UTILITY} = \sum_{n} \bigg( & \sum_{y | ( ( {ord}( y ) > 1 ) \wedge ( {ord}( y ) < | y | ) )} \text{udf}_{n, y} \cdot {\log}( \text{C}_{n, y} ) \cdot \text{duration_period}_{y} \\ -* + &\sum_{y | ( {ord}( y ) = | y | ) } \text{udf}_{n, y} \cdot {\log}( \text{C}_{n, y} ) \cdot \big( \text{duration_period}_{y-1} + \frac{1}{\text{fin_time}_{n, y}} \big) \bigg) +* .. math:: \text{UTILITY} = \sum_{n} \bigg( & \sum_{y | ( ( {ord}( y ) > 1 ) \wedge ( {ord}( y ) < | y | ) )} \text{udf}_{n, y} \cdot \bigg( (\beta_n + \sum_{s=1}^{3} \sigma_{s,n}) \log(\text{C}_{n, y}) - \sum_{s=1}^{3} \sigma_{s,n} \log(\text{p}_{n,s,y}) + \sum_{s=1}^{3} \sigma_{s,n} \log\left(\frac{\sigma_{s,n}}{\beta_n}\right) \bigg) \cdot \text{duration_period}_{y} \\ +* + &\sum_{y | ( {ord}( y ) = | y | ) } \text{udf}_{n, y} \cdot \bigg( (\beta_n + \sum_{s=1}^{3} \sigma_{s,n}) \log(\text{C}_{n, y}) - \sum_{s=1}^{3} \sigma_{s,n} \log(\text{p}_{n,s,y}) + \sum_{s=1}^{3} \sigma_{s,n} \log\left(\frac{\sigma_{s,n}}{\beta_n}\right) \bigg) \cdot \big( \text{duration_period}_{y-1} + \frac{1}{\text{fin_time}_{n, y}} \big) \bigg) * -* The utility discount rate for period :math:`y` is set to :math:`\text{drate}_{n} - \text{grow}_{n,y}`, where :math:`\text{drate}_{n}` is the discount rate used in MESSAGE, typically set to 5%, -* and :math:`\text{grow}` is the potential GDP growth rate. This choice ensures that in the steady state, the optimal growth rate is identical to the potential GDP growth rates :math:`\text{grow}`. -* The values for the utility discount rates are chosen for descriptive rather than normative reasons. The term :math:`\frac{\text{duration_period}_{y} + \text{duration_period}_{y-1}}{2}` mutliples the -* discounted logarithm of consumption with the period length. The final period is treated separately to include a correction factor :math:`\frac{1}{\text{fin_time}_{n, y}}` reflecting -* the finite time horizon of the model. Note that the sum over nodes :math:`\text{node_active}` is artificial, because :math:`\text{node_active}` only contains one element. * *** @@ -153,156 +149,106 @@ UTILITY_FUNCTION.. UTILITY =E= SUM(node_active, 1000 * (SUM(year $ (NOT macro_base_period(year) AND NOT last_period(year)), - udf(node_active, year) * LOG(C(node_active, year)) * duration_period(year)) - + SUM(year $ last_period(year), - udf(node_active, year) * LOG(C(node_active, year)) * (duration_period(year) + 1/finite_time_corr(node_active, year)))) + udf(node_active, year) * ( (alpha(node_active) + beta_rc_spec(node_active) + beta_rc_therm(node_active) + beta_transport(node_active)) * LOG(C(node_active, year)) + - beta_rc_spec(node_active) * LOG(eneprice(node_active, 'rc_spec', year)/1000) + beta_rc_spec(node_active) * LOG(beta_rc_spec(node_active)/alpha(node_active)) + - beta_rc_therm(node_active) * LOG(eneprice(node_active, 'rc_therm', year)/1000) + beta_rc_therm(node_active) * LOG(beta_rc_therm(node_active)/alpha(node_active)) + - beta_transport(node_active) * LOG(eneprice(node_active, 'transport', year)/1000) + beta_transport(node_active) * LOG(beta_transport(node_active)/alpha(node_active)) ) * duration_period(year) ) + + SUM(year $ last_period(year), + udf(node_active, year) * ( (alpha(node_active) + beta_rc_spec(node_active) + beta_rc_therm(node_active) + beta_transport(node_active)) * LOG(C(node_active, year)) + - beta_rc_spec(node_active) * LOG(eneprice(node_active, 'rc_spec', year)/1000) + beta_rc_spec(node_active) * LOG(beta_rc_spec(node_active)/alpha(node_active)) + - beta_rc_therm(node_active) * LOG(eneprice(node_active, 'rc_therm', year)/1000) + beta_rc_therm(node_active) * LOG(beta_rc_therm(node_active)/alpha(node_active)) + - beta_transport(node_active) * LOG(eneprice(node_active, 'transport', year)/1000) + beta_transport(node_active) * LOG(beta_transport(node_active)/alpha(node_active)) ) * (duration_period(year) ) + 1/finite_time_corr(node_active, year)) ) ) ; *** -* Equation CAPITAL_CONSTRAINT +* Equation CAPITAL * --------------------------------- -* The following equation specifies the allocation of total production among current consumption :math:`\text{C}_{n, y}`, investment into building up capital stock excluding -* the sectors represented in MESSAGE :math:`\text{I}_{n, y}` and the MESSAGE system costs :math:`\text{EC}_{n, y}` which are derived from a previous MESSAGE model run. As described in :cite:`Manne-Richels-1992`, the first-order -* optimality conditions lead to the Ramsey rule for the optimal allocation of savings, investment and consumption over time. * -* .. math:: \text{Y}_{n, y} = \text{C}_{n, y} + \text{I}_{r, y} + \text{EC}_{n, y} \qquad \forall{n, y} +* The household maximizes its utility subject to the constraint on wealth accumulation of capital in the sectors not represented in the energy model MESSAGE. +* The net capital (or wealth) formation :math:`\text{K}_{n,t}` is derived from the existing capital stock, returns on capital, labor income, minus the expenses +* for direct energy consumption and all other consumption goods, as well as depreciation of the previous capital stock. +* +* .. math:: \text{K}_{t+1,n} = (1 - \delta_{n})^{\text{period}_{t}} \text{K}_{t,n} + ((1 + r_{t,n})^{\text{period}_{t}} - 1) \text{K}_{t,n} + \text{period}_{t} \left( w_{t,n} L_{t,n} - \sum_{s=1}^{3} p_{t,s,n} L_{n,t} E_{min,t,s,n} - \frac{\beta + \sum_{s=1}^{3} \sigma_{s,n}}{\beta} C_{t,n} \right) \qquad (15) * *** -CAPITAL_CONSTRAINT(node_active, year).. -Y(node_active, year) =E= -C(node_active, year) + I(node_active, year) + EC(node_active, year) +CAPITAL(node_active, year) $ (NOT macro_base_period(year)).. +K(node_active, year) =E= +SUM(year2$( seq_period(year2,year) ), K(node_active, year2) * (1 - depr(node_active))**duration_period(year2) + K(node_active, year2) * ((1 + interestrate(year2))**duration_period(year2) - 1) ++ duration_period(year2) * labor(node_active, year2) * wage(node_active, year2) +- duration_period(year2) * eneprice(node_active, 'rc_spec', year2)/1000 * labor(node_active, year2) * EMIN(node_active) +- duration_period(year2) * eneprice(node_active, 'rc_therm', year2)/1000 * labor(node_active, year2) * EMIN(node_active) +- duration_period(year2) * eneprice(node_active, 'transport', year2)/1000 * labor(node_active, year2) * EMIN(node_active) +- duration_period(year2) * (((alpha(node_active) + beta_rc_spec(node_active) + beta_rc_therm(node_active) + beta_transport(node_active))/alpha(node_active))) * C(node_active, year2) +) ; *** -* Equation NEW_CAPITAL +* Equation PRODUCTION * --------------------------------- -* The accumulation of capital in the sectors not represented in MESSAGE is governed by new capital stock equation. Net capital formation :math:`\text{KN}_{n,y}` is derived from gross -* investments :math:`\text{I}_{n,y}` minus depreciation of previsouly existing capital stock. * -* .. math:: \text{KN}_{n,y} = \text{duration_period}_{y} \cdot \text{I}_{n,y} \qquad \forall{n, y > 1} +* We implement a nested constant elasticity of substitution (CES) production function with capital, labor, and the (commercial) end-use services +* represented in MESSAGE as inputs. :math:`\text{Y}_{n,t}` should correspond to gross domestic product (GDP). +* +* .. math:: \text{Y}_{n,t} = \left( a_{n} \cdot \text{K}_{n, t}^{ ( \rho_{n} \cdot \alpha_{n} ) } \cdot \text{L}_{n, t}^{ ( \rho_{n} \cdot ( 1 - \alpha_{n} ) ) } + \sum_{s} ( b_{n, s} \cdot \text{YE}_{n, s, t}^{\rho_{n}} ) \right)^{ \frac{1}{\rho_{n}} } \qquad \forall n, t > 1 \qquad (16) * -* Here, the initial boundary condition for the base year :math:`y_0` implies for the investments that :math:`\text{I}_{n,y_0} = (\text{grow}_{n,y_0} + \text{depr}_{n}) \cdot \text{kgdp}_{n} \cdot \text{gdp}_{n,y_0}`. *** -NEW_CAPITAL(node_active, year) $ (NOT macro_base_period(year)).. -KN(node_active, year) =E= duration_period(year) * I(node_active, year) +PRODUCTION(node_active, year) $ (NOT macro_base_period(year)).. +Y(node_active, year) =E= +(LAKL(node_active) * K(node_active, year)**(rho(node_active) * kpvs(node_active)) * labor(node_active, year)**(RHO(node_active) * (1 - kpvs(node_active))) ++ PRFCONST(node_active, 'i_spec') * YE(node_active, 'i_spec', year)**rho(node_active) ++ PRFCONST(node_active, 'i_therm') * YE(node_active, 'i_therm', year)**rho(node_active) ++ (1-h(node_active, 'rc_spec')) * PRFCONST(node_active, 'rc_spec') * YE(node_active, 'rc_spec', year)**rho(node_active) ++ (1-h(node_active, 'rc_therm')) * PRFCONST(node_active, 'rc_therm') * YE(node_active, 'rc_therm', year)**rho(node_active) ++ (1-h(node_active, 'transport')) * PRFCONST(node_active, 'transport') * YE(node_active, 'transport', year)**rho(node_active) +)**(1/rho(node_active)) ; *** -* Equation NEW_PRODUCTION +* Equations NEW ENERGY ACCOUNTING * --------------------------------- -* MACRO employs a nested constant elasticity of substitution (CES) production function with capital, labor and the (commercial) end-use services -* represented in MESSAGE as inputs. This version of the production function is equaivalent to that in MARKAL-MACRO. -* -* .. math:: \text{YN}_{n,y} = { \left( {a}_{n} \cdot \text{KN}_{n, y}^{ ( {\rho}_{n} \cdot {\alpha}_{n} ) } \cdot \text{newlab}_{n, y}^{ ( {\rho}_{n} \cdot ( 1 - {\alpha}_{n} ) ) } + \displaystyle \sum_{s} ( {b}_{n, s} \cdot \text{NEWENE}_{n, s, y}^{{\rho}_{n}} ) \right) }^{ \frac{1}{{\rho}_{n}} } \qquad \forall{ n, y > 1} +*New energy accounting equations. Need to be discussed and checked. See model documentation. * *** -NEW_PRODUCTION(node_active, year) $ (NOT macro_base_period(year)).. -YN(node_active, year) =E= -( LAKL(node_active) * KN(node_active, year)**(rho(node_active) * kpvs(node_active)) * newlab(node_active, year)**(RHO(node_active) * (1 - kpvs(node_active))) -+ SUM(sector, PRFCONST(node_active, sector) * NEWENE(node_active, sector, year)**rho(node_active)) )**(1/rho(node_active)) +ENERGY_ACCOUNTING(node_active, sector, year) $ (NOT macro_base_period(year)).. +TE(node_active, sector, year) =G= +YE(node_active, sector, year) + E(node_active, sector, year) ; -*** -* Equation TOTAL_CAPITAL -* --------------------------------- -* Equivalent to the total production equation above, the total capital stock, again excluding those sectors which are modeled in MESSAGE, is then simply a summation -* of capital stock in the previous period :math:`y-1`, depreciated with the depreciation rate :math:`\text{depr}_{n}`, and the capital stock added in the current period :math:`y`. -* -* .. math:: \text{K}_{n, y} = \text{K}_{n, y-1} \cdot { \left( 1 - \text{depr}_n \right) }^{\text{duration_period}_{y}} + \text{KN}_{n, y} \qquad \forall{ n, y > 1} -* -*** - -TOTAL_CAPITAL(node_active, year) $ (NOT macro_base_period(year)).. -K(node_active, year) =E= -SUM(year2$( seq_period(year2,year) ), K(node_active, year2)) * (1 - depr(node_active))**duration_period(year) + KN(node_active, year) +ENERGY_ACCOUNTING2(node_active, sector, year) $ (NOT macro_base_period(year)).. +E(node_active, sector, year) =G= +TE(node_active, sector, year) * h(node_active, sector) ; -*** -* Equation TOTAL_PRODUCTION -* --------------------------------- -* Total production in the economy (excluding energy sectors) is the sum of production from assets that were already existing in the previous period :math:`y-1`, -* depreciated with the depreciation rate :math:`\text{depr}_{n}`, and the new vintage of production from period :math:`y`. -* -* .. math:: \text{Y}_{n, y} = \text{Y}_{n, y-1} \cdot { \left( 1 - \text{depr}_n \right) }^{\text{duration_period}_{y}} + \text{YN}_{n, y} \qquad \forall{ n, y > 1} -* -*** +TE_EQUATION(node_active, sector, year) $ (NOT macro_base_period(year)).. +TE(node_active, sector, year) =E= -TOTAL_PRODUCTION(node_active, year) $ (NOT macro_base_period(year)).. -Y(node_active, year) =E= -SUM(year2$( seq_period(year2,year) ), Y(node_active, year2)) * (1 - depr(node_active))**duration_period(year) + YN(node_active, year) -; +( (labor(node_active, year) * EMIN(node_active) + + (beta_rc_spec(node_active) / alpha(node_active)) * C(node_active, year) / (eneprice(node_active, 'rc_spec', year)/1000) +) / h(node_active, 'rc_spec') ) $ (sameas(sector,'rc_spec') AND h(node_active, 'rc_spec') <> 0) -*** -* Equation NEW_ENERGY -* --------------------------------- -* Total energy production (across the six commerical energy demands :math:`s`) is the sum of production from all assets that were already existing -* in the previous period :math:`y-1`, depreciated with the depreciation rate :math:`\text{depr}_{n}`, and the the new vintage of energy production from -* period :math:`y`. -* -* .. math:: \text{PRODENE}_{n, s, y} = \text{PRODENE}_{n, s, y-1} \cdot { \left( 1 - \text{depr}_n \right) }^{\text{duration_period}_{y}} + \text{NEWENE}_{n, s, y} \qquad \forall{ n, s, y > 1} -* -*** ++ ( (labor(node_active, year) * EMIN(node_active) + + (beta_rc_therm(node_active) / alpha(node_active)) * C(node_active, year) / (eneprice(node_active, 'rc_therm', year)/1000) +) / h(node_active, 'rc_therm') ) $ (sameas(sector,'rc_therm') AND h(node_active, 'rc_therm') <> 0) -NEW_ENERGY(node_active, sector, year) $ (NOT macro_base_period(year)).. -PRODENE(node_active, sector, year) =E= -SUM(year2$( seq_period(year2,year) ), PRODENE(node_active, sector, year2)) * (1 - depr(node_active))**duration_period(year) + NEWENE(node_active, sector, year) -; ++ ( (labor(node_active, year) * EMIN(node_active) + + (beta_transport(node_active) / alpha(node_active)) * C(node_active, year) / (eneprice(node_active, 'transport', year)/1000) +) / h(node_active, 'transport') ) $ (sameas(sector,'transport') AND h(node_active, 'transport') <> 0) -*** -* Equation ENERGY_SUPPLY -* --------------------------------- -* The relationship below establishes the link between physical energy :math:`\text{PHYSENE}_{r, s, y}` as accounted in MESSAGE for the six commerical energy demands :math:`s` and -* energy in terms of monetary value :math:`\text{PRODENE}_{n, s, y}` as specified in the production function of MACRO. -* -* .. math:: \text{PHYSENE}_{n, s, y} \geq \text{PRODENE}_{n, s, y} \cdot \text{aeei_factor}_{n, s, y} \qquad \forall{ n, s, y > 1} -* -* The cumulative effect of autonomous energy efficiency improvements (AEEI) is captured in -* :math:`\text{aeei_factor}_{n,s,y} = \text{aeei_factor}_{n, s, y-1} \cdot (1 - \text{aeei}_{n,s,y})^{\text{duration_period}_{y}}` -* with :math:`\text{aeei_factor}_{n,s,y=1} = 1`. Therefore, choosing the :math:`\text{aeei}_{n,s,y}` coefficients appropriately offers the possibility to calibrate MACRO to a certain energy demand trajectory -* from MESSAGE. -* -*** ++ 0 $ (sameas(sector,'i_spec') OR sameas(sector,'i_therm')) +; ENERGY_SUPPLY(node_active, sector, year) $ (NOT macro_base_period(year)).. PHYSENE(node_active, sector, year) =G= -PRODENE(node_active, sector, year) * aeei_factor(node_active, sector, year) -; - -*** -* Equation COST_ENERGY -* --------------------------------- -* Energy system costs are based on a previous MESSAGE model run. The approximation of energy system costs in vicinity of the MESSAGE solution are approximated by a Taylor expansion with the -* first order term using shadow prices :math:`\text{eneprice}_{s, y, n}` of the MESSAGE model's solution and a quadratic second-order term. -* -* .. math:: \text{EC}_{n, y} = & \text{total_cost}_{n, r} \\ -* + & \displaystyle \sum_{s} \text{eneprice}_{s, y, n} \cdot \left( \text{PHYSENE}_{n, s, y} - \text{enestart}_{s, y, n} \right) \\ -* + & \displaystyle \sum_{s} \frac{\text{eneprice}_{s, y, n}}{\text{enestart}_{s, y, n}} \cdot \left( \text{PHYSENE}_{n, s, y} - \text{enestart}_{s, y, n} \right)^2 \qquad \forall{ n, y > 1} -* -*** - -COST_ENERGY(node_active, year) $ (NOT macro_base_period(year)).. -EC(node_active, year) =E= -(total_cost(node_active, year)/1000 -+ SUM(sector, eneprice(node_active, sector, year) * 1E-3 * (PHYSENE(node_active, sector, year) - enestart(node_active, sector, year))) -+ SUM(sector, eneprice(node_active, sector, year) * 1E-3 / enestart(node_active, sector, year) * (PHYSENE(node_active, sector, year) - enestart(node_active, sector, year)) * (PHYSENE(node_active, sector, year) - enestart(node_active, sector, year)))) +TE(node_active, sector, year) * aeei_factor(node_active, sector, year) ; -*** -* Equation TERMINAL_CONDITION -* --------------------------------- -* Given the finite time horizon of MACRO, a terminal constraint needs to be applied to ensure that investments are chosen at an appropriate level, i.e. to replace depriciated capital and -* provide net growth of capital stock beyond MACRO's time horizon :cite:`Manne-Richels-1992`. The goal is to avoid to the extend possible model artifacts resulting from this finite time horizon -* cutoff. -* -* .. math:: \text{K}_{n, y} \cdot \left( \text{grow}_{n, y} + \text{depr}_n \right) \leq \text{I}_{n, y} \qquad \forall{ n, y = \text{last year}} -*** - TERMINAL_CONDITION(node_active, last_period).. -I(node_active, last_period) =G= K(node_active, last_period) * (grow(node_active, last_period) + depr(node_active)) +C(node_active, last_period) / K(node_active, last_period) =E= +interestrate(last_period) + depr(node_active) - grow(node_active, last_period) ; * ------------------------------------------------------------------------------ @@ -310,15 +256,13 @@ I(node_active, last_period) =G= K(node_active, last_period) * (grow(node_active, * ------------------------------------------------------------------------------ MODEL MESSAGE_MACRO / - UTILITY_FUNCTION - CAPITAL_CONSTRAINT - NEW_CAPITAL - NEW_PRODUCTION - TOTAL_CAPITAL - TOTAL_PRODUCTION - NEW_ENERGY + UTILITY_FUNCTION + CAPITAL + PRODUCTION + ENERGY_ACCOUNTING + ENERGY_ACCOUNTING2 + TE_EQUATION ENERGY_SUPPLY - COST_ENERGY TERMINAL_CONDITION / ; diff --git a/message_ix/model/MACRO/macro_data_load.gms b/message_ix/model/MACRO/macro_data_load.gms index 8cbb9eb9d..df473472c 100755 --- a/message_ix/model/MACRO/macro_data_load.gms +++ b/message_ix/model/MACRO/macro_data_load.gms @@ -71,6 +71,14 @@ PARAMETERS lakl(node) Production function coefficient of capital and labor prfconst(node, sector) Production function coefficient of different energy sectors + EMIN(node) Test Lukas + wage(node,year_all) Test Lukas + h(node,sector) Test Lukas + beta_rc_spec(node) Test Lukas + beta_rc_therm(node) Test Lukas + beta_transport(node) Test Lukas + alpha(node) Test Lukas + enestart(node,sector,year_all) Consumption level of energy services from MESSAGE model run eneprice(node,sector,year_all) Shadow prices of energy services from MESSAGE model run total_cost(node,year_all) Total energy system costs from MESSAGE model run @@ -131,9 +139,11 @@ $LABEL macro_data $LOAD type_node,cat_node $LOAD sector,mapping_macro_sector -$LOAD kpvs,kgdp,esub,depr,drate,lotol +$LOAD kpvs,kgdp,esub,depr,drate,lotol,alpha,EMIN,beta_rc_spec,beta_rc_therm,beta_transport $LOAD lakl,prfconst $LOAD aeei,grow +$LOAD wage +$LOAD h $LOAD gdp_calibrate,historical_gdp $LOAD demand_MESSAGE,price_MESSAGE,cost_MESSAGE $GDXIN diff --git a/message_ix/model/MACRO/macro_reporting.gms b/message_ix/model/MACRO/macro_reporting.gms index aa6284eb6..bf30cfd5d 100755 --- a/message_ix/model/MACRO/macro_reporting.gms +++ b/message_ix/model/MACRO/macro_reporting.gms @@ -2,4 +2,4 @@ * MACRreport * ------------------------------------------------------------------------------ -GDP.L(node_macro,year) = (I.L(node_macro,year) + C.L(node_macro,year) + EC.L(node_macro,year)) * 1000 ; +GDP.L(node_macro,year) = Y.L(node_macro,year) * 1000 ; \ No newline at end of file diff --git a/message_ix/model/MACRO/macro_solve.gms b/message_ix/model/MACRO/macro_solve.gms index 5e4611c0e..e41d07ac8 100755 --- a/message_ix/model/MACRO/macro_solve.gms +++ b/message_ix/model/MACRO/macro_solve.gms @@ -20,7 +20,7 @@ SVNEWE(node_macro, sector, year) = ( ) )$(NOT macro_base_period(year)); -NEWENE.L(node_macro, sector, macro_horizon) = ( +TE.L(node_macro, sector, macro_horizon) = ( SVNEWE(node_macro, sector, macro_horizon)$(SVNEWE(node_macro, sector, macro_horizon) > 0) + epsilon ); @@ -32,28 +32,22 @@ KN.L(node_macro, macro_horizon) = SVKN(node_macro, macro_horizon) $ (SVKN(node_ * ------------------------------------------------------------------------------ K.LO(node_macro, macro_horizon) = LOTOL(node_macro) * k0(node_macro) ; -KN.LO(node_macro, macro_horizon) = LOTOL(node_macro) * i0(node_macro) * duration_period(macro_horizon) ; Y.LO(node_macro, macro_horizon) = LOTOL(node_macro) * y0(node_macro) ; -YN.LO(node_macro, macro_horizon) = LOTOL(node_macro) * y0(node_macro) * newlab(node_macro, macro_horizon) ; - C.LO(node_macro, macro_horizon) = LOTOL(node_macro) * c0(node_macro) ; -I.LO(node_macro, macro_horizon) = LOTOL(node_macro) * i0(node_macro) ; -PRODENE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ; -NEWENE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ; +TE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ; +YE.LO(node_macro, sector, macro_horizon) = (1-h(node_macro, sector)) * LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ; +E.LO(node_macro, sector, macro_horizon) = h(node_macro, sector) * LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ; * ------------------------------------------------------------------------------ * Base year values of variables are fixed to historical values * ------------------------------------------------------------------------------ * division by aeei_factor is necesary in case MACRO starts after initialize_period (in case of slicing) -PRODENE.FX(node_macro, sector, macro_base_period) = demand_base(node_macro, sector) / aeei_factor(node_macro, sector, macro_base_period) ; Y.FX(node_macro, macro_base_period) = y0(node_macro) ; K.FX(node_macro, macro_base_period) = k0(node_macro) ; C.FX(node_macro, macro_base_period) = c0(node_macro) ; -I.FX(node_macro, macro_base_period) = i0(node_macro) ; -EC.FX(node_macro, macro_base_period) = y0(node_macro) - i0(node_macro) - c0(node_macro) ; $IFTHEN %MACRO_CONCURRENT% == "0" diff --git a/new_model_description.pdf b/new_model_description.pdf new file mode 100644 index 000000000..bc152a80a Binary files /dev/null and b/new_model_description.pdf differ diff --git a/run script and output/MESSAGE-MACRO_run_log.ipynb b/run script and output/MESSAGE-MACRO_run_log.ipynb new file mode 100644 index 000000000..59c6107f8 --- /dev/null +++ b/run script and output/MESSAGE-MACRO_run_log.ipynb @@ -0,0 +1,1017 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "1d45e60d", + "metadata": {}, + "source": [ + "--- Job MESSAGE-MACRO_run.gms Start 01/08/26 16:05:56 47.6.0 c2de9d6d LEX-LEG x86 64bit/Linux\n", + "--- Applying:\n", + " /gams/gams47.6_linux_x64_64_sfx/gmsprmun.txt\n", + "--- GAMS Parameters defined\n", + " Input /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/MESSAGE-MACRO_run.gms\n", + " ScrDir /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/225b/\n", + " SysDir /gams/gams47.6_linux_x64_64_sfx/\n", + " LogOption 2\n", + " --in /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + " --out /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/output/MsgOutput_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + " --iter /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/output/MsgIterationReport_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "Licensee: Machine Based License S241016|0002CO-LNX\n", + " Umweltbundesamt, Fachgebiet V 1.1 - Klimaschutz DC17025-S1\n", + " /gams/gams47.6_linux_x64_64_sfx/gamslice.txt\n", + " License Admin: Niklas Roming, Niklas.Roming@uba.de \n", + " The maintenance period of the license expired on Nov 10, 2025\n", + " Please contact GAMS or your distributor for further information\n", + "Processor information: 8 socket(s), 8 core(s), and 8 thread(s) available\n", + "GAMS 47.6.0 Copyright (C) 1987-2024 GAMS Development. All rights reserved\n", + "--- Starting compilation\n", + "--- MESSAGE-MACRO_run.gms(3) 2 Mb\n", + "--- . copyright.gms(29) 2 Mb\n", + "--- MESSAGE-MACRO_run.gms(34) 2 Mb\n", + "--- . model_setup.gms(66) 2 Mb\n", + "--- .. auxiliary_settings.gms(37) 2 Mb\n", + "--- . model_setup.gms(69) 2 Mb\n", + "--- .. version.gms(23) 2 Mb\n", + "--- . model_setup.gms(70) 2 Mb\n", + "--- .. version_check.gms(7) 2 Mb\n", + "--- GDXin=/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- GDX File ($gdxIn) /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- .. version_check.gms(24) 3 Mb\n", + "--- . model_setup.gms(73) 3 Mb\n", + "--- .. sets_maps_def.gms(511) 3 Mb\n", + "--- . model_setup.gms(74) 3 Mb\n", + "--- .. parameter_def.gms(907) 3 Mb\n", + "--- . model_setup.gms(77) 3 Mb\n", + "--- .. data_load.gms(9) 3 Mb\n", + "--- GDXin=/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- GDX File ($gdxIn) /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- .. data_load.gms(126) 39 Mb\n", + "--- ... period_parameter_assignment.gms(118) 39 Mb\n", + "--- .. data_load.gms(269) 39 Mb\n", + "--- . model_setup.gms(80) 39 Mb\n", + "--- .. scaling_investment_costs.gms(182) 39 Mb\n", + "--- . model_setup.gms(86) 39 Mb\n", + "--- .. model_core.gms(2339) 39 Mb\n", + "--- . model_setup.gms(86) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(40) 39 Mb\n", + "--- . setup.gms(21) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(41) 39 Mb\n", + "--- . macro_data_load.gms(130) 39 Mb\n", + "--- GDXin=/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- GDX File ($gdxIn) /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- . macro_data_load.gms(164) 39 Mb\n", + "--- .. period_parameter_assignment.gms(118) 39 Mb\n", + "--- . macro_data_load.gms(278) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(42) 39 Mb\n", + "--- . macro_core.gms(128) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(135) 39 Mb\n", + "--- . model_solve.gms(109) 39 Mb\n", + "--- .. aux_computation_time.gms(14) 39 Mb\n", + "--- . model_solve.gms(175) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(176) 39 Mb\n", + "--- . macro_solve.gms(88) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(305) 39 Mb\n", + "--- . aux_computation_time.gms(14) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(316) 39 Mb\n", + "--- . reporting.gms(26) 39 Mb\n", + "--- MESSAGE-MACRO_run.gms(331) 39 Mb\n", + "--- Starting execution: elapsed 0:00:00.153\n", + "--- MESSAGE-MACRO_run.gms(1648) 40 Mb\n", + " +++ Importing data from '/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx'... +++\n", + "--- MESSAGE-MACRO_run.gms(1673) 40 Mb\n", + "--- GDXin=/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- MESSAGE-MACRO_run.gms(1673) 1016 Mb\n", + "--- GDX File (execute_load) /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/data/MsgData_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- MESSAGE-MACRO_run.gms(5161) 1134 Mb\n", + " +++ Starting iteration 1 of MESSAGEix-MACRO... +++\n", + " +++ Solve the perfect-foresight version of MESSAGEix +++\n", + "--- Generating LP model MESSAGE_LP\n", + "--- MESSAGE-MACRO_run.gms(5201) 2214 Mb\n", + "--- LOOPS iteration = 1\n", + "--- 1,528,671 rows 1,429,694 columns 8,877,771 non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 5.551E-17, 2.350E+06] - Zero values observed as well\n", + "--- Bound [min, max] : [ NA, NA] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 1.068E-20, 5.341E+06] - Zero values observed as well\n", + "--- Executing CPLEX (Solvelink=1): elapsed 0:02:00.726\n", + "\n", + "IBM ILOG CPLEX 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- GAMS/CPLEX licensed for continuous and discrete problems.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/cplex.opt\"\n", + ">> advind = 0\n", + ">> lpmethod = 4\n", + ">> threads = 4\n", + ">> epopt = 1e-06\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/cplex.opt\"\n", + "\n", + "--- GMO setup time: 0.00s\n", + "--- Space for names approximately 186.55 Mb\n", + "--- Use option 'names no' to turn use of names off\n", + "--- GMO memory 756.34 Mb (peak 762.17 Mb)\n", + "--- Dictionary memory 0.00 Mb\n", + "--- Cplex 22.1.1.0 link memory 44.76 Mb (peak 367.46 Mb)\n", + "--- Starting Cplex\n", + "\n", + "Version identifier: 22.1.1.0 | 2022-11-28 | 9160aff4d\n", + "CPXPARAM_Advance 0\n", + "CPXPARAM_LPMethod 4\n", + "CPXPARAM_Threads 4\n", + "CPXPARAM_Parallel 1\n", + "CPXPARAM_MIP_Display 4\n", + "CPXPARAM_MIP_Pool_Capacity 0\n", + "CPXPARAM_Barrier_Limits_Iteration 100000000\n", + "CPXPARAM_TimeLimit 1000000\n", + "CPXPARAM_MIP_Tolerances_AbsMIPGap 0\n", + "CPXPARAM_MIP_Tolerances_MIPGap 0\n", + "Tried aggregator 1 time.\n", + "LP Presolve eliminated 1135174 rows and 1038897 columns.\n", + "Aggregator did 71683 substitutions.\n", + "Reduced LP has 321621 rows, 341001 columns, and 1808973 nonzeros.\n", + "Presolve time = 4.21 sec. (2265.52 ticks)\n", + "Parallel mode: using up to 4 threads for barrier.\n", + "Number of nonzeros in lower triangle of A*A' = 2327407\n", + "Using Nested Dissection ordering\n", + "Total time for automatic ordering = 2.81 sec. (1983.01 ticks)\n", + "Summary statistics for Cholesky factor:\n", + " Threads = 4\n", + " Rows in Factor = 321621\n", + " Integer space required = 1804383\n", + " Total non-zeros in factor = 12472730\n", + " Total FP ops to factor = 2519216432\n", + " Itn Primal Obj Dual Obj Prim Inf Upper Inf Dual Inf Inf Ratio\n", + " 0 1.1920230e+08 -1.3412003e+09 2.57e+07 2.87e+05 6.35e+08 1.00e+00\n", + " 1 1.1571852e+08 -1.2680231e+09 2.46e+07 2.76e+05 6.01e+08 3.19e-03\n", + " 2 1.0763399e+08 -1.1958285e+09 2.23e+07 2.49e+05 5.68e+08 1.57e-03\n", + " 3 1.0133589e+08 -1.0337227e+09 2.05e+07 2.29e+05 4.93e+08 8.42e-04\n", + " 4 9.5290824e+07 -9.0608106e+08 1.87e+07 2.09e+05 4.34e+08 6.42e-04\n", + " 5 9.0294576e+07 -7.6397717e+08 1.73e+07 1.93e+05 3.68e+08 4.76e-04\n", + " 6 8.8132879e+07 -6.9202008e+08 1.65e+07 1.84e+05 3.35e+08 3.15e-04\n", + " 7 8.2978279e+07 -5.1584600e+08 1.49e+07 1.67e+05 2.54e+08 2.98e-04\n", + " 8 7.7696113e+07 -4.2853608e+08 1.33e+07 1.49e+05 2.13e+08 2.97e-04\n", + " 9 7.1148902e+07 -3.5118874e+08 1.13e+07 1.27e+05 1.78e+08 3.08e-04\n", + " 10 6.8780484e+07 -2.6420982e+08 1.04e+07 1.16e+05 1.39e+08 2.61e-04\n", + " 11 6.5492566e+07 -2.0601676e+08 9.08e+06 1.02e+05 1.12e+08 2.53e-04\n", + " 12 6.2645064e+07 -1.1242406e+08 8.06e+06 9.01e+04 6.96e+07 2.71e-04\n", + " 13 5.8765756e+07 -7.1019441e+07 6.88e+06 7.69e+04 5.02e+07 3.16e-04\n", + " 14 5.3116844e+07 -4.1409263e+07 5.37e+06 6.00e+04 3.59e+07 3.90e-04\n", + " 15 4.8385148e+07 -1.3806291e+07 4.27e+06 4.77e+04 2.20e+07 5.42e-04\n", + " 16 3.9854281e+07 4.6763312e+06 2.67e+06 2.98e+04 1.17e+07 9.11e-04\n", + " 17 3.1382189e+07 1.0929193e+07 1.54e+06 1.72e+04 6.89e+06 1.52e-03\n", + " 18 2.5389022e+07 1.2793808e+07 9.80e+05 1.10e+04 3.61e+06 2.77e-03\n", + " 19 2.1008595e+07 1.1752432e+07 7.13e+05 7.97e+03 2.53e+06 3.95e-03\n", + " 20 1.7657313e+07 1.0768720e+07 5.28e+05 5.90e+03 1.85e+06 5.45e-03\n", + " 21 1.5343322e+07 1.0044121e+07 4.17e+05 4.66e+03 1.52e+06 6.73e-03\n", + " 22 1.2991633e+07 8.7641097e+06 3.01e+05 3.36e+03 9.01e+05 1.14e-02\n", + " 23 1.1622666e+07 7.4000258e+06 2.54e+05 2.84e+03 6.38e+05 1.58e-02\n", + " 24 1.0932966e+07 6.2348953e+06 2.35e+05 2.63e+03 4.88e+05 2.02e-02\n", + " 25 9.9947701e+06 5.5229660e+06 2.07e+05 2.31e+03 3.73e+05 2.61e-02\n", + " 26 9.1143270e+06 4.9025081e+06 1.81e+05 2.03e+03 2.87e+05 3.35e-02\n", + " 27 8.8100665e+06 4.3460480e+06 1.73e+05 1.94e+03 2.27e+05 4.13e-02\n", + " 28 7.8777114e+06 4.0563072e+06 1.47e+05 1.64e+03 1.86e+05 5.02e-02\n", + " 29 7.3983378e+06 3.7415234e+06 1.33e+05 1.48e+03 1.39e+05 6.59e-02\n", + " 30 6.7573031e+06 3.6090500e+06 1.15e+05 1.28e+03 1.21e+05 7.57e-02\n", + " 31 6.6929904e+06 3.4599136e+06 1.13e+05 1.26e+03 9.95e+04 9.03e-02\n", + " 32 5.7869828e+06 3.4282041e+06 8.73e+04 9.76e+02 9.55e+04 9.59e-02\n", + " 33 5.6241018e+06 3.3361744e+06 8.25e+04 9.22e+02 8.12e+04 1.12e-01\n", + " 34 5.0647361e+06 3.1512626e+06 6.63e+04 7.41e+02 5.46e+04 1.64e-01\n", + " 35 4.6669257e+06 3.0938065e+06 5.51e+04 6.15e+02 4.72e+04 1.90e-01\n", + " 36 4.4780766e+06 2.9890262e+06 4.96e+04 5.55e+02 3.26e+04 2.69e-01\n", + " 37 4.2369479e+06 2.9190589e+06 4.29e+04 4.79e+02 2.45e+04 3.49e-01\n", + " 38 3.9647524e+06 2.8797369e+06 3.53e+04 3.94e+02 2.01e+04 4.18e-01\n", + " 39 3.6731355e+06 2.8581987e+06 2.70e+04 3.02e+02 1.73e+04 4.81e-01\n", + " 40 3.4657952e+06 2.8272842e+06 2.09e+04 2.34e+02 1.25e+04 6.58e-01\n", + " 41 3.3290858e+06 2.8095429e+06 1.70e+04 1.90e+02 9.75e+03 8.30e-01\n", + " 42 3.2776348e+06 2.7989243e+06 1.55e+04 1.73e+02 8.11e+03 9.87e-01\n", + " 43 3.1745606e+06 2.7891218e+06 1.25e+04 1.40e+02 6.73e+03 1.17e+00\n", + " 44 3.0817055e+06 2.7777423e+06 9.80e+03 1.10e+02 5.01e+03 1.55e+00\n", + " 45 2.9942754e+06 2.7688344e+06 7.26e+03 8.11e+01 3.68e+03 2.07e+00\n", + " 46 2.9432819e+06 2.7645751e+06 5.77e+03 6.45e+01 3.01e+03 2.50e+00\n", + " 47 2.9150374e+06 2.7618218e+06 4.94e+03 5.52e+01 2.55e+03 2.94e+00\n", + " 48 2.8614718e+06 2.7576017e+06 3.37e+03 3.77e+01 1.84e+03 4.00e+00\n", + " 49 2.8333796e+06 2.7558460e+06 2.54e+03 2.84e+01 1.52e+03 4.83e+00\n", + " 50 2.8172954e+06 2.7543991e+06 2.06e+03 2.30e+01 1.24e+03 5.97e+00\n", + " 51 2.7953328e+06 2.7531916e+06 1.41e+03 1.58e+01 1.01e+03 7.31e+00\n", + " 52 2.7864291e+06 2.7522057e+06 1.14e+03 1.28e+01 8.12e+02 9.24e+00\n", + " 53 2.7765182e+06 2.7508678e+06 8.51e+02 9.52e+00 5.73e+02 1.33e+01\n", + " 54 2.7745392e+06 2.7507092e+06 7.94e+02 8.88e+00 5.50e+02 1.39e+01\n", + " 55 2.7659089e+06 2.7496984e+06 5.46e+02 6.10e+00 4.03e+02 1.92e+01\n", + " 56 2.7609179e+06 2.7490771e+06 4.03e+02 4.51e+00 3.16e+02 2.47e+01\n", + " 57 2.7600679e+06 2.7485677e+06 3.79e+02 4.24e+00 2.48e+02 3.19e+01\n", + " 58 2.7573968e+06 2.7482358e+06 3.05e+02 3.41e+00 2.10e+02 3.77e+01\n", + " 59 2.7539205e+06 2.7476139e+06 2.09e+02 2.34e+00 1.40e+02 5.71e+01\n", + " 60 2.7520693e+06 2.7474641e+06 1.58e+02 1.77e+00 1.24e+02 6.45e+01\n", + " 61 2.7498542e+06 2.7472933e+06 9.71e+01 1.08e+00 1.05e+02 7.68e+01\n", + " 62 2.7486731e+06 2.7472227e+06 6.36e+01 7.10e-01 9.66e+01 8.45e+01\n", + " 63 2.7483709e+06 2.7471106e+06 5.48e+01 6.12e-01 8.20e+01 1.02e+02\n", + " 64 2.7477281e+06 2.7469427e+06 3.68e+01 4.12e-01 6.23e+01 1.40e+02\n", + " 65 2.7472282e+06 2.7468812e+06 2.35e+01 2.63e-01 5.59e+01 1.58e+02\n", + " 66 2.7470374e+06 2.7468404e+06 1.84e+01 2.06e-01 5.16e+01 1.74e+02\n", + " 67 2.7469042e+06 2.7466878e+06 1.49e+01 1.66e-01 3.59e+01 2.70e+02\n", + " 68 2.7466881e+06 2.7465449e+06 9.87e+00 1.10e-01 2.38e+01 4.38e+02\n", + " 69 2.7466429e+06 2.7465319e+06 8.92e+00 9.97e-02 2.29e+01 4.59e+02\n", + " 70 2.7465991e+06 2.7465245e+06 8.00e+00 8.95e-02 2.23e+01 4.71e+02\n", + " 71 2.7464576e+06 2.7464708e+06 5.02e+00 5.62e-02 1.84e+01 5.90e+02\n", + " 72 2.7464332e+06 2.7464586e+06 4.52e+00 5.05e-02 1.75e+01 6.24e+02\n", + " 73 2.7464322e+06 2.7464584e+06 4.51e+00 5.04e-02 1.75e+01 6.25e+02\n", + " 74 2.7463497e+06 2.7463849e+06 2.86e+00 3.20e-02 1.24e+01 9.35e+02\n", + " 75 2.7462932e+06 2.7463604e+06 1.82e+00 2.03e-02 1.08e+01 1.10e+03\n", + " 76 2.7462714e+06 2.7463537e+06 1.42e+00 1.59e-02 1.04e+01 1.15e+03\n", + " 77 2.7462402e+06 2.7463099e+06 8.55e-01 9.56e-03 7.55e+00 1.71e+03\n", + " 78 2.7462356e+06 2.7463071e+06 7.86e-01 8.79e-03 7.39e+00 1.75e+03\n", + " 79 2.7462324e+06 2.7462836e+06 7.38e-01 8.24e-03 5.98e+00 2.26e+03\n", + " 80 2.7462319e+06 2.7462834e+06 7.34e-01 8.21e-03 5.97e+00 2.27e+03\n", + " 81 2.7462319e+06 2.7462826e+06 7.34e-01 8.21e-03 5.93e+00 2.29e+03\n", + " 82 2.7462332e+06 2.7462826e+06 7.08e-01 7.92e-03 5.92e+00 2.21e+03\n", + " 83 2.7462186e+06 2.7462361e+06 5.21e-01 5.82e-03 3.29e+00 4.63e+03\n", + " 84 2.7462164e+06 2.7462355e+06 4.89e-01 5.47e-03 3.25e+00 4.63e+03\n", + " 85 2.7462164e+06 2.7462354e+06 4.89e-01 5.46e-03 3.25e+00 4.64e+03\n", + " 86 2.7462158e+06 2.7462352e+06 4.85e-01 5.43e-03 3.24e+00 4.67e+03\n", + " 87 2.7462158e+06 2.7462352e+06 4.85e-01 5.43e-03 3.24e+00 4.67e+03\n", + " 88 2.7462146e+06 2.7462351e+06 4.75e-01 5.31e-03 3.23e+00 4.69e+03\n", + " 89 2.7462137e+06 2.7462344e+06 4.64e-01 5.19e-03 3.19e+00 4.75e+03\n", + " 90 2.7462137e+06 2.7462344e+06 4.64e-01 5.19e-03 3.19e+00 4.75e+03\n", + " 91 2.7462135e+06 2.7462343e+06 4.62e-01 5.16e-03 3.19e+00 4.76e+03\n", + " 92 2.7462135e+06 2.7462325e+06 4.61e-01 5.16e-03 3.10e+00 4.92e+03\n", + " 93 2.7462132e+06 2.7462322e+06 4.58e-01 5.12e-03 3.08e+00 4.95e+03\n", + " 94 2.7462124e+06 2.7462309e+06 4.50e-01 5.02e-03 3.01e+00 5.08e+03\n", + " 95 2.7462119e+06 2.7462297e+06 4.44e-01 4.96e-03 2.95e+00 5.20e+03\n", + " 96 2.7462112e+06 2.7462281e+06 4.36e-01 4.87e-03 2.87e+00 5.36e+03\n", + " 97 2.7462100e+06 2.7462277e+06 4.24e-01 4.74e-03 2.85e+00 5.41e+03\n", + " 98 2.7461950e+06 2.7462101e+06 2.63e-01 2.94e-03 1.98e+00 8.30e+03\n", + " 99 2.7461885e+06 2.7461900e+06 1.99e-01 2.22e-03 1.02e+00 1.80e+04\n", + " 100 2.7461774e+06 2.7461805e+06 9.83e-02 1.10e-03 6.05e-01 3.14e+04\n", + " 101 2.7461726e+06 2.7461760e+06 5.41e-02 6.05e-04 4.12e-01 4.77e+04\n", + " 102 2.7461697e+06 2.7461735e+06 2.83e-02 3.16e-04 3.01e-01 6.77e+04\n", + " 103 2.7461682e+06 2.7461728e+06 1.50e-02 1.67e-04 2.70e-01 7.66e+04\n", + " 104 2.7461675e+06 2.7461717e+06 8.79e-03 9.80e-05 2.26e-01 9.48e+04\n", + " 105 2.7461671e+06 2.7461701e+06 5.12e-03 5.70e-05 1.56e-01 1.50e+05\n", + " 106 2.7461668e+06 2.7461693e+06 2.86e-03 3.17e-05 1.21e-01 2.04e+05\n", + " 107 2.7461666e+06 2.7461680e+06 1.65e-03 1.82e-05 6.62e-02 4.27e+05\n", + " 108 2.7461665e+06 2.7461675e+06 1.38e-03 1.42e-05 4.77e-02 6.36e+05\n", + " 109 2.7461664e+06 2.7461672e+06 9.73e-04 9.82e-06 3.82e-02 8.23e+05\n", + " 110 2.7461663e+06 2.7461670e+06 7.20e-04 4.73e-06 3.04e-02 1.08e+06\n", + " 111 2.7461663e+06 2.7461669e+06 2.94e-04 1.70e-06 2.38e-02 1.45e+06\n", + " 112 2.7461663e+06 2.7461667e+06 1.47e-04 7.51e-07 1.65e-02 2.31e+06\n", + " 113 2.7461662e+06 2.7461665e+06 1.02e-04 4.77e-07 9.92e-03 4.47e+06\n", + " 114 2.7461662e+06 2.7461664e+06 7.18e-05 2.08e-07 6.03e-03 8.37e+06\n", + " 115 2.7461662e+06 2.7461663e+06 5.89e-05 1.55e-07 3.57e-03 1.57e+07\n", + " 116 2.7461662e+06 2.7461663e+06 1.77e-04 7.07e-08 1.97e-03 3.27e+07\n", + " 117 2.7461662e+06 2.7461663e+06 7.46e-05 2.15e-08 1.26e-03 5.34e+07\n", + " 118 2.7461662e+06 2.7461662e+06 7.38e-05 8.65e-09 9.03e-04 8.06e+07\n", + "Barrier time = 39.96 sec. (36506.31 ticks)\n", + "Parallel mode: deterministic, using up to 4 threads for concurrent optimization:\n", + " * Starting dual Simplex on 1 thread...\n", + " * Starting primal Simplex on 1 thread...\n", + "\n", + "Dual crossover.\n", + " Dual: Fixing 211446 variables.\n", + " 211445 DMoves: Infeasibility 1.31873792e+01 Objective 2.74616625e+06\n", + " 210634 DMoves: Infeasibility 1.17484415e+01 Objective 2.74616623e+06\n", + " 209351 DMoves: Infeasibility 1.16345139e+01 Objective 2.74616615e+06\n", + " 207902 DMoves: Infeasibility 8.31640254e+00 Objective 2.74616611e+06\n", + " 206524 DMoves: Infeasibility 8.10579546e+00 Objective 2.74616614e+06\n", + " 205225 DMoves: Infeasibility 8.10162470e+00 Objective 2.74616614e+06\n", + " 203933 DMoves: Infeasibility 8.09837090e+00 Objective 2.74616613e+06\n", + " 202872 DMoves: Infeasibility 8.04223929e+00 Objective 2.74616614e+06\n", + " 201686 DMoves: Infeasibility 8.03746980e+00 Objective 2.74616614e+06\n", + " 200628 DMoves: Infeasibility 8.04395205e+00 Objective 2.74616619e+06\n", + " 199496 DMoves: Infeasibility 8.03956042e+00 Objective 2.74616619e+06\n", + " 198991 DMoves: Infeasibility 8.08786031e+00 Objective 2.74616619e+06\n", + " 198436 DMoves: Infeasibility 8.08129774e+00 Objective 2.74616619e+06\n", + " 197981 DMoves: Infeasibility 8.63536288e+00 Objective 2.74616623e+06\n", + " 197522 DMoves: Infeasibility 8.67089986e+00 Objective 2.74616592e+06\n", + " 197110 DMoves: Infeasibility 8.66076204e+00 Objective 2.74616593e+06\n", + " Elapsed crossover time = 18.53 sec. (10000.03 ticks, 192551 DMoves)\n", + " 192318 DMoves: Infeasibility 8.29884224e+00 Objective 2.74616563e+06\n", + " 187705 DMoves: Infeasibility 7.60462870e+00 Objective 2.74616506e+06\n", + " 185010 DMoves: Infeasibility 7.60443474e+00 Objective 2.74616506e+06\n", + " 183573 DMoves: Infeasibility 7.60443238e+00 Objective 2.74616506e+06\n", + " 180550 DMoves: Infeasibility 7.60412520e+00 Objective 2.74616507e+06\n", + " 178767 DMoves: Infeasibility 7.60207628e+00 Objective 2.74616495e+06\n", + " 177147 DMoves: Infeasibility 7.60207628e+00 Objective 2.74616495e+06\n", + " 174047 DMoves: Infeasibility 7.60121010e+00 Objective 2.74616494e+06\n", + " 172236 DMoves: Infeasibility 7.60121010e+00 Objective 2.74616494e+06\n", + " 170339 DMoves: Infeasibility 7.60121010e+00 Objective 2.74616494e+06\n", + " 167531 DMoves: Infeasibility 7.57157835e+00 Objective 2.74616494e+06\n", + " 165576 DMoves: Infeasibility 7.57157835e+00 Objective 2.74616494e+06\n", + " 163769 DMoves: Infeasibility 7.57157842e+00 Objective 2.74616494e+06\n", + " 162468 DMoves: Infeasibility 7.57157842e+00 Objective 2.74616494e+06\n", + " 159674 DMoves: Infeasibility 7.57156851e+00 Objective 2.74616504e+06\n", + " 158143 DMoves: Infeasibility 7.57156851e+00 Objective 2.74616504e+06\n", + " 156447 DMoves: Infeasibility 7.57156851e+00 Objective 2.74616505e+06\n", + " 155169 DMoves: Infeasibility 7.57156851e+00 Objective 2.74616505e+06\n", + " 152163 DMoves: Infeasibility 7.57155316e+00 Objective 2.74616505e+06\n", + " 150560 DMoves: Infeasibility 7.57155316e+00 Objective 2.74616505e+06\n", + " 148710 DMoves: Infeasibility 7.57155316e+00 Objective 2.74616505e+06\n", + " 147428 DMoves: Infeasibility 7.57155316e+00 Objective 2.74616505e+06\n", + " 144146 DMoves: Infeasibility 7.57153050e+00 Objective 2.74616504e+06\n", + " 142584 DMoves: Infeasibility 7.57153050e+00 Objective 2.74616504e+06\n", + " 140969 DMoves: Infeasibility 7.57153050e+00 Objective 2.74616504e+06\n", + " 138598 DMoves: Infeasibility 7.54336439e+00 Objective 2.74616492e+06\n", + " 136236 DMoves: Infeasibility 7.54336439e+00 Objective 2.74616492e+06\n", + " 134392 DMoves: Infeasibility 7.54326602e+00 Objective 2.74616505e+06\n", + " 132382 DMoves: Infeasibility 7.54326598e+00 Objective 2.74616505e+06\n", + " 130127 DMoves: Infeasibility 7.54307307e+00 Objective 2.74616511e+06\n", + " 128337 DMoves: Infeasibility 7.54304288e+00 Objective 2.74616547e+06\n", + " 126845 DMoves: Infeasibility 7.54304286e+00 Objective 2.74616547e+06\n", + " 123938 DMoves: Infeasibility 7.51563003e+00 Objective 2.74616544e+06\n", + " 122006 DMoves: Infeasibility 7.51563003e+00 Objective 2.74616544e+06\n", + " 120177 DMoves: Infeasibility 7.51560429e+00 Objective 2.74616543e+06\n", + " 119035 DMoves: Infeasibility 7.51560429e+00 Objective 2.74616543e+06\n", + " 115399 DMoves: Infeasibility 7.51560462e+00 Objective 2.74616545e+06\n", + " 113257 DMoves: Infeasibility 7.51560459e+00 Objective 2.74616545e+06\n", + " 111755 DMoves: Infeasibility 7.51555301e+00 Objective 2.74616542e+06\n", + " 108725 DMoves: Infeasibility 7.51546101e+00 Objective 2.74616534e+06\n", + " 106929 DMoves: Infeasibility 7.51546101e+00 Objective 2.74616535e+06\n", + " 104968 DMoves: Infeasibility 7.51389743e+00 Objective 2.74616533e+06\n", + " 102776 DMoves: Infeasibility 7.51365098e+00 Objective 2.74616557e+06\n", + " 100220 DMoves: Infeasibility 7.51365098e+00 Objective 2.74616557e+06\n", + " 98033 DMoves: Infeasibility 7.51365098e+00 Objective 2.74616557e+06\n", + " 96640 DMoves: Infeasibility 7.51350821e+00 Objective 2.74616573e+06\n", + " 94975 DMoves: Infeasibility 7.51315592e+00 Objective 2.74616592e+06\n", + " 92883 DMoves: Infeasibility 7.51313470e+00 Objective 2.74616593e+06\n", + " 91069 DMoves: Infeasibility 7.51308073e+00 Objective 2.74616592e+06\n", + " 89063 DMoves: Infeasibility 7.51299366e+00 Objective 2.74616600e+06\n", + " 87206 DMoves: Infeasibility 7.51292783e+00 Objective 2.74616599e+06\n", + " 85362 DMoves: Infeasibility 7.51265801e+00 Objective 2.74616598e+06\n", + " 83135 DMoves: Infeasibility 7.51265731e+00 Objective 2.74616598e+06\n", + " 81028 DMoves: Infeasibility 7.51258277e+00 Objective 2.74616594e+06\n", + " 79113 DMoves: Infeasibility 7.51252750e+00 Objective 2.74616595e+06\n", + " 77186 DMoves: Infeasibility 7.51247185e+00 Objective 2.74616594e+06\n", + " 74628 DMoves: Infeasibility 7.51247027e+00 Objective 2.74616594e+06\n", + " 72655 DMoves: Infeasibility 7.51246059e+00 Objective 2.74616595e+06\n", + " 70369 DMoves: Infeasibility 7.51245597e+00 Objective 2.74616595e+06\n", + " 67980 DMoves: Infeasibility 7.51230015e+00 Objective 2.74616596e+06\n", + " 65515 DMoves: Infeasibility 7.50638685e+00 Objective 2.74616597e+06\n", + " 63218 DMoves: Infeasibility 7.50622812e+00 Objective 2.74616596e+06\n", + " 61012 DMoves: Infeasibility 7.50583888e+00 Objective 2.74616597e+06\n", + " 58922 DMoves: Infeasibility 7.50570215e+00 Objective 2.74616596e+06\n", + " 56765 DMoves: Infeasibility 7.50417594e+00 Objective 2.74616599e+06\n", + " 54809 DMoves: Infeasibility 7.50401940e+00 Objective 2.74616600e+06\n", + " 52535 DMoves: Infeasibility 7.50381120e+00 Objective 2.74616604e+06\n", + " 50300 DMoves: Infeasibility 7.50373871e+00 Objective 2.74616603e+06\n", + " 47808 DMoves: Infeasibility 7.45524507e+00 Objective 2.74616600e+06\n", + " Elapsed crossover time = 39.32 sec. (20022.30 ticks, 47808 DMoves)\n", + " 45673 DMoves: Infeasibility 7.45524555e+00 Objective 2.74616600e+06\n", + " 43525 DMoves: Infeasibility 7.45520408e+00 Objective 2.74616601e+06\n", + " 41437 DMoves: Infeasibility 7.45510869e+00 Objective 2.74616605e+06\n", + " 39685 DMoves: Infeasibility 7.45510870e+00 Objective 2.74616605e+06\n", + " 37485 DMoves: Infeasibility 7.45508769e+00 Objective 2.74616605e+06\n", + " 35554 DMoves: Infeasibility 7.45508719e+00 Objective 2.74616605e+06\n", + " 33878 DMoves: Infeasibility 7.45507270e+00 Objective 2.74616605e+06\n", + " 31772 DMoves: Infeasibility 7.39411834e+00 Objective 2.74616605e+06\n", + " 29482 DMoves: Infeasibility 7.39391584e+00 Objective 2.74616604e+06\n", + " 27407 DMoves: Infeasibility 7.39391584e+00 Objective 2.74616604e+06\n", + " 25468 DMoves: Infeasibility 7.39377860e+00 Objective 2.74616600e+06\n", + " 23181 DMoves: Infeasibility 7.39360614e+00 Objective 2.74616596e+06\n", + " 20868 DMoves: Infeasibility 7.39348057e+00 Objective 2.74616596e+06\n", + " 18688 DMoves: Infeasibility 7.39297458e+00 Objective 2.74616578e+06\n", + " 16366 DMoves: Infeasibility 7.39297458e+00 Objective 2.74616578e+06\n", + " 14261 DMoves: Infeasibility 7.39297457e+00 Objective 2.74616578e+06\n", + " 12100 DMoves: Infeasibility 7.39292263e+00 Objective 2.74616580e+06\n", + " 9840 DMoves: Infeasibility 7.39292263e+00 Objective 2.74616580e+06\n", + " 7948 DMoves: Infeasibility 7.39240184e+00 Objective 2.74616594e+06\n", + " 6114 DMoves: Infeasibility 7.39240184e+00 Objective 2.74616594e+06\n", + " 4183 DMoves: Infeasibility 7.39020995e+00 Objective 2.74616579e+06\n", + " 2256 DMoves: Infeasibility 7.39020995e+00 Objective 2.74616579e+06\n", + " 602 DMoves: Infeasibility 7.39020995e+00 Objective 2.74616579e+06\n", + " 0 DMoves: Infeasibility 7.39020995e+00 Objective 2.74616579e+06\n", + " Dual: Pushed 86094, exchanged 125337.\n", + " Primal: Fixing 10361 variables.\n", + " 10360 PMoves: Infeasibility 4.69992852e-04 Objective 2.74616623e+06\n", + " 4167 PMoves: Infeasibility 1.12840419e-04 Objective 2.74616624e+06\n", + " 0 PMoves: Infeasibility 6.44363122e-05 Objective 2.74616625e+06\n", + " Primal: Pushed 7763, exchanged 2598.\n", + "Elapsed time = 92.79 sec. (63321.84 ticks, 1 iterations)\n", + "\n", + "Iteration log . . .\n", + "Iteration: 1 Dual objective = 2746165.787757\n", + "Removing shift (5).\n", + "Iteration: 418 Dual objective = 2746166.219399\n", + "\n", + "Dual simplex solved model.\n", + "\n", + "Total crossover time = 81.39 sec. (27946.81 ticks)\n", + "\n", + "Total time on 4 threads = 125.67 sec. (66770.41 ticks)\n", + "\n", + "--- LP status (1): optimal.\n", + "--- Cplex Time: 125.69sec (det. 66774.79 ticks)\n", + "\n", + "\n", + "Optimal solution found\n", + "Simplex iterations after crossover: 125\n", + "Objective: 2746166.219400\n", + "\n", + "--- Reading solution for model MESSAGE_LP\n", + "--- Executing after solve: elapsed 0:04:16.492\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_AFR\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.645E-04, 3.764E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 2.505E-04, 4.643E+00] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 2.257E-08, 3.925E+03]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:22.804\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 5.2296682234E+03 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:22.873\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_EEU\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.289E-04, 1.678E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 2.711E-04, 6.713E+00] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 3.554E-06, 2.591E+03]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:22.877\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 3.1775653771E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:22.942\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_LAM\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 430 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.468E-04, 2.334E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 8.477E-04, 1.594E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 3.954E-08, 9.075E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:22.946\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 2.4576810434E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.011\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_MEA\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.499E-04, 2.446E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 1.043E-03, 1.962E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 3.755E-08, 7.255E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.015\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 3.8236277568E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.081\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_NAM\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.013E-04, 1.796E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 3.202E-03, 4.851E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 9.559E-05, 2.593E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.085\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 3.3483967195E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.149\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_SAS\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 430 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 8.277E-04, 1.638E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 1.493E-03, 1.376E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 3.241E-08, 1.529E+03]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.153\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 4.6790248313E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.219\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_WEU\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 6.990E-04, 1.873E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 1.602E-03, 4.265E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 1.910E-04, 3.782E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.223\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 2.8538977694E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.289\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_FSU\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.185E-04, 2.596E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 5.813E-04, 9.428E+00] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 1.296E-06, 1.611E+03]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.293\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 5.4199784429E+03 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.359\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_PAO\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 6.790E-04, 1.666E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 6.397E-04, 1.447E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 2.344E-04, 9.282E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.363\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 1.0799187077E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.429\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_PAS\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 430 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.497E-04, 1.783E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 1.034E-03, 2.443E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 5.526E-08, 5.884E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.433\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 2.4762456789E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.499\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_CHN\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 418 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 7.775E-04, 1.400E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 2.537E-03, 5.945E+01] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 2.564E-08, 2.628E+02]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.504\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 4.5673175192E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.571\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + "--- Generating NLP model MESSAGE_MACRO\n", + "--- MESSAGE-MACRO_run.gms(5482) 2216 Mb\n", + "--- LOOPS iteration = 1\n", + "--- * = R12_RCPA\n", + "--- 266 rows 279 columns 627 non-zeroes\n", + "--- 430 nl-code 86 nl-non-zeroes\n", + "--- Range statistics (absolute non-zero finite values)\n", + "--- RHS [min, max] : [ 8.181E-04, 1.681E+04] - Zero values observed as well\n", + "--- Bound [min, max] : [ 1.763E-04, 2.720E+00] - Zero values observed as well\n", + "--- Matrix [min, max] : [ 4.453E-08, 5.623E+03]\n", + "--- MESSAGE-MACRO_run.gms(5482) 2214 Mb\n", + "--- Executing CONOPT (Solvelink=2): elapsed 0:04:23.575\n", + "\n", + "CONOPT 4 47.6.0 c2de9d6d Sep 12, 2024 LEG x86 64bit/Linux \n", + "\n", + "--- *** This solver runs with a demo license. No commercial use.\n", + "\n", + "Reading parameter(s) from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + ">> LFILOG 50\n", + ">> LFILOS 50\n", + "Finished reading from \"/home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/conopt.opt\"\n", + "\n", + " \n", + " \n", + " C O N O P T version 4.35\n", + " Copyright (C) GAMS Software GmbH\n", + " GAMS Development Corporation\n", + " \n", + " \n", + " The user model has 266 constraints and 279 variables\n", + " with 627 Jacobian elements, 86 of which are nonlinear.\n", + " The Hessian of the Lagrangian has 84 elements on the diagonal,\n", + " 181 elements below the diagonal, and 84 nonlinear variables.\n", + " \n", + " Iter Phase Ninf Infeasibility RGmax NSB Step InItr MX OK\n", + " 0 0 5.1771048055E+04 (Input point)\n", + " \n", + " ** An equation in the pre-triangular part of the model cannot\n", + " be solved because the critical variable is at a bound.\n", + " \n", + " \n", + " The pre-triangular part of the model has 25 constraints and 3 variables.\n", + " \n", + " ** Infeasible solution. The Preprocessor has determined that the model\n", + " is infeasible.\n", + " \n", + "--- Reading solution for model MESSAGE_MACRO\n", + "--- Executing after solve: elapsed 0:04:23.643\n", + "--- MESSAGE-MACRO_run.gms(5161) 2214 Mb\n", + " +++ Convergence criteria satisfied after the first iteration +++\n", + " +++ Natural convergence achieved +++\n", + "--- MESSAGE-MACRO_run.gms(5675) 2214 Mb\n", + "--- GDX File (execute_unload) /home/lukas/environments/ssp2/lib/python3.10/site-packages/message_ix/model/output/MsgOutput_MESSAGEix_ssp2_baseline_3012_no_accounting_2_macro_test_to_confirm_MACRO_converges.gdx\n", + "--- MESSAGE-MACRO_run.gms(5683) 2214 Mb\n", + " +++ End of MESSAGEix-MACRO run - have a nice day! +++\n", + "*** Status: Normal completion\n", + "--- Job MESSAGE-MACRO_run.gms Stop 01/08/26 16:10:24 elapsed 0:04:27.820\n" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/run script and output/MESSAGE-MACRO_run_lst.ipynb b/run script and output/MESSAGE-MACRO_run_lst.ipynb new file mode 100644 index 000000000..e69de29bb diff --git a/run script and output/Snapshot_add_macro_clean.ipynb b/run script and output/Snapshot_add_macro_clean.ipynb new file mode 100644 index 000000000..8c9aa2020 --- /dev/null +++ b/run script and output/Snapshot_add_macro_clean.ipynb @@ -0,0 +1,263 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "c79eed10-1889-40d4-a747-c7e8ab94b3fc", + "metadata": {}, + "source": [ + "### Connect database, load packages" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "ac563be9-f19f-4f98-a542-47863fd681b1", + "metadata": {}, + "outputs": [], + "source": [ + "import ixmp as ix" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "5bba28ea", + "metadata": {}, + "outputs": [], + "source": [ + "import message_ix\n", + "from message_ix import make_df\n", + "from message_ix import Scenario\n", + "import pandas as pd" + ] + }, + { + "cell_type": "markdown", + "id": "a0f77fb1", + "metadata": {}, + "source": [ + "### Connect database" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2e3b0996", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2026-01-08 15:56:45,897 INFO at.ac.iiasa.ixmp.Platform:165 - Welcome to the IX modeling platform!\n", + "2026-01-08 15:56:45,899 INFO at.ac.iiasa.ixmp.Platform:166 - connected to database 'jdbc:hsqldb:file:/home/lukas/.local/share/ixmp/ssp2/default' (user: ixmp)...\n" + ] + } + ], + "source": [ + "mp = ix.Platform(\"ssp2\")" + ] + }, + { + "cell_type": "markdown", + "id": "9b44cf85", + "metadata": {}, + "source": [ + "### Load and clone original scneario\n", + "\n", + "The original scenario is: SSP_SSP2_v6.3_ES_baseline_v1.xlsx" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "349b0807", + "metadata": {}, + "outputs": [], + "source": [ + "#load original scenario with solution\n", + "\n", + "base_scen = message_ix.Scenario(mp, model=\"MESSAGEix\", scenario=\"ssp2_baseline_2010\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "8b454767", + "metadata": {}, + "outputs": [], + "source": [ + "#clone scenario\n", + "\n", + "scen = base_scen.clone(\n", + " model=\"MESSAGEix\",\n", + " scenario = \"ssp2_baseline_3012_no_accounting_2\",\n", + " annotation = \"scenario to work on\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "ae18550e", + "metadata": {}, + "source": [ + "### Add MACRO" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2696a86e", + "metadata": {}, + "outputs": [], + "source": [ + "#load excel sheet with macroeconomic data for calibration process\n", + "\n", + "data = \"ssp2_baseline_macro_calibration_parameters.xlsx\"" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "7d9061b7", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "======================= WARNING =======================\n", + "\n", + "You are using *experimental*, incomplete features from\n", + "`message_ix.macro`—please exercise caution. Read more:\n", + "- https://github.com/iiasa/message_ix/issues/317\n", + "- https://github.com/iiasa/message_ix/issues/318\n", + "- https://github.com/iiasa/message_ix/issues/319\n", + "- https://github.com/iiasa/message_ix/issues/320\n", + "\n", + "======================================================\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n", + "Growing: n = 4 physical ID = 4\n", + "Growing: n = 5 physical ID = 5\n", + "Growing: n = 6 physical ID = 6\n", + "Growing: n = 7 physical ID = 7\n", + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n", + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2026-01-08 16:01:43,421 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'OBJ' not found in gdx!\n", + "2026-01-08 16:01:43,423 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'EXT' not found in gdx!\n", + "2026-01-08 16:01:43,423 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'STOCK' not found in gdx!\n", + "2026-01-08 16:01:43,424 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'CAP_NEW' not found in gdx!\n", + "2026-01-08 16:01:43,424 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'CAP' not found in gdx!\n", + "2026-01-08 16:01:43,424 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'ACT' not found in gdx!\n", + "2026-01-08 16:01:43,425 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'EMISS' not found in gdx!\n", + "2026-01-08 16:01:43,425 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'LAND' not found in gdx!\n", + "2026-01-08 16:01:43,425 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'REL' not found in gdx!\n", + "2026-01-08 16:01:43,426 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'DEMAND' not found in gdx!\n", + "2026-01-08 16:01:43,426 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'PRICE_COMMODITY' not found in gdx!\n", + "2026-01-08 16:01:43,427 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'PRICE_EMISSION' not found in gdx!\n", + "2026-01-08 16:01:43,427 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'COST_NODAL' not found in gdx!\n", + "2026-01-08 16:01:43,427 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'COST_NODAL_NET' not found in gdx!\n", + "2026-01-08 16:01:43,431 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'I' not found in gdx!\n", + "2026-01-08 16:01:43,499 ERROR at.ac.iiasa.ixmp.objects.Scenario:1649 - equation 'RESOURCE_HORIZON' not found in gdx!\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n", + "Growing: n = 4 physical ID = 4\n", + "Growing: n = 5 physical ID = 5\n", + "Growing: n = 6 physical ID = 6\n", + "Growing: n = 7 physical ID = 7\n", + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n", + "--- Warning: The GAMS version [47.6.0] differs from the API version [24.8.3].\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2026-01-08 16:10:43,640 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'I' not found in gdx!\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#try adding and calibrating the new macroeconomic model to the MESSAGE model and scenario\n", + "\n", + "scen.add_macro(data=data)" + ] + }, + { + "cell_type": "markdown", + "id": "5239a87b", + "metadata": {}, + "source": [ + "### Close DB" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "f8abfcd5", + "metadata": {}, + "outputs": [], + "source": [ + "mp.close_db()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "159ad44e", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "ssp2", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/run script and output/ssp2_baseline_macro_calibration_parameters.xlsx b/run script and output/ssp2_baseline_macro_calibration_parameters.xlsx new file mode 100644 index 000000000..b491562b2 Binary files /dev/null and b/run script and output/ssp2_baseline_macro_calibration_parameters.xlsx differ