Skip to content

Conversation

@clmould
Copy link
Collaborator

@clmould clmould commented Jan 7, 2026

Description

Check that ixc = 60 (c_tf_turn) is not used when i_tf_turns_integer is 1
Check that ixc = 60 is not used with icc = 77

Updated version of #3114 - this PR was very outdated. Will close #724

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.

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.83%. Comparing base (2f754a2) to head (3f9d78b).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
process/init.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4034      +/-   ##
==========================================
- Coverage   45.88%   41.83%   -4.05%     
==========================================
  Files         123      123              
  Lines       29087    40980   +11893     
==========================================
+ Hits        13346    17144    +3798     
- Misses      15741    23836    +8095     

☔ 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 marked this pull request as ready for review January 7, 2026 11:44
@clmould clmould requested a review from jmorris-uk January 7, 2026 11:44
process/init.py Outdated
data_structure.numerics.icc[: data_structure.numerics.nvar] == 77
).any():
raise ProcessValidationError(
"Cannot use iteration variable 60 and constraint 77 simultaneously"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest this has more information e.g.

Cannot use iteration variable 60 (TF coil current per turn, c_tf_turn) and constraint 77 (maximum TF current per turn) simultaneously.

process/init.py Outdated
data_structure.numerics.ixc[: data_structure.numerics.nvar] == 60
).any() and data_structure.tfcoil_variables.i_tf_turns_integer == 1:
raise ProcessValidationError(
"Iteration variable 60 (c_tf_turn) cannot be used when i_tf_turns_integer == 1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe something like this for more useful information.

Iteration variable 60 (TF current per turn, c_tf_turn) cannot be used with the TF coil integer turn model (i_tf_turns_integer == 1) as it is a calculated output instead for this model. However, the maximum current per turn can be constrained with constraint 77.

@clmould clmould requested a review from jmorris-uk January 13, 2026 13:42
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.

cpttf and cpttf_max error catching (integer turns option)

4 participants