EcoliSimulator  2.0.1a
simulation_2.cpp File Reference
#include <iostream>
#include <vector>
#include <fstream>
#include <cmath>
#include <sstream>
#include <ctime>
#include <thread>
#include <cstring>
#include "Funz_C.h"
#include "Funz_C_Par.h"
#include "E_Coli.h"
#include "ParameterEstimation_E_Coli.h"
#include "CV_rExp_tExp.h"
#include "GlobalVariables.h"
#include "GlobalRandomVariables.h"
#include "LoadBar.hpp"
#include "constants.h"

Macros

#define max(a, b)   ( ((a) > (b)) ? (a) : (b) )
 
#define min(a, b)   ( ((a) < (b)) ? (a) : (b) )
 
#define n_val_termine   200
 

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_clearAll ()
 
void loadbar (unsigned int x, unsigned int n, int time_, unsigned int w)
 
void funz_clear ()
 
int simulation_2 (E_coli *batterio, double T_f, Funz_C *f, double *x_0, 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 tot_bacteria, int n_thread)
 

Macro Definition Documentation

#define max (   a,
 
)    ( ((a) > (b)) ? (a) : (b) )
#define min (   a,
 
)    ( ((a) < (b)) ? (a) : (b) )
#define n_val_termine   200

Function Documentation

void funz_clear ( )

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

void funz_clearAll ( )
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 loadbar ( unsigned int  x,
unsigned int  n,
int  time_,
unsigned int  w 
)
int simulation_2 ( E_coli batterio,
double  T_f,
Funz_C f,
double *  x_0,
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  tot_bacteria,
int  n_thread 
)

Function that performs the actual simulation of independent population

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 ( )