Skip to content

Compare neighbor type against diff_type in the interactions sample - #434

Open
drbergman wants to merge 1 commit into
MathCancer:developmentfrom
drbergman:fix-interaction-sample-diff-type
Open

Compare neighbor type against diff_type in the interactions sample#434
drbergman wants to merge 1 commit into
MathCancer:developmentfrom
drbergman:fix-interaction-sample-diff-type

Conversation

@drbergman

@drbergman drbergman commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

An obvious typo in the interactions sample project. Fixing this likely changes simulation output and so we would need to fix the test artifacts.

In stem_cell_phenotype() the neighbor-counting loop tested
`pC->type == num_differentiated`, comparing the neighbor's type against the
running num_differentiated counter instead of against diff_type.

Because num_differentiated starts at 0, the test walked up the cell
definition list as it incremented: with this sample's definitions
(bacteria=0, blood vessel=1, stem=2, differentiated=3) it first counted
bacteria neighbors, then blood vessel, then stem, and only then
differentiated. num_differentiated feeds the stem cycling exit rate, so
stem proliferation was driven by the wrong contact count.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 19, 2026 15:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants