How tasye24/projet-glp works
Based on our analysis of the file tree and README, this is an economic simulation application (“GLP Project 2025”) that mimics the economic behavior of a continent (Europe). It is built as a full desktop simulation with a graphical user interface, a simulation engine that processes economic data, and configuration/data management handling the simulation constants and input CSV files.
And Label Main Components
• Simulation Engine (src/engine): Split into two main areas:
– Map & Country Representation (src/engine/map): Classes like Map.java, Country.java, Block.java.
• GUI Module (src/gui): This is the user interface part, including MainGUI.java, various window classes (e.g., entry screens, settings, charts) and GUI elements. Mark clearly the “Presentation Layer” with its subcomponents like top menus and chart windows.
• External Dependencies (lib): Note the use of third-party libraries such as jfreechart, orsoncharts, junit, log4j, and others. These can be shown as support services providing extra functionality such as charting, testing, and logging.
Relationships and Data Flow
• The Configuration module supplies constants and file paths to the Data and Engine modules during initialization.
• The Data module is used by the Simulation Engine to load, parse, and manage simulation data (from CSV files) as well as economic indicators.
• The Simulation Engine uses its process subcomponents to compute aspects like GDP, unemployment, and poverty, then updates the simulation’s state.
• The GUI interacts directly with the Simulation Engine to start, pause or update the simulation and display outcomes on charts and maps.
• The Logging module monitors actions both from the engine and GUI, logging process details for troubleshooting and analysis.
• External libraries (from the lib directory) are integrated at various points: chart libraries in the GUI/charts area, testing libraries in the tests module, and configuration utilities.
Architectural Patterns and Design Principles
• Although not explicitly labeled MVC, there is a separation between the Simulation Engine (model/business logic) and the GUI (view/control). The simulation engine acts as a central “model” whose state is visualized by the GUI.
• The modular design is evident from the distinct directories (config, data, engine, gui); each “layer” has its clear responsibilities.
• There is likely a driver/controller aspect within MainGUI that routes user inputs to the underlying simulation processes (Event handling through buttons in the top menu, etc.).