diff --git a/core/PhysiCell_signal_behavior.cpp b/core/PhysiCell_signal_behavior.cpp index 8780e8d7c..fb0b9192c 100644 --- a/core/PhysiCell_signal_behavior.cpp +++ b/core/PhysiCell_signal_behavior.cpp @@ -79,6 +79,8 @@ std::map behavior_to_int; std::map int_to_signal; std::map int_to_behavior; +int contact_with_built_in = 5; // live, dead, apoptotic, necrotic, other + void setup_signal_behavior_dictionaries( void ) { extern std::unordered_map cell_definition_indices_by_name; @@ -804,7 +806,7 @@ std::vector get_signals( Cell* pCell ) signals[volume_ind] = pCell->phenotype.volume.total; // physical contact with cells (of each type) - // increment signals + // increment signals int dead_cells = 0; int apop_cells = 0; int necro_cells = 0; @@ -964,7 +966,7 @@ std::vector get_cell_contact_signals( Cell* pCell ) // rescale std::string search_for = "contact with " + cell_definitions_by_type[0]->name; static int scaling_start_index = find_signal_index( search_for ); - for( int i=0; i < n+2 ; i++ ) + for( int i=0; i < n+contact_with_built_in; i++ ) { output[i] /= signal_scales[scaling_start_index+i]; } return output; @@ -986,7 +988,7 @@ std::vector get_selected_signals( Cell* pCell , std::vector indices for( int i=0; i < indices.size() ; i++ ) { int ind = indices[i]; - if( ind >= contact_start_index && ind < contact_start_index+n+2) + if( ind >= contact_start_index && ind < contact_start_index+n+contact_with_built_in ) { signals[i] = contact_signals[ind-contact_start_index]; } else { signals[i] = get_single_signal( pCell , ind ); } @@ -1065,7 +1067,7 @@ double get_single_signal( Cell* pCell, int index ) // physical contact with cells (of each type) // individual contact signals are a bit costly static int contact_ind = find_signal_index( "contact with " + cell_definitions_by_type[0]->name ); - if( contact_ind <= index && index < contact_ind + n+2 ) + if( contact_ind <= index && index < contact_ind+n+contact_with_built_in ) { std::vector counts( n , 0 ); // process all neighbors