Skip to content

Commit

Permalink
pot bug fix and update
Browse files Browse the repository at this point in the history
  • Loading branch information
DeshanPerera committed Sep 26, 2024
1 parent 6849f3c commit c26178b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cancer_Host.cu
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ void cancer_Host::simulate_Generations(functions_library &functions,

for (int tissue = 0; tissue < num_Tissues; tissue++)
{
if (filesystem::exists(source_sequence_Data_folder + "/" + to_string(tissue) + "/generation_" + to_string(overall_Generations)))
{
string source_sequence_Data_folder_Tissue = source_sequence_Data_folder + "/" + to_string(tissue) + "/generation_" + to_string(overall_Generations);
vector<pair<int, int>> seq_Files = functions.index_sequence_Folder(source_sequence_Data_folder_Tissue);
if (seq_Files.size() > 0)
{
current_cell_load_per_Tissue[tissue] = seq_Files[seq_Files.size() - 1].second + 1;
cout << tissue << " Check: " << current_cell_load_per_Tissue[tissue] << endl;
}
}

real_Particle_count_per_Tissue[tissue] = current_cell_load_per_Tissue[tissue] - removed_by_Transfer_Indexes[tissue].size() - dead_Particle_count[tissue];
cout << tissue_Names[tissue] << " tissue: " << real_Particle_count_per_Tissue[tissue] << endl;
sum_Check = sum_Check + real_Particle_count_per_Tissue[tissue];
Expand Down Expand Up @@ -489,6 +500,8 @@ void cancer_Host::simulate_Generations(functions_library &functions,
decimal_Date = decimal_Date + date_Increment;
overall_Generations++;

free(real_Particle_count_per_Tissue);

cout << "\nCompleted generation " << overall_Generations << " of time: " << decimal_Date << endl;

if (stop_gen_Mode == 0)
Expand Down
Binary file modified main
Binary file not shown.
2 changes: 1 addition & 1 deletion parameters_Cancer/individual_Profiles/node_Master.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"Terminal load tissues":"1,2,3",

"Metastatic migration":"No",
"Metastatic migration":"Yes",

"Cell migration":{

Expand Down

0 comments on commit c26178b

Please sign in to comment.