Skip to content

Commit

Permalink
Update the notation of new items in models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
behnam-zakeri committed Oct 17, 2024
1 parent 9bbeaa0 commit e509494
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions message_ix/model/MESSAGE/model_core.gms
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Variables
* =========================================================================== ======================================================================================================
*
* .. warning::
* Please be aware that transitioning from one period length to another for consecutive periods may result in false values of :math:`\text{PRICE_EMISSION}`.
* Please be aware that transitioning from one period length to another for consecutive periods may result in false values of :math:`\text{PRICE_EMISSION}`.
* Please see `this issue <https://github.com/iiasa/message_ix/issues/723>`_ for further information. We are currently working on a fix.
***

Expand Down Expand Up @@ -426,7 +426,7 @@ COST_ACCOUNTING_NODAL(node, year)..
+ SUM(relation$( relation_cost(relation,node,year) ),
relation_cost(relation,node,year) * REL(relation,node,year) )
* cost terms associated with linear relations at the sub-annual time slice level
+ SUM((relation,time)$( relation_cost(relation,node,year) AND
+ SUM((relation,time)$( relation_cost_time(relation,node,year,time) AND
(map_relation_time(relation,node,year,time) OR map_relation_year(relation,node,year,time) ) ),
relation_cost_time(relation,node,year,time) * REL_TIME(relation,node,year,time ) )
* implementation of slack variables for constraints to aid in debugging
Expand Down
30 changes: 30 additions & 0 deletions message_ix/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ def initialize(cls, scenario):
_set("cat_tec", "type_tec t")
_set("cat_year", "type_year y")
_set("is_capacity_factor", "nl t yv ya h")
_set("is_relation_lower_time", "r nr yr h")
_set("is_relation_upper_time", "r nr yr h")
_set("level_renewable", "l")
_set("level_resource", "l")
_set("level_stocks", "l")
Expand Down Expand Up @@ -469,11 +471,15 @@ def initialize(cls, scenario):
par("ref_new_capacity", "nl t yv")
par("ref_relation", "r nr yr")
par("relation_activity", "r nr yr nl t ya m")
par("relation_activity_time", "r nr yr nl t ya m h")
par("relation_cost", "r nr yr")
par("relation_cost_time", "r nr yr h")
par("relation_lower", "r nr yr")
par("relation_lower_time", "r nr yr h")
par("relation_new_capacity", "r nr yr t")
par("relation_total_capacity", "r nr yr t")
par("relation_upper", "r nr yr")
par("relation_upper_time", "r nr yr h")
par("reliability_factor", "n t ya c l h q")
par("renewable_capacity_factor", "n c g l y")
par("renewable_potential", "n c g l y")
Expand Down Expand Up @@ -568,6 +574,11 @@ def initialize(cls, scenario):
"r nr yr",
"Auxiliary variable for left-hand side of user-defined relations",
)
var(
"REL_TIME",
"r nr yr",
"Time-dependent auxiliary variable for left-hand side of user-defined relations",
)
var(
"REN",
"n t c g y h",
Expand Down Expand Up @@ -832,6 +843,25 @@ def initialize(cls, scenario):
"",
"Auxiliary equation to simplify the implementation of relations",
)
equ(
"RELATION_EQUIVALENCE_TIME",
"", "time dependent auxiliary equation to simplify the implementation of relations",
)
equ(
"RELATION_EQUIVALENCE_YEAR",
"",
"time dependent auxiliary equation to simplify the implementation of relations at"
" the year level",
)
equ(
"RELATION_CONSTRAINT_UP_TIME",
"",
"time dependentupper bound of relations (linear constraints)",
)
equ(
"RELATION_CONSTRAINT_LO_TIME",
"",
"time dependent lower bound of relations (linear constraints)")
equ(
"RENEWABLES_CAPACITY_REQUIREMENT",
"",
Expand Down

0 comments on commit e509494

Please sign in to comment.