Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c7dc3e2
Send transport output_cap_ret to l=end_of_life
khaeru Jan 28, 2026
3e293b0
Use better variable names in .circeular.structure
khaeru Jan 28, 2026
e06dab1
Handle no existing file in StructureFactory.get()
khaeru Jan 28, 2026
55687f7
Add "Mt / Mv" to transport units
khaeru Jan 28, 2026
0188655
Reduce transport output_cap_ret vs. input_cap_new
khaeru Jan 28, 2026
a346d92
Add 'ref' setting to "transport" CI workflow
khaeru Feb 4, 2026
c93ac63
Run "transport" CI workflow from the 'main' branch
khaeru Feb 4, 2026
d99b3d9
Reduce default label set in "transport" workflow
khaeru Feb 4, 2026
586de99
Use transport annotations in CL_CIRCEULAR_SCENARIO
khaeru Feb 4, 2026
fc9ee3b
Simplify CL_CIRCEULAR_SCENARIO code IDs
khaeru Feb 4, 2026
0c8e575
Add .transport.workflow.generate() docstring
khaeru Feb 4, 2026
78e09e0
Move short_hash() from transport to common .util
khaeru Feb 4, 2026
5f60f19
Move scenario_url() → Config.get_target_url()
khaeru Feb 4, 2026
df2989c
Add .transport.workflow.add_steps()
khaeru Feb 4, 2026
1c59857
Add .model.workflow.from_codelist()
khaeru Feb 4, 2026
765ab45
Use context.solve, if set, in workflow.solve()
khaeru Feb 4, 2026
ee79dd2
Simplify .transport.workflow.generate()
khaeru Feb 4, 2026
f69a0fd
Add .circeular.workflow.generate()
khaeru Jan 28, 2026
dd09540
Continue on failed import in .cli.submodules
khaeru Feb 9, 2026
da2f4d5
Don't import genno.testing in .transport.operator
khaeru Feb 9, 2026
745da8c
Add "genno[graphviz]" to "transport" dependencies
khaeru Feb 9, 2026
27487a3
Add "ntnu-vmi-tech" annotations for LDV techs
khaeru Feb 16, 2026
2d7538b
Adjust transport…test_debug for #471
khaeru Feb 16, 2026
e414903
Add n→node, y→year to .transport.util.DIMS
khaeru Feb 16, 2026
449a59c
Add .transport.material.get_groups()
khaeru Feb 16, 2026
51a443b
Use .util.DIMS in .transport.material
khaeru Feb 16, 2026
cdb430a
Add .testing.check.InRange
khaeru Feb 16, 2026
482c081
Add range of material share to transport checks
khaeru Feb 16, 2026
4e2f08b
Add .transport.testing.prepare_computer()
khaeru Feb 16, 2026
d591f8d
Improve .transport.testing.configure_build()
khaeru Feb 16, 2026
a6d2b4d
Adjust .transport.material handling of base demand
khaeru Feb 16, 2026
58f1aa0
Add _local_data_factory(*parts) kwargs
khaeru Mar 9, 2026
3929a46
Add commented debug lines for generating graphs
khaeru Mar 9, 2026
571b3e2
Add URNLookupMixin.__str__()
khaeru Mar 9, 2026
fa6a076
Adjust LoadFactorLDV to match str(URNLookupMixin)
khaeru Mar 10, 2026
9d03ef5
Rename ldv-activity.csv → activity-vehicle.csv
khaeru Mar 9, 2026
760344b
Rename lifetime-ldv.csv → lifetime.csv
khaeru Mar 10, 2026
316f9a2
Add .report.operator.broadcast_wildcard2()
khaeru Mar 9, 2026
70526c6
Add .transport.data.ActivityVehicle
khaeru Mar 9, 2026
f27f36c
Add .transport.data.Lifetime
khaeru Mar 10, 2026
661ec9d
Add .transport.data.load_factor_[fp]
khaeru Mar 9, 2026
7d9e734
Use units "passenger / vehicle" in load-factor-ldv
khaeru Mar 10, 2026
eb1d47e
Use units "Gt * km / a" for freight activity
khaeru Mar 10, 2026
635f3d1
Use "passenger", not "capita" in stock_cap units
khaeru Mar 10, 2026
a91c3e0
Add 5 additional keys via .build.add_structure()
khaeru Mar 10, 2026
74f2792
Adjust key usage in .freight.demand()
khaeru Mar 10, 2026
2450074
Generalize code for vehicle stocks and operation
khaeru Mar 10, 2026
43fa630
Mark .transport.material for message-ix ≥3.12
khaeru Mar 10, 2026
efe66d3
Adjust test marks for #471
khaeru Mar 10, 2026
1567034
Improve ConfigHelper
khaeru Apr 1, 2026
eb5d7ae
Use ConfigHelper.update in Context.update()
khaeru Apr 1, 2026
c7de673
Update context with any report(…, **kwargs)
khaeru Apr 1, 2026
3369d64
Use transport code for report in .from_codelist()
khaeru Apr 1, 2026
29814fe
Reduce verbosity in .workflow.make_click_command()
khaeru Apr 1, 2026
37950cd
Don't auto-visualize large workflows on CLI
khaeru Apr 1, 2026
d64fa1e
Use operator.summarize() for transport report
khaeru Apr 1, 2026
56f5ce7
Add "CAP{,_NEW}::transport all" to reapply_units()
khaeru Apr 7, 2026
fe07b61
Strip "CAP{,_NEW}" prefix from 'variable' string
khaeru Apr 7, 2026
e21851f
Use Code.name in .report.util.add_replacements()
khaeru Apr 8, 2026
01f95bf
Add "report:" annotation for commodity "gas"
khaeru Apr 14, 2026
13f6ca4
Improve transport/technology.yaml for #471
khaeru Apr 8, 2026
e8e6e65
Output sales, stocks for non-LDV transport
khaeru Apr 7, 2026
bc9f750
Add CLI command "transport export-price"
khaeru Apr 7, 2026
54dc130
Add transport price-emission data for 17 scenarios
khaeru Apr 7, 2026
764eca3
Bump CL_TRANSPORT_SCENARIO 1.3.0 → 1.4.0
khaeru Apr 7, 2026
aeb6099
Add .report.util.store_write_ts()
khaeru Apr 14, 2026
3463af1
Add .transport.structure.get_commodity_groups()
khaeru Apr 14, 2026
b39c8a8
Add 4 entries to .transport.key
khaeru Apr 14, 2026
3bfbee6
Improve .transport.build
khaeru Apr 14, 2026
36a41b4
Use consistent style to import .transport.key
khaeru Apr 14, 2026
86da9cc
Consolidate .transport.report.callback()
khaeru Apr 14, 2026
5b4e32a
Update docs for #471
khaeru Apr 14, 2026
eb278bc
Add #471 to doc/whatsnew
khaeru Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions .github/workflows/transport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ env:
target-ref: dev
target-workflow: transport

# Ref to clone in the workflow.
# Default: use github.ref, e.g. 'main' for the schedule trigger.
ref: "main"

# Starting point of the workflow.
#
# Use this value to build from a certain scenario:
Expand All @@ -22,40 +26,14 @@ env:
# 'mix-models transport run'. Each label triggers 1 job in the target-repo/
# target-workflow.
#
# - Delete lines to disable some runs.
# - Ensure there is NO trailing comma on the last line.
labels: >-
[
"SSP1",
"SSP1 exo price",
"SSP1 tax",
"SSP2",
"SSP2 exo price",
"SSP2 tax",
"SSP3",
"SSP3 exo price",
"SSP3 tax",
"SSP4",
"SSP4 exo price",
"SSP4 tax",
"SSP5",
"SSP5 exo price",
"SSP5 tax",
"DIGSY-BEST-C",
"DIGSY-BEST-S",
"DIGSY-WORST-C",
"DIGSY-WORST-S",
"EDITS-CA",
"EDITS-HA",
"LED-SSP1",
"LED-SSP2"
"SSP2 exo price c59e",
"SSP2 tax"
]

# Currently disabled:
# [
#
# ]

on:
# Uncomment these lines for debugging, but leave them commented on 'main'
# pull_request:
Expand All @@ -79,7 +57,7 @@ jobs:
- name: Assemble JSON payload
run: |
echo '{
"ref": "${{ github.ref }}",
"ref": "${{ env.ref || github.ref }}",
"base": "${{ env.base }}",
"from-step": "${{ env.from-step }}",
"labels": ${{ env.labels }}
Expand Down
20 changes: 11 additions & 9 deletions doc/transport/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The :program:`git` history of files, or the GitHub "blame" view can also be used
Quick links to each of the data flows:
:data:`~.data.act_non_ldv`
:data:`~.data.activity_freight`
:data:`~.data.activity_ldv`
:class:`~.data.ActivityVehicle`
:data:`~.data.age_ldv`
:data:`~.data.cap_new_ldv`
:data:`~.data.class_ldv`
Expand All @@ -136,9 +136,10 @@ Quick links to each of the data flows:
:data:`~.data.input_cap_new`
:data:`~.data.input_ref_ldv`
:data:`~.data.input_share`
:data:`~.data.lifetime_ldv`
:data:`~.data.load_factor_ldv`
:data:`~.data.load_factor_nonldv`
:class:`~.data.Lifetime`
:data:`~.data.load_factor_f`
:data:`~.data.load_factor_p`
:class:`~.data.LoadFactorLDV`
:data:`~.data.mer_to_ppp`
:data:`~.data.mode_share_freight`
:data:`~.data.pdt_cap_proj`
Expand All @@ -153,7 +154,7 @@ Quick links to each of the data flows:

.. autodata:: message_ix_models.model.transport.data.act_non_ldv
.. autodata:: message_ix_models.model.transport.data.activity_freight
.. autodata:: message_ix_models.model.transport.data.activity_ldv
.. autoclass:: message_ix_models.model.transport.data.ActivityVehicle

node = R12_AFR [1]_
Obtained from literature, based on estimates from South Africa. The reported value for South Africa is lower (18000 km/year, `source <https://blog.sbtjapan.com/car-info/what-mileage-is-good-for-a-used-car#:~:text=Average%20Mileage%20in%20South%20Africa,is%20just%20a%20general%20guideline>`__) than the one for Kenya (22000 km/year, `source <https://www.changing-transport.org/wp-content/uploads/2019_Updated-transport-data-in-Kenya.pdf>`__).
Expand Down Expand Up @@ -232,8 +233,10 @@ Quick links to each of the data flows:
.. autodata:: message_ix_models.model.transport.data.input_cap_new
.. autodata:: message_ix_models.model.transport.data.input_ref_ldv
.. autodata:: message_ix_models.model.transport.data.input_share
.. autodata:: message_ix_models.model.transport.data.lifetime_ldv
.. autodata:: message_ix_models.model.transport.data.load_factor_ldv
.. autoclass:: message_ix_models.model.transport.data.Lifetime
.. autodata:: message_ix_models.model.transport.data.load_factor_f
.. autodata:: message_ix_models.model.transport.data.load_factor_p
.. autoclass:: message_ix_models.model.transport.data.LoadFactorLDV

The code that handles this file interpolates on the |y| dimension.

Expand All @@ -243,8 +246,7 @@ Quick links to each of the data flows:

.. todo:: Transcribe the method into this document.

.. autodata:: message_ix_models.model.transport.data.load_factor_nonldv
.. autodata:: message_ix_models.model.transport.data.mer_to_ppp
.. autodata:: message_ix_models.model.transport.data.mer_to_ppp
.. autodata:: message_ix_models.model.transport.data.mode_share_freight

.. _transport-pdt-cap-proj:
Expand Down
4 changes: 2 additions & 2 deletions doc/transport/output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Data flows

Quick links to each of the data flows:
:data:`~.data.activity_passenger`
:data:`~.data.activity_vehicle`
:data:`~.data.activity_vehicle_out`
:data:`~.data.fe_transport`
:data:`~.data.gdp_in`
:data:`~.data.population_in`

.. autodata:: message_ix_models.model.transport.data.activity_passenger
.. autodata:: message_ix_models.model.transport.data.activity_vehicle
.. autodata:: message_ix_models.model.transport.data.activity_vehicle_out
.. autodata:: message_ix_models.model.transport.data.fe_transport
.. autodata:: message_ix_models.model.transport.data.gdp_in
.. autodata:: message_ix_models.model.transport.data.population_in
Expand Down
100 changes: 86 additions & 14 deletions doc/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,89 @@ What's new
Next release
============

- :mod:`message_ix_models` supports and is tested against `Pandas 3.0.0 <https://pandas.pydata.org/pandas-docs/stable/whatsnew/v3.0.0.html>`_,
- :mod:`message_ix_models` supports and is tested against
`Pandas 3.0.0 <https://pandas.pydata.org/pandas-docs/stable/whatsnew/v3.0.0.html>`_,
released 2026-01-21 (:pull:`470`).
- New module :mod:`tools.bilateralize <message_ix_models.tools.bilateralize>`
- New module :mod:`.tools.bilateralize`
to change scenarios to a bilateral representation of trade (:pull:`438`).

- Add reduced basin filtering for water module with ``--reduced-basin`` and
demand/supply stress-based selection via ``--basin-selection stress``
(:pull:`432`, :issue:`414`).

- Fix water module parameter bugs and refactor cooling (:pull:`405`):
infrastructure M1/Mf mode fixes, regional average shares for cooling allocation,
water supply level hierarchy corrections, and test suite improvements.
- New function :func:`.workflow.from_codelist` (:pull:`471`)
to generate a :class:`.Workflow` from a list of SDMX codes
by inspection of their IDs and annotations.
- Improve :mod:`~message_ix_models.report` (:pull:`471`):

- :func:`~.report.report` updates the :class:`.Context`
with additional keyword arguments.
- New reporting operator :func:`.broadcast_wildcard2`.
- New utility :func:`.report.util.store_write_ts`,
generalized from :py:`transport.report.add_iamc_store_write()`.

- New class :class:`.testing.check.InRange` (:pull:`471`).
- :meth:`.ConfigHelper.update` canonicalizes arguments;
accepts an optional ConfigHelper or dict as first positional argument (:pull:`471`).
- :meth:`.Context.update` invokes :meth:`.ConfigHelper.update` on sub-instances (:pull:`471`).
- Improve :doc:`/transport/index` (:pull:`471`):

- Update data flows:

- :class:`.ActivityVehicle`: new :class:`.ExoDataSource` class
inclusive of all modes and technologies;
replaces :py:`ldv_activity` that was specific to LDVs.
- :data:`.activity_vehicle_out`: rename from :py:`activity_vehicle`.
- :class:`.Lifetime`: new :class:`.ExoDataSource` class,
replaces :py:`lifetime_Ldv` that was specific to LDVs.
- :data:`.load_factor_f`: new.
This data flow is kept separate from :data:`.load_factor_p` because the units
of activity/service differ (tonne- vs. passenger-kilometre).
- :class:`.LoadFactorLDV`: add units "passenger / vehicle".
- :data:`.load_factor_p`: rename from :py:`load_factor_non_ldv`.
- :data:`.freight_activity`: change units Gt km → Gt km / year.

- Expand transport technology code list:

- Distinguish names and reporting aliases for all vehicle technologies.
- Add ``ntnu-vmi-technology`` annotations for :mod:`.transport.material`.

- New functions and methods:

:meth:`.transport.config.Config.get_target_url`
replacing :py:`transport.workflow.scenario_url()`,

:func:`.transport.material.get_groups`, and

:func:`~.transport.structure.get_commodity_groups`.

- Harmonize :mod:`genno` keys used for structural information,
coordinates, etc. during build and reporting in :mod:`.transport.key`.
- New CLI command :program:`mix-models transport export-price`.
- Bump Codelist=IIASA_ECE:CL_TRANSPORT_SCENARIO to version 1.4.0.

- Add additional exogenous price trajectories.
- Bump :attr:`.CL_SCENARIO.base_url` to v6.5 of the ScenarioMIP scenarios.

- Add and apply :data:`.transport.material.OUTPUT_SHARE`.
- Improve reporting output (:mod:`.transport.report`):
align IAMC ‘variable’ codes with common definitions.
- New module :mod:`.transport.vehicle` for operational parameters
(capacity factor, technical lifetime) and stock of vehicles,
both passenger and freight.

- Transfer and generalize stock-related calculations from :mod:`.transport.ldv`.
- Remove module :py:`transport.stock`.

- New function :func:`.transport.workflow.add_steps` adds
transport-related steps to any Workflow
given a Code with :class:`.ScenarioCodeAnnotations`.

- Improve :doc:`/water/index`:

- Add reduced basin filtering with :program:`--reduced-basin`
and demand/supply stress-based selection via :program:`--basin-selection stress`
(:pull:`432`, :issue:`414`).
- Fix parameter bugs and refactor cooling (:pull:`405`):
infrastructure M1/Mf mode fixes,
regional average shares for cooling allocation,
water supply level hierarchy corrections,
and test suite improvements.

v2026.1.15
==========
Expand Down Expand Up @@ -75,7 +146,7 @@ Projects and model variants
---------------------------

- Add :doc:`/project/circeular` code list :class:`~.circeular.structure.CL_TRANSPORT_SCENARIO` (:pull:`447`).
- Improve :mod:`.model.transport` (:pull:`447`).
- Improve :doc:`/transport/index` (:pull:`447`).

- Add :meth:`Config.use_modules <.transport.config.Config.use_modules>`.
- Bump Codelist=IIASA_ECE:CL_TRANSPORT_SCENARIO to version 1.3.0.
Expand Down Expand Up @@ -119,7 +190,7 @@ v2025.10.31
to read input data from distinct files according to scenario label.
- New :class:`LoadFactorLDV`, replacing :py:`load_factor_ldv`
and allowing a distinct file according to scenario label.
- New submodule :mod:`~.transport.stock` and input data flow :data:`.stock_cap`.
- New submodule :py:`transport.stock` and input data flow :data:`.stock_cap`.
- Add technology dimension to :data:`.elasticity_f`.
- Document :class:`.ScenarioCodeAnnotations`.

Expand Down Expand Up @@ -408,15 +479,16 @@ Update :doc:`/transport/index` (:pull:`259`, :pull:`289`, :pull:`300`, :pull:`32
:data:`.mode_share_freight`,
:data:`.pdt_cap_ref`, and
:data:`.speed`.
- Add LED-specific parametrization for :data:`.activity_ldv`,
- Add LED-specific parametrization for :class:`activity_ldv <.ActivityVehicle>`,
:data:`.lifetime_ldv`,
:py:`load_factor_ldv`, and
:data:`.pdt_cap_proj`.
- Drop :file:`base-scenario-url.json`; store base scenario URLs in :ref:`CL_TRANSPORT_SCENARIO`.
- Generate SDMX-ML structural metadata, including data flow definitions, and SDMX-{CSV,ML} data outputs for certain reported quantities.

- New input data flow :data:`.input_share`.
- Add :py:`scenario` dimension to :data:`.activity_ldv`, :data:`.lifetime_ldv`, input data flow and files.
- Add :py:`scenario` dimension to :class:`activity_ldv <.ActivityVehicle>`,
:data:`.lifetime_ldv`, input data flow and files.
- Expand use of fixed/shared keys from :mod:`.transport.key`.
- Improve documentation:

Expand Down
4 changes: 3 additions & 1 deletion message_ix_models/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ def _log_threads(k: int, n: int):
try:
__import__(name)
except ImportError as e:
print(e)
print(f"{name} not available: {e}")
continue

cmd = getattr(sys.modules[name], "cli")

# Avoid replacing message-ix-models CLI with message_data CLI
Expand Down
3 changes: 2 additions & 1 deletion message_ix_models/data/commodity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ fueloil:
iea-eweb-product: [BITUMEN, PARWAX, PETCOKE, RESFUEL]

gas:
name: Natural Gas
name: Natural gas
report: Gas
units: GWa
ipcc-1996-name: "Natural Gas (Dry)"
iea-eweb-product: [NATGAS]
Expand Down
Loading
Loading