# mohamedimli/multi-agent-smart-grid-simulator architecture

> Architecture diagram of the GitHub repository mohamedimli/multi-agent-smart-grid-simulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohamedimli/multi-agent-smart-grid-simulator
- Repository: https://github.com/mohamedimli/multi-agent-smart-grid-simulator

## Overview

This repository is a multi-agent smart-grid simulator, with a Java application and bundled JCommon/JFreeChart sources. Its intended user-to-result workflow is to launch the application, run a smart-city energy simulation involving grid actors and appliances, and inspect statistics or visual output. The README establishes the simulator’s purpose, but application and agent source excerpts were not provided; consequently, internal runtime links are shown as unverified rather than asserted. Bundled charting and XML facilities are represented as supporting capabilities, not as the simulator’s core workflow.

Main entry points: [`code_source/src/comportements`](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/comportements) (Agent behaviors), [`code_source/src/interfaceGraphique`](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/interfaceGraphique) (Simulator interface), [`code_source/src/statistiques/agents`](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/statistiques/agents) (Statistics agents), [`code_source/src/lancementApplication/Demarrage.java`](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/lancementApplication/Demarrage.java) (Application launch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_launcher["Application launch<br/>[Demarrage.java]"]
  node_gui["Simulator interface"]
  node_guiagent{{"Interface agent"}}
  node_preferences["Preferences<br/>[Preferences.java]"]
  node_fifo["FIFO utility<br/>[FIFO.java]"]
end

subgraph group_grid["Grid simulation"]
  node_home{{"Household agent<br/>[AgentFoyer.java]"}}
  node_localproducer{{"Local producer"}}
  node_appliance["Electrical appliances"]
  node_airconditioning["Air conditioning"]
  node_behaviors["Agent behaviors"]
end

subgraph group_stats["Statistics"]
  node_statistics{{"Statistics agents"}}
  node_statbehavior["Statistics processing"]
end

subgraph group_charts["Charting and XML"]
  node_chartpanel["Chart panel<br/>[ChartPanel.java]"]
  node_chart["Chart model<br/>[JFreeChart.java]"]
  node_gantt["Gantt datasets"]
  node_charteditor["Chart editor factory"]
  node_xmlread["XML object reader"]
  node_xmlwrite["XML object writer"]
  node_log["Logging<br/>[Log.java]"]
end

node_user(("User"))

node_user -.->|"launches"| node_launcher
node_launcher -.->|"opens"| node_gui
node_gui -.->|"interacts with"| node_guiagent
node_guiagent -.->|"coordinates"| node_behaviors
node_behaviors -.->|"simulates"| node_home
node_behaviors -.->|"simulates"| node_localproducer
node_home -.->|"uses"| node_appliance
node_appliance -.->|"includes"| node_airconditioning
node_behaviors -.->|"produces data"| node_statistics
node_statistics -.->|"processes"| node_statbehavior
node_gui -.->|"configures"| node_preferences
node_behaviors -.->|"may use"| node_fifo
node_gui -.->|"may display"| node_chartpanel
node_chartpanel -.->|"displays"| node_chart
node_statistics -.->|"may chart"| node_gantt
node_charteditor -->|"creates editor for"| node_chart
node_xmlread -.->|"serializes counterpart"| node_xmlwrite

click node_launcher "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/lancementApplication/Demarrage.java"
click node_gui "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/interfaceGraphique"
click node_guiagent "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/interfaceGraphique/agents/AgentInterfaceGraphique.java"
click node_home "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/agents/AgentFoyer.java"
click node_localproducer "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/agents/AgentProducteurLocal.java"
click node_appliance "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/appareils/AppareilElectrique.java"
click node_airconditioning "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/appareils/ConditionnementAir.java"
click node_behaviors "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/comportements"
click node_statistics "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/statistiques/agents"
click node_statbehavior "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/statistiques/statisticien/comportements/TraitementStatisticienComportement.java"
click node_preferences "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/utilitaires/Preferences.java"
click node_fifo "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/utilitaires/FIFO.java"
click node_chartpanel "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/ChartPanel.java"
click node_chart "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/JFreeChart.java"
click node_gantt "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/data/gantt/TaskSeriesCollection.java"
click node_charteditor "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/editor/ChartEditorManager.java"
click node_xmlread "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/parser/RootXmlReadHandler.java"
click node_xmlwrite "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/writer/RootXmlWriteHandler.java"
click node_log "https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/util/Log.java"

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_launcher,node_gui,node_guiagent,node_preferences,node_fifo,node_user toneBlue
class node_home,node_localproducer,node_appliance,node_airconditioning,node_behaviors toneAmber
class node_statistics,node_statbehavior toneMint
class node_chartpanel,node_chart,node_gantt,node_charteditor,node_xmlread,node_xmlwrite,node_log toneRose
```

## Components

### Application

- [Application launch](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/lancementApplication/Demarrage.java): `code_source/src/lancementApplication/Demarrage.java`
- [Simulator interface](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/interfaceGraphique): `code_source/src/interfaceGraphique`
- [Interface agent](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/interfaceGraphique/agents/AgentInterfaceGraphique.java): `code_source/src/interfaceGraphique/agents/AgentInterfaceGraphique.java`
- [Preferences](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/utilitaires/Preferences.java): `code_source/src/utilitaires/Preferences.java`
- [FIFO utility](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/utilitaires/FIFO.java): `code_source/src/utilitaires/FIFO.java`

### Grid simulation

- [Household agent](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/agents/AgentFoyer.java): `code_source/src/agents/AgentFoyer.java`
- [Local producer](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/agents/AgentProducteurLocal.java): `code_source/src/agents/AgentProducteurLocal.java`
- [Electrical appliances](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/appareils/AppareilElectrique.java): `code_source/src/appareils/AppareilElectrique.java`
- [Air conditioning](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/appareils/ConditionnementAir.java): `code_source/src/appareils/ConditionnementAir.java`
- [Agent behaviors](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/comportements): `code_source/src/comportements`

### Statistics

- [Statistics agents](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/tree/master/code_source/src/statistiques/agents): `code_source/src/statistiques/agents`
- [Statistics processing](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/src/statistiques/statisticien/comportements/TraitementStatisticienComportement.java): `code_source/src/statistiques/statisticien/comportements/TraitementStatisticienComportement.java`

### Charting and XML

- [Chart panel](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/ChartPanel.java): `code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/ChartPanel.java`
- [Chart model](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/JFreeChart.java): `code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/JFreeChart.java`
- [Gantt datasets](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/data/gantt/TaskSeriesCollection.java): `code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/data/gantt/TaskSeriesCollection.java`
- [Chart editor factory](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/editor/ChartEditorManager.java): `code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/editor/ChartEditorManager.java`
- [XML object reader](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/parser/RootXmlReadHandler.java): `code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/parser/RootXmlReadHandler.java`
- [XML object writer](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/writer/RootXmlWriteHandler.java): `code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/xml/writer/RootXmlWriteHandler.java`
- [Logging](https://github.com/mohamedimli/multi-agent-smart-grid-simulator/blob/master/code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/util/Log.java): `code_source/lib/libJchart/jcommon-1.0.16/source/org/jfree/util/Log.java`

### Other components

- **User**

## Connections

- User → Application launch: launches
- Application launch → Simulator interface: opens
- Simulator interface → Interface agent: interacts with
- Interface agent → Agent behaviors: coordinates
- Agent behaviors → Household agent: simulates
- Agent behaviors → Local producer: simulates
- Household agent → Electrical appliances: uses
- Electrical appliances → Air conditioning: includes
- Agent behaviors → Statistics agents: produces data
- Statistics agents → Statistics processing: processes
- Simulator interface → Preferences: configures
- Agent behaviors → FIFO utility: may use
- Simulator interface → Chart panel: may display
- Chart panel → Chart model: displays
- Statistics agents → Gantt datasets: may chart
- Chart editor factory → Chart model: creates editor for (evidence: `code_source/lib/libJchart/jfreechart-1.0.14/source/org/jfree/chart/editor/ChartEditorManager.java`)
- XML object reader → XML object writer: serializes counterpart
