Skip to content

Bug 365 emis cap - #368

Merged
mckennapep merged 3 commits into
mainfrom
bug-365-emis-cap
Jul 28, 2026
Merged

Bug 365 emis cap#368
mckennapep merged 3 commits into
mainfrom
bug-365-emis-cap

Conversation

@mckennapep

Copy link
Copy Markdown
Contributor

No description provided.

mckennapep and others added 3 commits July 23, 2026 13:28
…on caps

Previously the non-banking cap divided by (1 - pol.offset) unconditionally,
and the banking (cumulative) cap ignored offsets entirely. Now both
formulations divide by (1 - offset_adjust), which only loosens the cap by
pol.offset when offset_under_cap=false (offsets sit outside the cap).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Price escalation was anchored to the first model year (yr_idx - 1) instead
of the first year with a cap target, so step_prices would already be
escalated by the time a cap starting mid-horizon kicked in. Anchor to
first_target_idx instead so the configured step_prices land unescalated in
the cap's actual first year.

Also fixes a related indexing bug when building the price_resp_alws table:
it wrote prices[s][i] (position within the filtered target-year list)
instead of prices[s][yr_idx] (the actual model-year index), which only
matched when target years were the first N consecutive model years.

Includes docstring update and whitespace cleanup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.61%. Comparing base (65d4852) to head (3c42650).
⚠️ Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
+ Coverage   88.29%   88.61%   +0.32%     
==========================================
  Files          54       56       +2     
  Lines        6142     6552     +410     
==========================================
+ Hits         5423     5806     +383     
- Misses        719      746      +27     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@github-actions

Copy link
Copy Markdown
Benchmark result

Judge result

Benchmark Report for /home/runner/work/E4ST.jl/E4ST.jl

Job Properties

  • Time of benchmarks:
    • Target: 28 Jul 2026 - 03:07
    • Baseline: 28 Jul 2026 - 03:12
  • Package commits:
  • Julia commits:
    • Target: a2b1190
    • Baseline: a2b1190
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Brackets display tolerances for the benchmark estimates. Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["get_af"] 1.12 (5%) ❌ 1.00 (1%)
["get_plnom"] 1.11 (5%) ❌ 1.00 (1%)
["run_e4st"] 1.08 (5%) ❌ 1.00 (1%)
["setup_model"] 1.10 (5%) ❌ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Target

Julia Version 1.10.11
Commit a2b11907d7b (2026-03-09 14:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 24.04.4 LTS
  uname: Linux 6.17.0-1020-azure #20~24.04.1-Ubuntu SMP Fri Jun 19 20:09:14 UTC 2026 x86_64 x86_64
  CPU: AMD EPYC 9V74 80-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2869 MHz       2244 s          0 s        140 s       3059 s          0 s
       #2  2856 MHz       2424 s          0 s        134 s       2867 s          0 s
       #3  2871 MHz       2199 s          0 s        140 s       3106 s          0 s
       #4  2872 MHz       1636 s          0 s        115 s       3701 s          0 s
  Memory: 15.614948272705078 GB (13076.91796875 MB free)
  Uptime: 548.0 sec
  Load Avg:  1.03  1.4  0.89
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Baseline

Julia Version 1.10.11
Commit a2b11907d7b (2026-03-09 14:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 24.04.4 LTS
  uname: Linux 6.17.0-1020-azure #20~24.04.1-Ubuntu SMP Fri Jun 19 20:09:14 UTC 2026 x86_64 x86_64
  CPU: AMD EPYC 9V74 80-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2870 MHz       2911 s          0 s        162 s       5323 s          0 s
       #2  2855 MHz       2881 s          0 s        151 s       5345 s          0 s
       #3  2871 MHz       3009 s          0 s        174 s       5216 s          0 s
       #4  2871 MHz       2874 s          0 s        136 s       5396 s          0 s
  Memory: 15.614948272705078 GB (13485.7109375 MB free)
  Uptime: 843.68 sec
  Load Avg:  1.02  1.2  0.97
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Target result

Benchmark Report for /home/runner/work/E4ST.jl/E4ST.jl

Job Properties

  • Time of benchmark: 28 Jul 2026 - 03:07
  • Package commit: a6470ad
  • Julia commit: a2b1190
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["get_af"] 90.006 ns (5%) 32 bytes (1%) 2
["get_generator"] 40.671 ns (5%) 48 bytes (1%) 1
["get_plnom"] 98.038 ns (5%) 48 bytes (1%) 3
["read_data"] 31.662 ms (5%) 10.94 MiB (1%) 315597
["run_e4st"] 540.803 ms (5%) 381.394 ms 109.89 MiB (1%) 659883
["setup_model"] 1.170 s (5%) 217.111 ms 710.20 MiB (1%) 10403644

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.10.11
Commit a2b11907d7b (2026-03-09 14:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 24.04.4 LTS
  uname: Linux 6.17.0-1020-azure #20~24.04.1-Ubuntu SMP Fri Jun 19 20:09:14 UTC 2026 x86_64 x86_64
  CPU: AMD EPYC 9V74 80-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2869 MHz       2244 s          0 s        140 s       3059 s          0 s
       #2  2856 MHz       2424 s          0 s        134 s       2867 s          0 s
       #3  2871 MHz       2199 s          0 s        140 s       3106 s          0 s
       #4  2872 MHz       1636 s          0 s        115 s       3701 s          0 s
  Memory: 15.614948272705078 GB (13076.91796875 MB free)
  Uptime: 548.0 sec
  Load Avg:  1.03  1.4  0.89
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Baseline result

Benchmark Report for /home/runner/work/E4ST.jl/E4ST.jl

Job Properties

  • Time of benchmark: 28 Jul 2026 - 03:12
  • Package commit: 6f8549c
  • Julia commit: a2b1190
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["get_af"] 80.131 ns (5%) 32 bytes (1%) 2
["get_generator"] 40.751 ns (5%) 48 bytes (1%) 1
["get_plnom"] 88.224 ns (5%) 48 bytes (1%) 3
["read_data"] 31.624 ms (5%) 10.94 MiB (1%) 315597
["run_e4st"] 501.246 ms (5%) 348.197 ms 109.89 MiB (1%) 659898
["setup_model"] 1.061 s (5%) 193.501 ms 710.20 MiB (1%) 10403644

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • []

Julia versioninfo

Julia Version 1.10.11
Commit a2b11907d7b (2026-03-09 14:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 24.04.4 LTS
  uname: Linux 6.17.0-1020-azure #20~24.04.1-Ubuntu SMP Fri Jun 19 20:09:14 UTC 2026 x86_64 x86_64
  CPU: AMD EPYC 9V74 80-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2870 MHz       2911 s          0 s        162 s       5323 s          0 s
       #2  2855 MHz       2881 s          0 s        151 s       5345 s          0 s
       #3  2871 MHz       3009 s          0 s        174 s       5216 s          0 s
       #4  2871 MHz       2874 s          0 s        136 s       5396 s          0 s
  Memory: 15.614948272705078 GB (13485.7109375 MB free)
  Uptime: 843.68 sec
  Load Avg:  1.02  1.2  0.97
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Runtime information

Runtime Info
BLAS #threads 2
BLAS.vendor() lbt
Sys.CPU_THREADS 4

lscpu output:

Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           48 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  4
On-line CPU(s) list:                     0-3
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 9V74 80-Core Processor
CPU family:                              25
Model:                                   17
Thread(s) per core:                      2
Core(s) per socket:                      2
Socket(s):                               1
Stepping:                                1
BogoMIPS:                                5192.26
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves user_shstk clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization:                          AMD-V
Hypervisor vendor:                       Microsoft
Virtualization type:                     full
L1d cache:                               64 KiB (2 instances)
L1i cache:                               64 KiB (2 instances)
L2 cache:                                2 MiB (2 instances)
L3 cache:                                32 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-3
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Old microcode:             Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:         Vulnerable
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Vulnerable: No microcode
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Cpu Property Value
Brand AMD EPYC 9V74 80-Core Processor
Vendor :AMD
Architecture :Unknown
Model Family: 0xaf, Model: 0x11, Stepping: 0x01, Type: 0x00
Cores 16 physical cores, 16 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 1024, 32768) kbytes
64 byte cache line size
Address Size 48 bits virtual, 48 bits physical
SIMD 256 bit = 32 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC runs at constant rate (invariant from clock frequency)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@mckennapep
mckennapep merged commit a66bacd into main Jul 28, 2026
5 checks passed
@mckennapep
mckennapep deleted the bug-365-emis-cap branch July 28, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant