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-W09 #300

Merged
merged 77 commits into from
Mar 29, 2025
Merged

Transport improvements from 2025-W09 #300

merged 77 commits into from
Mar 29, 2025

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Feb 24, 2025

The branch contained about 120 commits with extensive iteration on/calibration of input values @r-aneeque, but has been rebased to drop all but the last set of changes to:

  • .github/workflow/transport.yaml — 27 commits
  • message_ix_models/data/transport/R12/
    • speed.csv — 18 commits
    • pdt-elasticity.csv — 15 commits
    • config.yaml (particularly, share weight convergence) — 4 commits
    • ldv-inv_cost.csv — 2 commits

How to review

  • Read the diff and note that the CI checks all pass.
  • Read the changes to doc/whatsnew.

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
    • Input and output data flows for MESSAGEix-Transport are now completely documented.
  • Update doc/whatsnew.

@khaeru khaeru added enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model labels Feb 24, 2025
@khaeru khaeru self-assigned this Feb 24, 2025
@khaeru khaeru requested a review from glatterf42 as a code owner February 24, 2025 13:16
@khaeru khaeru marked this pull request as draft February 24, 2025 13:23
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 97.44346% with 26 lines in your changes missing coverage. Please review.

Project coverage is 77.7%. Comparing base (5ca9f9f) to head (79b5417).
Report is 78 commits behind head on main.

Files with missing lines Patch % Lines
message_ix_models/model/transport/data.py 97.7% 4 Missing ⚠️
message_ix_models/testing/check.py 81.8% 4 Missing ⚠️
...sage_ix_models/tests/model/transport/test_build.py 91.1% 4 Missing ⚠️
message_ix_models/model/transport/plot.py 70.0% 3 Missing ⚠️
message_ix_models/model/config.py 85.7% 2 Missing ⚠️
message_ix_models/model/transport/ldv.py 97.1% 2 Missing ⚠️
message_ix_models/model/transport/build.py 95.4% 1 Missing ⚠️
message_ix_models/report/__init__.py 80.0% 1 Missing ⚠️
message_ix_models/report/operator.py 95.2% 1 Missing ⚠️
message_ix_models/tools/iea/web.py 98.1% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #300     +/-   ##
=======================================
- Coverage   78.3%   77.7%   -0.7%     
=======================================
  Files        217     215      -2     
  Lines      16925   17148    +223     
=======================================
+ Hits       13264   13325     +61     
- Misses      3661    3823    +162     
Files with missing lines Coverage Δ
message_ix_models/cli.py 93.4% <100.0%> (ø)
message_ix_models/model/transport/config.py 98.5% <100.0%> (+1.2%) ⬆️
message_ix_models/model/transport/demand.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/disutility.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/freight.py 82.4% <100.0%> (-17.6%) ⬇️
message_ix_models/model/transport/groups.py 97.0% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/ikarus.py 86.2% <100.0%> (+0.6%) ⬆️
message_ix_models/model/transport/key.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/operator.py 86.2% <100.0%> (ø)
message_ix_models/model/transport/other.py 100.0% <100.0%> (ø)
... and 36 more

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khaeru khaeru force-pushed the transport/2025-w09 branch 2 times, most recently from 93819ec to 15d2a67 Compare February 28, 2025 15:26
@khaeru khaeru force-pushed the transport/2025-w09 branch 4 times, most recently from ef606e7 to be40603 Compare March 12, 2025 11:20
@khaeru khaeru force-pushed the transport/2025-w09 branch 3 times, most recently from 2783070 to e93396a Compare March 24, 2025 16:06
@khaeru khaeru force-pushed the transport/2025-w09 branch 2 times, most recently from 1f3b723 to b2373cb Compare March 26, 2025 10:37
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Fix LDV speed in scenario=SSP1. For narrative consistency, this should
  stay constant (or maybe even decrease) rather than increasing.
- Use 70 for scenario=SSP1, t=RAIL.
- Adjust values for scenario=SSP1, t=AIR in some regions.
- Add (commented) block of values used to derive PDT per capita in
  scenario=LED-SSP1.
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Fix LDV speed in scenario=SSP1. For narrative consistency, this should
  stay constant (or maybe even decrease) rather than increasing.
- Use 70 for scenario=SSP1, t=RAIL.
- Adjust values for scenario=SSP1, t=AIR in some regions.
- Add (commented) block of values used to derive PDT per capita in
  scenario=LED-SSP1.
@khaeru khaeru force-pushed the transport/2025-w09 branch from b2373cb to bc386f7 Compare March 26, 2025 11:26
khaeru pushed a commit that referenced this pull request Mar 26, 2025
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Fix LDV speed in scenario=SSP1. For narrative consistency, this should
  stay constant (or maybe even decrease) rather than increasing.
- Use 70 for scenario=SSP1, t=RAIL.
- Adjust values for scenario=SSP1, t=AIR in some regions.
- Add (commented) block of values used to derive PDT per capita in
  scenario=LED-SSP1.
@khaeru khaeru force-pushed the transport/2025-w09 branch from bc386f7 to 5d4eea1 Compare March 26, 2025 11:42
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Reduce cost of EVs in scenario=SSP1; adjust EV/ICE cost ratio for SSP1.
- Use lower BEV and PHEV costs in some regions.
khaeru pushed a commit that referenced this pull request Mar 26, 2025
@khaeru khaeru force-pushed the transport/2025-w09 branch from 5d4eea1 to 458ac65 Compare March 26, 2025 11:50
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Change values for scenario=LED, SSP1.
khaeru pushed a commit that referenced this pull request Mar 26, 2025
- Fix LDV speed in scenario=SSP1. For narrative consistency, this should
  stay constant (or maybe even decrease) rather than increasing.
- Use 70 for scenario=SSP1, t=RAIL.
- Adjust values for scenario=SSP1, t=AIR in some regions.
- Add (commented) block of values used to derive PDT per capita in
  scenario=LED-SSP1.
khaeru pushed a commit that referenced this pull request Mar 27, 2025
- Reduce cost of EVs in scenario=SSP1; adjust EV/ICE cost ratio for SSP1.
- Use lower BEV and PHEV costs in some regions.
khaeru pushed a commit that referenced this pull request Mar 27, 2025
khaeru and others added 27 commits March 29, 2025 15:36
- In order to address scale-1 values > 1, limit the following
  technologies to a low share in all regions in y=2020:
  - t="f road electr".
  - Two F ROAD technologies using c="gas".
  - Two P BUS technologies using c="gas".
- Delete corresponding entries from R12/config.yaml
  "minimum-activity" key.
- Change values for scenario=LED, SSP1.
Previously the value was pop()'d and did not reach handle_cli_args().
- for c=gas -using road technologies.
- Divide placeholder 0.01 by scale-1 values from trial run.
- Fix LDV speed in scenario=SSP1. For narrative consistency, this should
  stay constant (or maybe even decrease) rather than increasing.
- Use 70 for scenario=SSP1, t=RAIL.
- Adjust values for scenario=SSP1, t=AIR in some regions.
- Add (commented) block of values used to derive PDT per capita in
  scenario=LED-SSP1.
- ContainsParameterData: sort items in log message for easier
  comparison.
- HasCoords:
  - Handle xr.DataArray coords.
  - Use consistent language in log messages.
  - Give a positive/confirmation log message for a passing check.
- HasUnits: handle ParameterData recursively.
This allows to reuse the same data in other tasks.
- Move COMMON, DIMS constants to globals.
- Add a TARGET global.
- Reference .keys instead of hard-coding.
- Use genno.Key generation.
- Move structural items to .build.STRUCTURE_STATIC.
- Separate .transport.other for non-passenger data.
- Adjust usage, imports.
- Improve and expand .test_build.test_debug() checks.
  - Generate some expectations dynamically based on config.
  - Use .testing.check.verbose_check().
  - Roll in assertions from 3 other tests.
- test_data.test_get_{freight,non_ldv}_data(): drop; see above.
- test_disutility.test_disutility(): drop; see above.
- This is necessary when the input data has interior gaps, as it does in
  modifications for #300.
- Drop use of genno.KeySeq; use Key generation features.
Store the annotation as unquoted string.
The string repr() of a unit cannot be eval()'d.
- Add .testing.MARK.
- Chain .transport.testing.MARK from .testing.MARK.
- Sort globals in .testing.
@khaeru khaeru force-pushed the transport/2025-w09 branch from 17f90a1 to 79b5417 Compare March 29, 2025 14:36
@khaeru khaeru merged commit ae96255 into main Mar 29, 2025
25 checks passed
@khaeru khaeru deleted the transport/2025-w09 branch March 29, 2025 17:28
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.

Handle flow=AVBUNK in IEA EWEB data
2 participants