Skip to content

Update lablcc labels#4266

Open
chris-ashe wants to merge 4 commits into
mainfrom
update_lablcc_labels
Open

Update lablcc labels#4266
chris-ashe wants to merge 4 commits into
mainfrom
update_lablcc_labels

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

Description

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

Copilot AI review requested due to automatic review settings May 21, 2026 09:27
@chris-ashe chris-ashe requested a review from a team as a code owner May 21, 2026 09:27
@chris-ashe chris-ashe added the Documentation Improvements or additions to documentation label May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the human-readable constraint labels (lablcc) and a few constraint registration/docstring strings to use clearer terminology and more standard fusion-physics notation (subscripts, angle brackets, etc.) in PROCESS’s constraint reporting/output.

Changes:

  • Refreshed process/data_structure/numerics.py:lablcc strings to more descriptive/symbolic labels.
  • Updated constraint registration strings in process/core/solver/constraints.py (e.g., volt-second unit label) and tweaked some docstring text/notation.
  • Simplified constraint 51’s implementation to use vs_plasma_ramp_required directly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
process/data_structure/numerics.py Updates the lablcc constraint label list to newer, more descriptive/symbolic names.
process/core/solver/constraints.py Adjusts selected constraint registration strings and docstrings (including volt-second unit labeling) and refactors constraint 51 to use vs_plasma_ramp_required.
Comments suppressed due to low confidence (1)

process/data_structure/numerics.py:599

  • Constraints 69–71 are not registered in process/core/solver/constraints.py (the registry jumps from 68 to 72), but lablcc still provides labels for them (with # REMOVED). Consider using a consistent placeholder like "NOT USED"/blank here to reflect that these IDs are intentionally unavailable, and to reduce confusion when reading constraint listings.
        "p_sep < psep_kallenbach divertor ",  # REMOVED
        "Separatrix temp consistency      ",  # REMOVED
        "Separatrix density consistency   ",  # REMOVED

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +583 to +586
"Vessel helium concentration limit", # REMOVED
"Pₛₑₚ / R upper limit ",
"TF coil leg rad width lower limit", # REMOVED
"TF coil leg rad width lower limit", # REMOVED
Comment on lines 1193 to 1202
@ConstraintManager.register_constraint(51, "V.s", "=")
def constraint_equation_51(constraint_registration, data):
"""Equation to enforce startup flux = available startup flux

vs_plasma_res_ramp: resistive losses in startup V-s (Wb)
vs_plasma_ind_ramp: internal and external plasma inductance V-s (Wb))
vs_plasma_ramp_required: Required flux swing for startup (Wb)
vs_cs_pf_total_ramp: total flux swing for startup (Wb)
"""
return eq(
abs(
data_structure.physics_variables.vs_plasma_res_ramp
+ data_structure.physics_variables.vs_plasma_ind_ramp
),
abs(data_structure.physics_variables.vs_plasma_ramp_required),
data.pf_coil.vs_cs_pf_total_ramp,
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.14%. Comparing base (11881e8) to head (b42f9b5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4266      +/-   ##
==========================================
+ Coverage   50.13%   50.14%   +0.01%     
==========================================
  Files         151      151              
  Lines       29343    29355      +12     
==========================================
+ Hits        14710    14719       +9     
- Misses      14633    14636       +3     

☔ 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.

@clmould clmould self-assigned this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants