You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RELEASE_NOTES.rst
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,24 @@
1
1
Next release
2
2
============
3
3
4
+
Migration notes
5
+
---------------
6
+
7
+
Adjust any imports like the following:
8
+
9
+
.. code-block:: python
10
+
11
+
from message_ix.models importDIMS, Item, MACRO, MESSAGE, MESSAGE_MACRO
12
+
13
+
…to:
14
+
15
+
.. code-block:: python
16
+
17
+
from message_ix.common importDIMS, Item
18
+
from message_ix.macro importMACRO
19
+
from message_ix.message importMESSAGE
20
+
from message_ix.message_macro importMESSAGE_MACRO
21
+
4
22
All changes
5
23
-----------
6
24
@@ -20,6 +38,13 @@ All changes
20
38
- Revise :ref:`equation_commodity_balance_aux` to include input and output flows based on |CAP| and |CAP_NEW|.
21
39
- New :class:`.MESSAGE` / :meth:`.Scenario.solve` option :py:`cap_comm=True` to enable this representation.
22
40
41
+
- The former module :py:`message_ix.models` is split to distinct submodules (:pull:`972`):
42
+
43
+
- :mod:`message_ix.common` includes :class:`.GAMSModel` and related code.
44
+
- :mod:`message_ix.macro` includes :class:`.MACRO`.
45
+
- :mod:`message_ix.message` includes :class:`.MESSAGE`.
46
+
- :mod:`message_ix.message_macro` includes :class:`.MESSAGE_MACRO`.
47
+
23
48
- Document the :ref:`minimum version of Java <install-java>` required for :class:`ixmp.JDBCBackend <ixmp.backend.jdbc.JDBCBackend>` (:pull:`962`).
24
49
- Improve type hinting (:pull:`963`).
25
50
@@ -61,7 +86,7 @@ Users **should**:
61
86
All changes
62
87
-----------
63
88
64
-
- Some MESSAGEix :doc:`tutorials <tutorials>` are runnable with the :class:`.IXMP4Backend` introduced in :mod:`ixmp` version 3.11 (:pull:`894`, :pull:`941`).
89
+
- Some MESSAGEix :doc:`tutorials <tutorials>` are runnable with the :class:`~ixmp.backend.ixmp4.IXMP4Backend` introduced in :mod:`ixmp` version 3.11 (:pull:`894`, :pull:`941`).
65
90
See `Support roadmap for ixmp4 <https://github.com/iiasa/message_ix/discussions/939>`__ for details.
66
91
- Add the :py:`concurrent=...` model option to :class:`.MACRO` (:pull:`808`).
67
92
- Adjust use of :ref:`type_tec <mapping-sets>` in :ref:`equation_emission_equivalence` (:pull:`930`, :issue:`929`, :pull:`935`).
@@ -174,7 +199,7 @@ Migration notes
174
199
NOTE: this may result in changes to the solution.
175
200
In order to use the previous default `lpmethod`, the user-specific default setting can be set through the user's ixmp configuration file.
176
201
Alternatively, the `lpmethod` can be specified directly as an argument when solving a scenario.
177
-
Both of these configuration methods are further explained :meth:`here <message_ix.models.GAMSModel>`.
202
+
Both of these configuration methods are further documented at :class:`.GAMSModel`.
178
203
179
204
- The dimensionality of one set and two parameters (``map_tec_storage``, ``storage_initial``, and ``storage_self_discharge``) are extended to allow repesentation of the mode of operation of storage technologies and the temporal level of storage containers.
180
205
If these items are already populated with data in a Scenario, this data will be incompatible with the MESSAGE GAMS implementation in this release; a :class:`UserWarning` will be emitted when the :class:`.Scenario` is instantiated, and :meth:`~.message_ix.Scenario.solve` will raise a :class:`ValueError`.
@@ -421,7 +446,7 @@ All changes
421
446
- :pull:`281`: Test and improve logic of :meth:`.years_active` and :meth:`.vintage_and_active_years`.
422
447
- :pull:`269`: Enforce ``year``-indexed columns as integers.
423
448
- :pull:`256`: Update to use :obj:`ixmp.config` and improve CLI.
424
-
- :pull:`255`: Add :mod:`message_ix.testing.nightly` and ``message-ix nightly`` CLI command group for slow-running tests.
449
+
- :pull:`255`: Add :py:`message_ix.testing.nightly` and ``message-ix nightly`` CLI command group for slow-running tests.
425
450
- :pull:`249`, :pull:`259`: Build MESSAGE and MESSAGE_MACRO classes on ixmp model API; adjust Scenario.
Copy file name to clipboardExpand all lines: doc/api.rst
+28-19Lines changed: 28 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,17 +129,21 @@ The full API is also available from R; see :doc:`rmessageix`.
129
129
Model classes
130
130
-------------
131
131
132
-
.. currentmodule:: message_ix.models
132
+
.. currentmodule:: message_ix
133
133
134
134
.. autosummary::
135
135
136
-
MESSAGE
137
-
MACRO
138
-
MESSAGE_MACRO
139
-
GAMSModel
140
-
DEFAULT_CPLEX_OPTIONS
141
-
Item
142
-
ItemType
136
+
~message.MESSAGE
137
+
~macro.MACRO
138
+
~message_macro.MESSAGE_MACRO
139
+
~common.GAMSModel
140
+
~common.DEFAULT_CPLEX_OPTIONS
141
+
~common.Item
142
+
~ixmp.backend.ItemType
143
+
144
+
.. currentmodule:: message_ix.common
145
+
146
+
.. automodule:: message_ix.common
143
147
144
148
.. autodata:: DEFAULT_CPLEX_OPTIONS
145
149
@@ -149,7 +153,8 @@ Model classes
149
153
:members:
150
154
:exclude-members: defaults
151
155
152
-
The :class:`.MESSAGE`, :class:`MACRO`, and :class:`MESSAGE_MACRO` child classes encapsulate the GAMS code for the core MESSAGE (or MACRO) mathematical formulation.
156
+
The :class:`.MESSAGE`, :class:`.MACRO`, and :class:`.MESSAGE_MACRO` child classes
157
+
encapsulate the GAMS code for the core MESSAGE (or MACRO) mathematical formulation.
153
158
154
159
The class receives `model_options` via :meth:`.Scenario.solve`. Some of these are passed on to the parent class :class:`ixmp.model.gams.GAMSModel` (see there for a list); others are handled as described below.
155
160
@@ -244,6 +249,10 @@ Model classes
244
249
* - **var_list**
245
250
- :obj:`None`
246
251
252
+
.. currentmodule:: message_ix.message
253
+
254
+
.. automodule:: message_ix.message
255
+
247
256
.. autoclass:: MESSAGE
248
257
:members: initialize
249
258
:exclude-members: defaults
@@ -267,6 +276,10 @@ Model classes
267
276
Keys are the names of items (sets, parameters, variables, and equations); values are :class:`.Item` instances.
268
277
These include all items listed in the MESSAGE mathematical specification, i.e. :ref:`sets_maps_def` and :ref:`parameter_def`.
Copy file name to clipboardExpand all lines: doc/macro.rst
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,10 +73,12 @@ The required dimensions or symbol of each item are given in the same notation us
73
73
74
74
- ``price_ref`` (:math:`n, s`): prices of MACRO sector output in the reference year.
75
75
These can be constructed from the MESSAGE variable ``PRICE_COMMODITY``, using the ``config`` mapping.
76
-
If not provided, :mod:`message_ix.macro` will identify the reference year and extrapolate reference values using an exponential function fitted to ``PRICE_COMMODITY`` values; see :func:`.macro.extrapolate`.
76
+
If not provided, :mod:`message_ix.macro.calibrate` will identify the reference year
77
+
and extrapolate reference values using an exponential function fitted to ``PRICE_COMMODITY`` values.
78
+
See :func:`~.macro.calibrate.extrapolate`.
77
79
- ``cost_ref`` (:math:`n`): total cost of the energy system in the reference year.
78
80
These can be constructed from the MESSAGE variable ``COST_NODAL_NET``, including dividing by a factor of 1000.
79
-
If not provided, :mod:`message_ix.macro` will extrapolate using :func:`.macro.extrapolate`.
81
+
If not provided, :mod:`message_ix.macro.calibrate` will extrapolate using :func:`~.macro.calibrate.extrapolate`.
80
82
- ``demand_ref`` (:math:`n, s`): demand for MACRO sector output in the reference year.
81
83
- ``lotol`` (:math:`n`): tolerance factor for lower bounds on MACRO variables.
82
84
- ``esub`` (:math:`\epsilon_n`): elasticity of substitution between capital-labor and energy.
@@ -228,9 +230,9 @@ Alternatively the arguments can be specified either in :file:`models.py`.
228
230
Code documentation
229
231
==================
230
232
231
-
.. currentmodule:: message_ix.macro
233
+
.. currentmodule:: message_ix.macro.calibrate
232
234
233
-
.. automodule:: message_ix.macro
235
+
.. automodule:: message_ix.macro.calibrate
234
236
:members:
235
237
236
238
The functions :func:`add_model_data` and :func:`calibrate` are used by :meth:`.Scenario.add_macro`.
0 commit comments