Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport improvements from 2025-W05 #289

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

Transport improvements from 2025-W05 #289

wants to merge 27 commits into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Jan 29, 2025

Carried from #259:

  • Use a smaller growth_activity_up value for (t=ICAm_ptrp, n=R12_RCPA). The technology constraint as of 2020 is effective, but this tech/region grows too rapidly to 2025 and beyond. (per discussion with @r-aneeque 2024-12-04.)
  • Adjust efficiencies of LDV PHEV technologies using duty cycle data.
  • Ensure growth_activity_up and act-non_ldv.csv values are set for F ROAD technologies with, at least, c=gas inputs. This is to avoid the behaviour (observed by @r-aneeque) that the model quickly switches into these in 2025–2030. Rework .transport.Config.constraint to simplify the setting of these constraints.

In addition:

  • Establish SDMX-CSV format for transport outputs for EDITS MCE.
  • Improve the dispatch of the "transport" workflow in message_data (see also iiasa/message_data#596). With this, the set of scenarios run can be adjusted by making (temporary or permanent) changes in transport.yaml in this repository. This reduces the need for adjustments on the message_data side.

How to review

TBA

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update doc/whatsnew.

@khaeru khaeru added enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model labels Jan 29, 2025
@khaeru khaeru self-assigned this Jan 29, 2025
@khaeru khaeru requested a review from glatterf42 as a code owner January 29, 2025 16:06
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 54.34174% with 163 lines in your changes missing coverage. Please review.

Project coverage is 65.0%. Comparing base (a5626b8) to head (0111b36).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
message_ix_models/model/transport/report.py 15.1% 73 Missing ⚠️
message_ix_models/model/transport/operator.py 8.3% 22 Missing ⚠️
message_ix_models/model/transport/freight.py 27.5% 21 Missing ⚠️
message_ix_models/report/sim.py 69.6% 17 Missing ⚠️
message_ix_models/model/transport/build.py 0.0% 11 Missing ⚠️
...age_ix_models/tests/model/transport/test_report.py 60.0% 4 Missing ⚠️
message_ix_models/model/transport/util.py 25.0% 3 Missing ⚠️
message_ix_models/model/transport/non_ldv.py 33.3% 2 Missing ⚠️
message_ix_models/model/transport/plot.py 0.0% 2 Missing ⚠️
message_ix_models/model/transport/testing.py 88.2% 2 Missing ⚠️
... and 5 more

❗ There is a different number of reports uploaded between BASE (a5626b8) and HEAD (0111b36). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (a5626b8) HEAD (0111b36)
15 6
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #289      +/-   ##
========================================
- Coverage   77.0%   65.0%   -12.0%     
========================================
  Files        215     216       +1     
  Lines      16572   16795     +223     
========================================
- Hits       12773   10930    -1843     
- Misses      3799    5865    +2066     
Files with missing lines Coverage Δ
message_ix_models/model/structure.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/key.py 100.0% <100.0%> (ø)
message_ix_models/project/edits/__init__.py 94.8% <ø> (ø)
message_ix_models/report/key.py 100.0% <100.0%> (ø)
message_ix_models/testing/__init__.py 77.1% <100.0%> (+1.3%) ⬆️
...sage_ix_models/tests/model/transport/test_build.py 64.7% <100.0%> (-13.3%) ⬇️
message_ix_models/tests/util/test_sdmx.py 100.0% <100.0%> (ø)
message_ix_models/types.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/base.py 36.9% <66.6%> (-61.0%) ⬇️
message_ix_models/model/transport/config.py 91.5% <0.0%> (-5.9%) ⬇️
... and 13 more

... and 30 files with indirect coverage changes

@khaeru khaeru force-pushed the transport/2025-w05 branch from 3da90c3 to bd02b58 Compare January 31, 2025 20:16
@khaeru khaeru marked this pull request as draft February 3, 2025 09:46
@khaeru khaeru force-pushed the transport/2025-w05 branch 14 times, most recently from 04701ce to a0b8292 Compare February 12, 2025 10:53
- Add MockScenario() class.
- Load parameter data directly from an export of a built scenario.
- Parametrize test_simulated_solution()
- get_cl()
- get_cs()
- get_concept()
- get_version()
Available from Python 3.9 onwards.
- Sort globals, then methods in alpha order.
- Add .key.report.all = "transport all", use in other modules.
@khaeru khaeru force-pushed the transport/2025-w05 branch from a0b8292 to 9ddfad7 Compare February 13, 2025 09:27
- Shift utility function to .util.has_input_commodity().
- Correct filter for gas-using techs to constrain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant