Repository navigation
Conversation
Growth and contact did not interact: Simulation.step committed growth before any relaxation ran, so a colony with nowhere to go kept elongating into itself. A closed chamber with room for about ten cells held 256 fully overlapping cells after 200 steps. Simulation.step(dt, GrowthLimitParameters) scales each cell's elongation by its deepest overlap with a neighbor: unaffected up to free_overlap cell radii, falling linearly to zero at stall_overlap. The scaling is applied before species, coupled, and signal updates, so uptake tied to volume change is charged for the growth that happened. It runs on every backend through the backend's own contact search. MechanicsConfig gains growth_limit, growth_free_overlap, and growth_stall_overlap. The limit is off by default, and a controller payload without these fields resumes with it off. The trap example uses it in place of its own regulation-callback rule. The limit depends on what relaxation can do. A full closed space can still hold pairs overlapping by more than a radius, and with stiff relaxation its population creeps upward; the contact mechanics design records both.
Collaborator
Author
|
Closing in favour of #54. This change limited growth by measured overlap, on top of a relaxation that cannot keep cells apart in a full space. #54 replaces that approach: contact is solved with non-negative forces, and growth is part of the same solve, so a cell's elongation responds to the load on it and a full space stops growing. The trap example there uses the new solve in place of the overlap rule added here. The plan and literature are in #53. |
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.
Part of #51. This does not close it: it bounds the population of a confined colony, but it does not make the contact relaxation resolve a full space cleanly. See "Not fixed" below.
Problem
Growth and contact did not interact.
Simulation.stepcommitted growth before any relaxation ran, andrelax_cell_mechanicsintegrated without length increments, so a colony with nowhere to go kept elongating into itself.Changes
Simulation::step(dt, GrowthLimitParameters). Before growth it finds the cell contacts of the starting geometry and takes each cell's deepest overlap with a neighbor, in units of that cell's radius. Elongation is unaffected up tofree_overlap(default 0.1), falls linearly, and is zero fromstall_overlap(default 0.4).MechanicsConfiggainsgrowth_limit,growth_free_overlap, andgrowth_stall_overlap. The limit is off by default. A checkpoint without these fields resumes with it off.MODEL_VERSIONis 6.Measurements
Closed 4 x 4 x 1.2 chamber (radius 0.4, divide above length 2),
dt = 0.05, CPU, defaultgamma = 10:Unconfined colony,
gamma = 100, at 256 cells: 94% of the unlimited total length (761 against 806), with 90th-percentile overlap 0.24 radii against 0.41.The trap example's steady-state test passes unchanged with the engine limit.
Verification
New tests cover the linear band on CPU and Metal, cells out of contact, shrinkage, rejected parameters, nutrient charged in proportion to the growth kept, the config round trip and a payload without the new fields, the closed chamber filling and then holding, and an unconfined colony keeping at least 85% of its unlimited length.
Not fixed
gamma = 100the same chamber keeps trading overlap between pairs, cells that come out shallow resume growing, and it reaches 16 cells and a footprint of 1.56 by t = 40.gamma = 10under-relaxes large colonies. By the time an unlimited unconfined colony reaches 1,024 cells (t = 10), the limited one atgamma = 10holds 333, about a third of the total length, with a median overlap of 0.27 radii. The limit needsgammanear 100 to leave free growth alone, which is the setting that creeps when confined. No single setting does both, which is why the limit is opt-in and no default changed.Closing #51 needs a relaxation scheme that treats contacts as inequalities and keeps pairs from inverting. That is separate work.
🤖 Generated with Claude Code