Print error when multiple independent schedules are identified#245
Merged
gonuke merged 4 commits intosvalinn:mainfrom Feb 21, 2026
Merged
Print error when multiple independent schedules are identified#245gonuke merged 4 commits intosvalinn:mainfrom
gonuke merged 4 commits intosvalinn:mainfrom
Conversation
add variable type to counter add missing semicolon add braces to if statement surround condition with parentheses fix indentation throw error instead of writing to stdout fix break indent change counter value outside of while loop add braces to if statement Revert "add braces to if statement" This reverts commit ab272ad. Revert "change counter value outside of while loop" This reverts commit 7b86f76. don't use break to stop execution of while loop change condition for determining if top schedule is sub
gonuke
requested changes
Feb 20, 2026
Member
gonuke
left a comment
There was a problem hiding this comment.
Suggesting boolean rather than counter
src/Schedule.C
Outdated
Comment on lines
+193
to
+194
| counter++; | ||
| if (counter > 1) |
Member
There was a problem hiding this comment.
Since this error happens as soon as counter is not 0, it is probably more sense for it to be boolean found_top_schedule that starts false and generates an error when you find another when and it's already true, or when you get to the end and it's false.
compare not assign correctly implement conditions
Use boolean instead of counter
Member
|
Can we add a sample problem that causes this error to confirm it does what we want (one step closer to CI!)? |
e8d0467 to
c0dda5e
Compare
add description and change path to library remove extra pulse history
61c063d to
b1c3915
Compare
gonuke
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a counter to keep track of the number of schedule blocks that are not used as sub-schedules, and throws an error when more than one of these schedules is found.
fixes #221