Skip to content

apply rules BEFORE checking for transformation #292

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

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions core/PhysiCell_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,16 @@ void Cell::update_motility_vector( double dt_ )

void Cell::advance_bundled_phenotype_functions( double dt_ )
{
// New March 2022
// perform transformations
standard_cell_transformations( this,this->phenotype,dt_ );

// New March 2023 in Version 1.12.0
// call the rules-based code to update the phenotype
if( PhysiCell_settings.rules_enabled )
{ apply_ruleset( this ); }

// New March 2022
// perform transformations
standard_cell_transformations( this,this->phenotype,dt_ );

if( get_single_signal(this,"necrotic") > 0.5 )
{
double rupture = this->phenotype.volume.rupture_volume;
Expand Down Expand Up @@ -1168,6 +1170,9 @@ void Cell::convert_to_cell_definition( Cell_Definition& cd )
* phenotype.mechanics.relative_maximum_adhesion_distance;
}
}

if( PhysiCell_settings.rules_enabled )
{ apply_ruleset( this ); } // don't wait for the start of the next phenotype update to apply the rules to this cell
return;
}

Expand Down
Loading