Skip to content

Split nu into xi_ss and xi_tpi - #1224

Open
arihantlodha-cmd wants to merge 1 commit into
PSLmodels:masterfrom
arihantlodha-cmd:split-nu-into-xi
Open

arihantlodha-cmd wants to merge 1 commit into
PSLmodels:masterfrom
arihantlodha-cmd:split-nu-into-xi

Conversation

@arihantlodha-cmd

Copy link
Copy Markdown
Contributor

What this does

Closes #1099. The single nu parameter set the convergence (dampening) rate of functional iteration for both the steady-state and the transition-path solutions, but the documentation refers to two separate parameters, xi_ss and xi_tpi. This splits nu into those two so the code matches the docs and the two solutions can be damped independently.

Changes

  • default_parameters.json: replace nu with xi_ss and xi_tpi (both default 0.4, same range validators), notation $\xi_{ss}$ and $\xi_{tpi}$.
  • SS.py: the SS outer loop now uses p.xi_ss.
  • TPI.py: the TPI outer loop now uses p.xi_tpi.
  • tests/testing_params.json and the parameters reference doc updated to match.

Behavior and compatibility

Both new parameters default to nu's previous value (0.4), so default runs are unchanged: a baseline SS still solves to r = 0.0628, and tests/test_parameters.py passes (16 passed).

This is a breaking rename for any configuration or downstream model that sets nu directly; those should set xi_ss and xi_tpi instead. Flagging in case a deprecation shim for nu is preferred over a hard rename, happy to add one.

Closes PSLmodels#1099. The single nu parameter set the convergence (dampening) rate
of functional iteration for both the steady-state and transition-path
solutions, but the documentation refers to two separate parameters, xi_ss
and xi_tpi. This splits nu into those two parameters so the code matches the
documentation and the two solutions can be damped independently.

- default_parameters.json: replace nu with xi_ss and xi_tpi (both default
  0.4, same range validators), with notation $\xi_{ss}$ and $\xi_{tpi}$.
- SS.py: the SS outer loop now uses p.xi_ss.
- TPI.py: the TPI outer loop now uses p.xi_tpi.
- tests/testing_params.json and the parameters reference doc updated to
  match.

Both new parameters default to nu's previous value, so default runs are
unchanged (a baseline SS still solves to r = 0.0628). This is a breaking
rename for any configuration or downstream model that sets nu directly;
those should set xi_ss and xi_tpi instead.
@jdebacker

Copy link
Copy Markdown
Member

@arihantlodha-cmd Can you run make format on this branch?

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.17%. Comparing base (9baa4b2) to head (ef51252).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
ogcore/TPI.py 0.00% 10 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1224   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files          24       24           
  Lines        6031     6031           
=======================================
  Hits         4534     4534           
  Misses       1497     1497           
Flag Coverage Δ
unittests 75.17% <9.09%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ogcore/SS.py 79.05% <100.00%> (ø)
ogcore/TPI.py 52.84% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

Change "nu" parameter to "xi_ss" and "xi_tpi"

3 participants