Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

juliorodrigues07/computational_modeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 3.10.6 C++

Computational Modeling

Computational modeling practical exercises, ODEs solvers and methods implementations (Evaluative exercises from Introduction to Computational Modeling Course - DCOMP - UFSJ).

Requirements

  • Python3 and pip package manager:

    sudo apt install python3 python3-pip build-essential python3-dev
    
  • G++ compiler:

    sudo apt install build-essential
    
  • Cython compiler:

    pip install Cython
    
  • pandas library:

    pip install pandas
    
  • numpy library:

    pip install numpy
    
  • SciPy library:

    pip install scipy
    
  • Matplotlib library:

    pip install matplotlib
    
  • To install all dependencies:

    ./install_dependencies.sh
    
  • Boost library

Compilation

  • Genetic Algorithm:

    make
    

Execution

You can alter the ODEs solver methods and several parameters (initial population, rates, timestep...) directly in the source code before running. The instructions for simulating each model are as it follows:

Basic Models

  • Chemical Reactions:

    python3 chemical_reactions.py
    
  • Lotka-Volterra:

    python3 lotka_volterra.py
    
  • Species Competition (ODE and Cellular Automata):

    python3 species_competition.py
    
  • Inhibiting Competition:

    python3 inhibiting_competition.py
    

SIRS Model

  • Differential Evolution:

    python3 differential_evolution.py
    
  • Genetic Algorithm (*):

    make run
    
  • Gillespie:

    python3 gillespie.py
    

(*) Running the genetic algorithm requires the download of Boost library. After downloading, extract it inside src directory and change the path in the Makefile.