Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow control of *Resistance and FractionalFlow #716

Merged
merged 8 commits into from
Nov 13, 2023
Merged

allow control of *Resistance and FractionalFlow #716

merged 8 commits into from
Nov 13, 2023

Conversation

visr
Copy link
Member

@visr visr commented Oct 31, 2023

Fix #718
Fix #722

Not sure if this works yet or if the validation is just too strict. Before merging this should be covered by a test model.

The initial fractions come from whatever happens to be the last control state per node, and therefore can trigger false positive validation errors.

Now we validate this per control state. To make that work I had to add the missing control state to the `control_mapping`. For simplicity I coalesce a missing `control_state` to the empty string. I wonder if that is the right approach though, since for e.g. name we default to the empty string rather than support missing. We should probably settle on either for all string columns.
@visr
Copy link
Member Author

visr commented Nov 3, 2023

Copying commit message a52d490 for visibility:

Fix FractionalFlow sum to 1 validation with control states

The initial fractions come from whatever happens to be the last control state per node, and therefore can trigger false positive validation errors.

Now we validate this per control state. To make that work I had to add the missing control state to the control_mapping. For simplicity I coalesce a missing control_state to the empty string. I wonder if that is the right approach though, since for e.g. name we default to the empty string rather than support missing. We should probably settle on either for all string columns.

@evetion what do you recommend for missing / default string columns; missing or ""?

@visr visr marked this pull request as ready for review November 13, 2023 13:39
@visr
Copy link
Member Author

visr commented Nov 13, 2023

I made #777 for extra test coverage, and folded #772 into here since it has related control fixes that needed this branch to test.

Copy link
Collaborator

@SouthEndMusic SouthEndMusic left a comment

Choose a reason for hiding this comment

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

Looks good (:

@visr visr merged commit 0d17130 into main Nov 13, 2023
15 checks passed
@visr visr deleted the allow-control branch November 13, 2023 15:14
@visr visr mentioned this pull request Nov 14, 2023
4 tasks
@evetion
Copy link
Member

evetion commented Nov 14, 2023

@evetion what do you recommend for missing / default string columns; missing or ""?

For naming things, so which not influence the numerics, I'm fine with "". Otherwise I like the explicit handling of missing with coalesce.

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.

Allow control of FractionalFlow Allow control of ManningResistance and LinearResistance
3 participants