Skip to content

Use saturation-weighted effective sink in destination sampling#267

Merged
FlxPo merged 1 commit intomainfrom
saturation
Feb 24, 2026
Merged

Use saturation-weighted effective sink in destination sampling#267
FlxPo merged 1 commit intomainfrom
saturation

Conversation

@FlxPo
Copy link
Contributor

@FlxPo FlxPo commented Feb 24, 2026

This PR aligns destination sampling with saturation dynamics already used in programme utility evaluation, and removes redundant remaning sink computations. See #266.

Changes

  • state_initializer.py

    • Removed sink_available creation.
    • Sink schema now: ["to", "motive", "sink_capacity", "k_saturation_utility"].
  • state_updater.py

    • Removed sink_available recomputation/output in get_new_sinks.
    • Kept saturation update via k_saturation_utility.
  • destination_sequence_sampler.py

    • Replaced hard-availability logic with soft saturation-weighted mass:
      effective_sink = sink_capacity * k_saturation_utility * prob
    • Replaced all sampling opportunity uses:
      • p_to normalization now uses effective_sink
      • bin aggregation now sums effective_sink
      • radiation cumulative s_ij now uses effective_sink
  • Updated related docstrings.

Notes

This keeps saturation active in both destination proposal and programme utility scoring.
No behavior change to external interfaces; this is an internal consistency cleanup.

@FlxPo FlxPo self-assigned this Feb 24, 2026
@FlxPo FlxPo added the enhancement New feature or request label Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.42%. Comparing base (aacd80a) to head (84dc7d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #267   +/-   ##
=======================================
  Coverage   70.42%   70.42%           
=======================================
  Files          56       56           
  Lines        2424     2424           
=======================================
  Hits         1707     1707           
  Misses        717      717           

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FlxPo FlxPo closed this Feb 24, 2026
@FlxPo FlxPo reopened this Feb 24, 2026
@FlxPo FlxPo merged commit 9f33b5e into main Feb 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant