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

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

Transport improvements from 2025-W09 #300

wants to merge 48 commits into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Feb 24, 2025

  • Adjust efficiencies of LDV PHEV technologies using duty cycle data (carried from Transport improvements from 2025-W05 #289 and Transport improvements from 2024-W49 #259).
  • Use/test LDV parametrization for non-demand parameters.
    • Load factor (output)
    • Confirm all mentioned at iiasa/message_data#580.
  • Debug possible double-counting via summation in IAMC-structured reporting of final energy (discussed 2025-03-06).
  • Add $y$ dimension to pdt-elasticity.csv, expand current data (discussed 2025-03-06).
  • Allow to distinguish LED-SSP1 from LED-SSP2 in pdt-cap.csv input data (discussed 2025-03-11).

How to review

  • Read the diff and note that the CI checks all pass.
  • More TBA.

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.52066% with 12 lines in your changes missing coverage. Please review.

Project coverage is 77.4%. Comparing base (a45fce4) to head (6de5497).

Files with missing lines Patch % Lines
message_ix_models/model/transport/data.py 97.7% 4 Missing ⚠️
message_ix_models/util/sdmx.py 97.9% 3 Missing ⚠️
message_ix_models/model/transport/ldv.py 94.5% 2 Missing ⚠️
...sage_ix_models/tests/model/transport/test_build.py 88.2% 2 Missing ⚠️
message_ix_models/report/operator.py 94.1% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #300     +/-   ##
=======================================
- Coverage   78.3%   77.4%   -0.9%     
=======================================
  Files        217     215      -2     
  Lines      16851   16922     +71     
=======================================
- Hits       13196   13114     -82     
- Misses      3655    3808    +153     
Files with missing lines Coverage Δ
message_ix_models/model/transport/build.py 95.0% <100.0%> (+<0.1%) ⬆️
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/groups.py 97.0% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/key.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/non_ldv.py 98.1% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/operator.py 86.2% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/report.py 60.0% <100.0%> (-0.7%) ⬇️
message_ix_models/project/ssp/transport.py 97.8% <100.0%> (ø)
...ssage_ix_models/tests/model/transport/test_data.py 86.4% <100.0%> (+0.8%) ⬆️
... and 10 more

... and 7 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 from cd7b261 to 1dcd054 Compare March 10, 2025 12:27
khaeru and others added 7 commits March 11, 2025 10:36
- Add data/transport/input-share.csv, .transport.files.input_share.
- Incorporate via .ldv.prepare_tech_econ().
- Simplify key handling in prepare_tech_econ()
- Allow use of scenario="LED" in some cases and scenario="SSP1" in
  others.
- Select LDV load factor data using "LED" label where necessary.
Fix LDV speed in SSP 1 scenario. For narrative consistency, ldv speed in SSP 1 should stay constant (or maybe even decrease) rather than increasing.
Based on discussion on 06-03-2025, experimenting with rather dramatic change in pdt-elasticity values by different regions for SSP1.
- Interpolate on this dimension in .demand.
- Duplicate existing data for y in {2020, 2110}.
iiasa/message_data#599 (comment)
Update R12_SAS value given the reasons in the thread above
@khaeru khaeru force-pushed the transport/2025-w09 branch from 88851b1 to bee2848 Compare March 11, 2025 09:38
See description. For now it is just a block comment. But these values are to be used to calculate LED-SSP1 variant
for current experimentation
@khaeru khaeru force-pushed the transport/2025-w09 branch from 2df36dc to ef606e7 Compare March 12, 2025 09:49
khaeru added 4 commits March 12, 2025 12:15
- Move and adjust tests.
- Sort entries in .transport.files.
- Add .transport.files.iter_files().
- Add .transport.key.exo, populated using iter_files()
- Adjust references.
…by merging functionality with Dataflow.__init__().

- Add Dataflow(module, …, i_o) arguments, Dataflow.FLAGS,
  Dataflow.intent.
- Use shorthand functions in .transport.{data,files}.
- Add .util.sdmx.{collect_structures,get}().
- Drop .transport.files submodule, moving contents to .data.
- Update, expand, sort, and copyedit input data docs for consistency.
- Add output data flows to documentation.
khaeru added 2 commits March 12, 2025 12:15
Avoid TypeError in broadcast_wildcard() with mixed str and
sdmx.model.common.Code.
@khaeru khaeru force-pushed the transport/2025-w09 branch from ef606e7 to be40603 Compare March 12, 2025 11:20
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.

2 participants