22
22
#include " utils_aux.h"
23
23
#include " hyperparams.h"
24
24
#include " tumor_cell.h"
25
+ #include " cart_cell.h"
25
26
#include " core/agent/agent.h"
26
27
#include " core/container/math_array.h"
27
28
#include " core/real_t.h"
@@ -122,15 +123,15 @@ std::tuple<size_t, size_t, size_t, size_t, size_t, size_t, size_t, real_t, real_
122
123
123
124
// Count tumor cells by type and accumulate oncoprotein levels if the cell is alive
124
125
switch (tumor_cell->GetType ()) {
125
- case 1 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type1++; break ;
126
- case 2 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type2++; break ;
127
- case 3 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type3++; break ;
128
- case 4 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type4++; break ;
129
- case 5 : num_tumor_cells_type5_dead++; break ;
126
+ case TumorCellType:: kType1 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type1++; break ;
127
+ case TumorCellType:: kType2 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type2++; break ;
128
+ case TumorCellType:: kType3 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type3++; break ;
129
+ case TumorCellType:: kType4 : acumulator_oncoprotein += tumor_cell->GetOncoproteinLevel (); num_tumor_cells_type4++; break ;
130
+ case TumorCellType:: kType5 : num_tumor_cells_type5_dead++; break ;
130
131
default : break ;
131
132
}
132
- } else if (auto * cart_cell = dynamic_cast <const CartCell *>(agent)) {
133
- if (cart_cell->GetState () == CartCellState ::kAlive )
133
+ } else if (auto * cart_cell = dynamic_cast <const CarTCell *>(agent)) {
134
+ if (cart_cell->GetState () == CarTCellState ::kAlive )
134
135
num_alive_cart++;
135
136
}
136
137
});
@@ -152,7 +153,7 @@ void OutputSummary::operator()() {
152
153
std::ofstream file (" output/final_data.csv" , std::ios::app);
153
154
if (file.is_open ()) {
154
155
if (current_step == 0 ) {
155
- file << " total_days,total_hours,total_minutes,tumor_radius,num_cells,num_tumor_cells,tumor_cells_type1,tumor_cells_type2,tumor_cells_type3,tumor_cells_type4,tumor_cells_type5_dead,num_alive_cart, average_oncoprotein, average_oxygen_cancer_cells\n " ;// Header for CSV file
156
+ file << " total_days,total_hours,total_minutes,tumor_radius,num_cells,num_tumor_cells,tumor_cells_type1,tumor_cells_type2,tumor_cells_type3,tumor_cells_type4,tumor_cells_type5_dead,num_alive_cart,average_oncoprotein,average_oxygen_cancer_cells\n " ;// Header for CSV file
156
157
}
157
158
158
159
// Calculate time in days, hours, minutes
@@ -241,7 +242,7 @@ void SpawnCart::operator()() {
241
242
real_t px,py,pz,radi_sq;
242
243
243
244
auto * ctxt = simulation->GetExecutionContext ();
244
- CartCell * cart = nullptr ;
245
+ CarTCell * cart = nullptr ;
245
246
246
247
for ( unsigned int i=0 ;i < cells_to_spawn ; i++ ){
247
248
// look for a valid position
@@ -252,7 +253,7 @@ void SpawnCart::operator()() {
252
253
radi_sq = px*px + py*py + pz*pz;
253
254
}while (minimum_squared_radius > radi_sq);
254
255
// spawn CAR-T
255
- cart = new CartCell ({px,py,pz});
256
+ cart = new CarTCell ({px,py,pz});
256
257
cart->AddBehavior (new StateControlCart ());
257
258
ctxt->AddAgent (cart);
258
259
}
0 commit comments