EcoliSimulator  2.0.1a
simulation_2MultiT.hpp File Reference
#include <stdio.h>
#include <string>
#include "Funz_C.h"
#include "E_Coli.h"
#include "LoadBar.hpp"

Go to the source code of this file.

Functions

int Stima_tempo (int n_c, int n_val_termine, int &j_cel_finale, int &j_cel_inizio, time_t timer1)
 
int initial_position (int j, double *x, double *x0, double Raggio, int num_dist, int &cont_dist_5, int delta_dist_cont, double Delta_delta_dist)
 
void timestamp ()
 
void funz_clear ()
 
int simulation_2 (E_coli *batterio, double T_f, Funz_C *f, double *x0, double dt, int n_c, double Raggio, int delta_dist, int num_dist, int const_salv, std::string *names_files_Ecoli_mod, std::string names_indice_mod, std::string *names_files_tau_mod, std::string names_file_dyn_mod, std::string *names_info_mod, int n_sim, int cont_gen_sim, int tot_bacteria, int n_thread=1)
 
void startThreadSimulation (E_coli *batterio, double T_f, Funz_C *f, array< double, 2 > x0, double dt, int n_c, double Raggio, int delta_dist, int num_dist, int const_salv, string *names_files_Ecoli_mod, string names_indice_mod, string *names_files_tau_mod, string names_file_dyn_mod, string *names_info_mod, int n_sim, int cont_gen_sim, int n_thread, int &dim_colonne)
 
string setNametempFiles (string name, int n_thread)
 set the name of the temporary files ... More...
 
int simulation_2MultiT (E_coli *batterio, double T_f, Funz_C *f, double *x0, double dt, int n_c, double Raggio, int delta_dist, int num_dist, int const_salv, string *names_files_Ecoli_mod, string names_indice_mod, string *names_files_tau_mod, string names_file_dyn_mod, string *names_info_mod, int n_sim, int cont_gen_sim, int n_thread)
 Function that performs the actual simulation of independent population. More...
 
void makeDuplicate (E_coli *batterio, vector< E_coli * > &batterioCopy, Funz_C *f, vector< Funz_C * > &fCopy, int n_thread)
 This function create a duplicate of the base bacterium and f_c: More...
 
int mergeFilesSimulation (int n_thread, string *names_files_Ecoli_mod, string names_indice_mod, string *names_files_tau_mod, string names_file_dyn_mod)
 This function merges the files together. More...
 

Function Documentation

void funz_clear ( )

This function clear the terminal (different command according to the system)

int initial_position ( int  j,
double *  x,
double *  x0,
double  Raggio,
int  num_dist,
int &  cont_dist_5,
int  delta_dist_cont,
double  Delta_delta_dist 
)

This function set the initial position. What it does is: if the distribution is the n. 5, then update the new center, otherwise it calls dist_iniz(x,x0,Raggio,num_dist).

Parameters
x[]position of pacterium (to be set)
x0[]initial position, set in the menu
Rradius distribution
typeof distribution, see menu
Returns
if the initial position change return 1, otherwise 0. If the position didn't change the initial condition for this bacterium are the same as the previous one, so we don't have to perform initial-condition calculation.
void makeDuplicate ( E_coli batterio,
vector< E_coli * > &  batterioCopy,
Funz_C f,
vector< Funz_C * > &  fCopy,
int  n_thread 
)

This function create a duplicate of the base bacterium and f_c:

int mergeFilesSimulation ( int  n_thread,
string *  names_files_Ecoli_mod,
string  names_indice_mod,
string *  names_files_tau_mod,
string  names_file_dyn_mod 
)

This function merges the files together.

string setNametempFiles ( string  name,
int  n_thread 
)

set the name of the temporary files ...

int simulation_2 ( E_coli batterio,
double  T_f,
Funz_C f,
double *  x0,
double  dt,
int  n_c,
double  Raggio,
int  delta_dist,
int  num_dist,
int  const_salv,
std::string *  names_files_Ecoli_mod,
std::string  names_indice_mod,
std::string *  names_files_tau_mod,
std::string  names_file_dyn_mod,
std::string *  names_info_mod,
int  n_sim,
int  cont_gen_sim,
int  tot_bacteria,
int  n_thread = 1 
)
int simulation_2MultiT ( E_coli batterio,
double  T_f,
Funz_C f,
double *  x0,
double  dt,
int  n_c,
double  Raggio,
int  delta_dist,
int  num_dist,
int  const_salv,
string *  names_files_Ecoli_mod,
string  names_indice_mod,
string *  names_files_tau_mod,
string  names_file_dyn_mod,
string *  names_info_mod,
int  n_sim,
int  cont_gen_sim,
int  n_thread 
)

Function that performs the actual simulation of independent population.

void startThreadSimulation ( E_coli batterio,
double  T_f,
Funz_C f,
array< double, 2 >  x0,
double  dt,
int  n_c,
double  Raggio,
int  delta_dist,
int  num_dist,
int  const_salv,
string *  names_files_Ecoli_mod,
string  names_indice_mod,
string *  names_files_tau_mod,
string  names_file_dyn_mod,
string *  names_info_mod,
int  n_sim,
int  cont_gen_sim,
int  n_thread,
int &  dim_line_save 
)

start a thread of simulation.

int Stima_tempo ( int  n_c,
int  n_val_termine,
int &  j_cel_finale,
int &  j_cel_inizio,
time_t  timer1 
)

This function extimate the time to finish the simulation

void timestamp ( )