Welcome to C++ Epiabm’s documentation!¶
cEpiabm¶
We provide an efficient and scalable backend in C++, which can run simulations for populations comparable to the UK in a reasonable timeframe. This code may be harder than pyEpiabm for new users to understand, but the parallels with the python code should be sufficiently informative for those who wish to look deeper into the code.
Set up¶
Installation of cEpiabm¶
Cmake is used for installation of the cEpiabm software. The following procedure will compile the code and run all unit tests:
mkdir build_dir
cd build_dir
cmake ../cEpiabm/. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --parallel 2 --target unit_tests
ctest -j2 --output-on-failure
Note that cmake must be installed on your system. The following command can be used on ubuntu systems:
sudo apt-get install cmake cmake-data
We recommend the use of the G++ compiler (version 9 or higher) with
cEpiabm. If other compilers are used, users should ensure they include
the filesystem library, or include this explicitly by inserting
link_libraries(stdc++fs) in the cEpiabm/CMakeLists.txt file.
Compiling cEpiabm Python Bindings¶
Pybind11 is required for compiling cEpiabm with Python bindings. Pybind11 is added as a git submodule, make sure this submodule is cloned along with the main epiabm repository.
Compiling Python bindings follows similar procedure to compiling the cEpiabm tests:
mkdir build_dir
cd build_dir
cmake ../cEpiabm/. -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=OFF
cmake --build . --parallel 6 --target epiabm
cEpiabm’s python bindings will be compiled to a python module named
epiabm, located in build_dir/src/epiabm.cpython-(version info).so.
Contents¶
- SIMULATIONS
- DATACLASSES
- DATACLASSES
epiabm::Populationepiabm::CellCell()~Cell()Cell()Cell()index()forEachMicrocell()forEachPerson()forEachInfectious()forEachNonInfectious()forEachExposed()getPerson()getMicrocell()processQueue()enqueuePerson()people()microcells()initializeInfectiousGrouping()markInfectious()markNonInfectious()markExposed()markRecovered()markDead()numSusceptible()numInfectious()numExposed()numRecovered()numDead()sampleInfectious()sampleSusceptible()initialize()compartmentCount()setLocation()location()personStatusChange()
epiabm::Microcellepiabm::Householdepiabm::HouseholdParamsepiabm::Placeepiabm::Personepiabm::PersonParamsInfectionStatus
- DATACLASSES
- SWEEPS
- CONFIGURATION
- CONFIGURATION
epiabm::SimulationConfigepiabm::PopulationConfigepiabm::InfectionConfigepiabm::HostProgressionConfiglatentPeriodICDFasymptToRecovICDFmildToRecovICDFgpToRecovICDFgpToHospICDFgpToDeathICDFhospToRecovICDFhospToICUICDFhospToDeathICDFicuToICURecovICDFicuToDeathICDFicuRecovToRecovICDFuse_agesprob_gp_to_hospprob_gp_to_recovprob_exposed_to_asymptprob_exposed_to_gpprob_exposed_to_mildprob_hosp_to_deathprob_hosp_to_recovprob_hosp_to_icuprob_icu_to_deathprob_icu_to_icurecovinfectiousness_profile
epiabm::ConfigurationFactoryInterfaceepiabm::JsonFactory
- CONFIGURATION
- REPORTERS
- UTILITIES