/CancerModel

Primary LanguagePython

Requirements

Python libraries:

Numpy Pandas Mesa

Running the simulation

To run the simulation for a configured sample size do:

python run_with_config.py

You can modify the config file config.toml , or create your own (in the same directory).

Visualizing the simulation in your browser

To run the simulation in your browser type:

python browser.py

Config file options

Simulation options

sample_size - The number of times the simulation will be run.

steps - The number of steps in each simulation run.

Tumor options

tumor movement stopping range - The range of movement stopping rates that can be selected. Eeach agent chooses at random from range 0-movement-stopping-range, and this will determine how much the probability of stepping on a CC will be reduced.

tumor mutation probability The probability (at each simulation step) that the tumor will mutate (default: 0.01)

modifier_fraction - The fraction of CC's that will have modifiers (the modifiers affect the probabilities (Pk,Pi...)), default=0.1

turn off modifiers - If this option is set to True, there will be no CCs with (default=False)

is_growing - If this is true the tumor will grow (default =true)

growth_probability - The probability that the tumor will grow, at each step (default = 0.01)

Model options

injection_type - Specifies how the nanoparticles are injected. If set to random it will be inserted at n random places. n is specified by injection_points parameter

mutation_percentage (default 5) - THe percentage of the population that will be mutated, duplicated and removed. *Mutated : The middle 5 percent *Duplicated: The top 5 percent *Removed: The worse 5 percent

CC_number - The number of Cancer Cells

NA_number - The number of NanoAgents

steps before mutation (default 10) - At every 10 steps, the population will mutate.

Agent options

curiosity (default 0.5)- This will be multiplied with Pa when encountering an unknown cell

memory_type - Is set to either "random" (picks memory random from [0-memory_limit]) or a number representing the fixed memory size

memory_limit - Determines the limit of the random memory size choice

probabilities limit (default 1) - The probabilities (Pa,Pi..) are chosen between zero and the limits