# ardillachiki/examen_simulacion architecture

> Architecture diagram of the GitHub repository ardillachiki/examen_simulacion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ardillachiki/examen_simulacion
- Repository: https://github.com/ardillachiki/examen_simulacion

## Overview

##### Project type and purpose
- This is a Python-based command-line simulation toolkit (“Examen_Simulacion”) for evaluating CPU scheduling algorithms (e.g., FCFS, Round Robin).
- Its goal is to load process definitions, run scheduling simulations, compute performance metrics, and emit results (console output, plots, tables).

##### File structure
- Top level
- data/ – input files (procesos.csv, procesos.json)
- main.py – CLI entry point that ties everything together
- requirements.txt – Python dependencies
- test/ – unit tests for each module
- src/ – core modules
- repositorio.py – “repository” for loading and storing process objects
- proceso.py – data model for a process (attributes: arrival time, burst, id, etc.)
- scheduler.py – abstract base or interface for scheduling policies
- roundRobinScheduler.py – concrete implementation of Round Robin
- Fcfsscheduler.py – concrete FCFS implementation
- metrics.py – computes response time, turnaround, waiting time, etc.

##### README for additional insights
- Describes installation, usage (`python main.py`), and that the simulations produce graphs/tables.

## Diagram (Mermaid)

```mermaid
flowchart TB
  %% Data & Domain Layer
  subgraph "Data & Domain Layer"
    direction TB
    CSV["procesos.csv"]:::data
    JSON["procesos.json"]:::data
    Repositorio["repositorio.py"]:::data
    Proceso["proceso.py"]:::data
  end

  %% Service Layer
  subgraph "Service Layer"
    direction TB
    SchedulerIF["scheduler.py"]:::service
    FCFS["Fcfsscheduler.py"]:::service
    RR["roundRobinScheduler.py"]:::service
    Metrics["metrics.py"]:::service
  end

  %% Application / Presentation Layer
  subgraph "Application Layer"
    direction TB
    Main["main.py"]:::app
    Output["Output Module"]:::app
  end

  %% Tests Layer
  subgraph "Tests"
    direction TB
    TM["test_metrics.py"]:::tests
    TP["test_proceso.py"]:::tests
    TR["test_repositorio.py"]:::tests
    TS["test_scheduler.py"]:::tests
  end

  %% Data Flow & Control Flow
  CSV --> Repositorio
  JSON --> Repositorio
  Repositorio --> Proceso
  Repositorio --> SchedulerIF
  SchedulerIF --> FCFS
  SchedulerIF --> RR
  FCFS --> Metrics
  RR --> Metrics
  Metrics --> Output

  Main --> Repositorio
  Main --> SchedulerIF
  Main --> Metrics
  Main --> Output

  %% Click Events
  click Main "https://github.com/ardillachiki/examen_simulacion/blob/main/main.py"
  click CSV "https://github.com/ardillachiki/examen_simulacion/blob/main/data/procesos.csv"
  click JSON "https://github.com/ardillachiki/examen_simulacion/blob/main/data/procesos.json"
  click Repositorio "https://github.com/ardillachiki/examen_simulacion/blob/main/src/repositorio.py"
  click Proceso "https://github.com/ardillachiki/examen_simulacion/blob/main/src/proceso.py"
  click SchedulerIF "https://github.com/ardillachiki/examen_simulacion/blob/main/src/scheduler.py"
  click FCFS "https://github.com/ardillachiki/examen_simulacion/blob/main/src/Fcfsscheduler.py"
  click RR "https://github.com/ardillachiki/examen_simulacion/blob/main/src/roundRobinScheduler.py"
  click Metrics "https://github.com/ardillachiki/examen_simulacion/blob/main/src/metrics.py"
  click TM "https://github.com/ardillachiki/examen_simulacion/blob/main/test/test_metrics.py"
  click TP "https://github.com/ardillachiki/examen_simulacion/blob/main/test/test_proceso.py"
  click TR "https://github.com/ardillachiki/examen_simulacion/blob/main/test/test_repositorio.py"
  click TS "https://github.com/ardillachiki/examen_simulacion/blob/main/test/test_scheduler.py"

  %% Styles
  classDef data fill:#ADD8E6,stroke:#000,stroke-width:1px
  classDef service fill:#90EE90,stroke:#000,stroke-width:1px
  classDef app fill:#FFA500,stroke:#000,stroke-width:1px
  classDef tests fill:#D3D3D3,stroke:#000,stroke-width:1px
```
