# srikantvenkitachalam/single-generation-simulation-framework architecture

> Architecture diagram of the GitHub repository srikantvenkitachalam/single-generation-simulation-framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/srikantvenkitachalam/single-generation-simulation-framework
- Repository: https://github.com/srikantvenkitachalam/single-generation-simulation-framework

## Overview

This repository is a research simulation framework for exploring larval crowding in laboratory Drosophila populations. Users either run MultiRun.py to generate simulation data or execute figure-specific scripts that configure cultures, simulate development, and plot outcomes. Trait generation supplies individual variation; Culture models the food environment and population interactions, with Larva representing individual animals. The README identifies the Results directory as the source of existing data. Several figure scripts and model variants are listed, but their internal calls were not sampled, so those links are omitted.

Main entry points: [`Culture_class.py`](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Culture_class.py) (Culture simulation), [`Traits.py`](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Traits.py) (Trait generator), [`MultiRun.py`](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/MultiRun.py) (Batch runs), [`Fig2BaseModelUncrowd.py`](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig2BaseModelUncrowd.py) (Base uncrowded)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation core"]
  node_traits["Trait generator<br/>[Traits.py]"]
  node_culture["Culture simulation<br/>[Culture_class.py]"]
  node_larva["Larval agent<br/>[Larva_class.py]"]
end

subgraph group_experiments["Simulation runs"]
  node_multirun["Batch runs<br/>[MultiRun.py]"]
  node_run10["Deep shallow run"]
end

subgraph group_figures["Figure analyses"]
  node_traits3ml["Deep shallow analysis"]
  node_fig4["Permeation and occupancy"]
  node_fig2["Base uncrowded"]
  node_suppwaste["Waste base model"]
  node_suppexpanded["Expanded uncrowded"]
  node_wastecrowd["Waste crowding<br/>[WasteCrowdBase.py]"]
  node_basecrowd["Base crowding<br/>[BaseModelCrowd.py]"]
  node_basefull["Full framework"]
  node_baseeffects["Main effects model"]
  node_fig3["Main effects analysis"]
  node_fig3expanded["Expanded model analysis"]
  node_fig5["Total effects plots<br/>[Fig5toteffplots.py]"]
  node_regressions["Regression analysis<br/>[Regressions.py]"]
end

subgraph group_data["Simulation data"]
  node_results[("Stored results")]
end

node_user(("Researcher"))

node_user -->|"runs batches"| node_multirun
node_user -.->|"runs analysis"| node_fig2
node_multirun -->|"creates cultures"| node_culture
node_multirun -->|"generates traits"| node_traits
node_traits3ml -->|"configures and runs"| node_culture
node_traits3ml -->|"generates traits"| node_traits
node_fig4 -->|"runs cultures"| node_culture
node_fig4 -->|"generates traits"| node_traits
node_fig2 -->|"runs culture"| node_culture
node_fig2 -->|"generates traits"| node_traits
node_suppwaste -->|"runs culture"| node_culture
node_suppwaste -->|"generates traits"| node_traits
node_suppexpanded -->|"runs culture"| node_culture
node_suppexpanded -->|"generates traits"| node_traits
node_wastecrowd -->|"runs cultures"| node_culture
node_wastecrowd -->|"generates traits"| node_traits
node_basecrowd -->|"runs cultures"| node_culture
node_basecrowd -->|"generates traits"| node_traits
node_culture -->|"creates larvae"| node_larva
node_user -->|"loads existing data"| node_results

click node_traits "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Traits.py"
click node_culture "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Culture_class.py"
click node_larva "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Larva_class.py"
click node_multirun "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/MultiRun.py"
click node_run10 "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Run10Traits3mLDeepShallow.py"
click node_traits3ml "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Traits3mLDeepShallow.py"
click node_fig4 "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig4PermeationDigSAOccupancy.py"
click node_fig2 "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig2BaseModelUncrowd.py"
click node_suppwaste "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/SuppFigWasteBaseModelUncrowd.py"
click node_suppexpanded "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/SuppFigExpandedModelUncrowd.py"
click node_wastecrowd "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/WasteCrowdBase.py"
click node_basecrowd "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/BaseModelCrowd.py"
click node_basefull "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/BaseModelfullframework.py"
click node_baseeffects "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Basefullframework_MainEffects.py"
click node_fig3 "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig3_MainEffects.py"
click node_fig3expanded "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig3expanded_model_full.py"
click node_fig5 "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig5toteffplots.py"
click node_regressions "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Regressions.py"
click node_results "https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Results/Compiled_Total30.xlsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_traits,node_culture,node_larva toneBlue
class node_multirun,node_run10 toneAmber
class node_traits3ml,node_fig4,node_fig2,node_suppwaste,node_suppexpanded,node_wastecrowd,node_basecrowd,node_basefull,node_baseeffects,node_fig3,node_fig3expanded,node_fig5,node_regressions toneMint
class node_results toneRose
class node_user toneIndigo
```

## Components

### Simulation core

- [Trait generator](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Traits.py): `Traits.py`
- [Culture simulation](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Culture_class.py): `Culture_class.py`
- [Larval agent](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Larva_class.py): `Larva_class.py`

### Simulation runs

- [Batch runs](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/MultiRun.py): `MultiRun.py`
- [Deep shallow run](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Run10Traits3mLDeepShallow.py): `Run10Traits3mLDeepShallow.py`

### Figure analyses

- [Deep shallow analysis](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Traits3mLDeepShallow.py): `Traits3mLDeepShallow.py`
- [Permeation and occupancy](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig4PermeationDigSAOccupancy.py): `Fig4PermeationDigSAOccupancy.py`
- [Base uncrowded](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig2BaseModelUncrowd.py): `Fig2BaseModelUncrowd.py`
- [Waste base model](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/SuppFigWasteBaseModelUncrowd.py): `SuppFigWasteBaseModelUncrowd.py`
- [Expanded uncrowded](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/SuppFigExpandedModelUncrowd.py): `SuppFigExpandedModelUncrowd.py`
- [Waste crowding](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/WasteCrowdBase.py): `WasteCrowdBase.py`
- [Base crowding](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/BaseModelCrowd.py): `BaseModelCrowd.py`
- [Full framework](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/BaseModelfullframework.py): `BaseModelfullframework.py`
- [Main effects model](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Basefullframework_MainEffects.py): `Basefullframework_MainEffects.py`
- [Main effects analysis](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig3_MainEffects.py): `Fig3_MainEffects.py`
- [Expanded model analysis](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig3expanded_model_full.py): `Fig3expanded_model_full.py`
- [Total effects plots](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Fig5toteffplots.py): `Fig5toteffplots.py`
- [Regression analysis](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Regressions.py): `Regressions.py`

### Simulation data

- [Stored results](https://github.com/srikantvenkitachalam/single-generation-simulation-framework/blob/main/Results/Compiled_Total30.xlsx): `Results/Compiled_Total30.xlsx`

### Other components

- **Researcher**

## Connections

- Researcher → Batch runs: runs batches (evidence: `README.md`)
- Researcher → Base uncrowded: runs analysis
- Batch runs → Culture simulation: creates cultures (evidence: `MultiRun.py`)
- Batch runs → Trait generator: generates traits (evidence: `MultiRun.py`)
- Deep shallow analysis → Culture simulation: configures and runs (evidence: `Traits3mLDeepShallow.py`)
- Deep shallow analysis → Trait generator: generates traits (evidence: `Traits3mLDeepShallow.py`)
- Permeation and occupancy → Culture simulation: runs cultures (evidence: `Fig4PermeationDigSAOccupancy.py`)
- Permeation and occupancy → Trait generator: generates traits (evidence: `Fig4PermeationDigSAOccupancy.py`)
- Base uncrowded → Culture simulation: runs culture (evidence: `Fig2BaseModelUncrowd.py`)
- Base uncrowded → Trait generator: generates traits (evidence: `Fig2BaseModelUncrowd.py`)
- Waste base model → Culture simulation: runs culture (evidence: `SuppFigWasteBaseModelUncrowd.py`)
- Waste base model → Trait generator: generates traits (evidence: `SuppFigWasteBaseModelUncrowd.py`)
- Expanded uncrowded → Culture simulation: runs culture (evidence: `SuppFigExpandedModelUncrowd.py`)
- Expanded uncrowded → Trait generator: generates traits (evidence: `SuppFigExpandedModelUncrowd.py`)
- Waste crowding → Culture simulation: runs cultures (evidence: `WasteCrowdBase.py`)
- Waste crowding → Trait generator: generates traits (evidence: `WasteCrowdBase.py`)
- Base crowding → Culture simulation: runs cultures (evidence: `BaseModelCrowd.py`)
- Base crowding → Trait generator: generates traits (evidence: `BaseModelCrowd.py`)
- Culture simulation → Larval agent: creates larvae (evidence: `Culture_class.py`)
- Researcher → Stored results: loads existing data (evidence: `README.md`)
