-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix bug related to maximum/minimum saturation values and uniqueness test for rules #213
Conversation
Bug fixed: Previously in a scenario with multiple rules in the same response (increase or decrease) the last rule defined the max/min response value of behavior. Right now, it checks the min/max response value for all rules of the same behavior.
In the previous implementation, the last rule determined the maximum or minimum response of the behavior. In the current update, the behavior now checks for the maximum and minimum response in all rules. In cases where the minimum or maximum values do not exist, the system defaults to using the base value.
I think this is something we want to address. It never feels right to assign a parameter value that is used only when the stars align. So, this seems like a good step in that direction. It looks like changes were not made for v0? I can't say I'm well-versed in that version, so not sure if that's an issue. It looks like v0 will use the last signal to set the min/max behaviors as well as the base_value? On a similar note, I think a more longterm solution is to move to an XML-based rules specification. I have a branch with this implemented: https://github.com/drbergman/PhysiCell/tree/feature-xml-rules Happy to make a PR on this to MathCancer:development if others agree. |
Adjust to the V0
Thanks for pointing that out. I've incorporated tests into the v0 rules as well. During testing, I experimented with the rules listed below within the template project, making order changes, and selectively including or removing rules. I also checked the behavior by printing the values of min, base, and max in the evaluate() method of the Hypothesis_rules class, using an old-school debugging style. rules v0: rules v1: rules v2: print code:
P.S.: I believe that having the option to include rules in the XML could be very interesting. |
As discussed, the rule is defined as unique if the cell, behavior, signal, and response are equal. Previously, the test only included the signal; in this pull request, we have added the response test.
As discussed, the rule is defined as unique if the cell, behavior, signal, and response are equal. Previously, the test only included the signal; in this pull request, we have added the response test. I test it with these rules: default,substrate,increases,cycle entry,0.003333,0.2,10,0 |
Can you confirm that these cells are using the Live Cell model? |
Yes, they are using live cell model. I will send you the xml and IC by slack. |
std::endl; | ||
|
||
return; | ||
exit(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we're now throwing an error on this. Don't want to quietly disregard faulty user input
In the previous implementation, the last rule determined the maximum or minimum response of the behavior. In the current update, the behavior now checks for the maximum and minimum response in all rules. In cases where the minimum or maximum values do not exist, the system defaults to using the base value.