This repository contains a simulator aimed at optimizing process scheduling in a queue. It uses linear programming techniques to prioritize and organize tasks efficiently. The simulator is part of a project for the Operations Research (OR) module and addresses scheduling problems by prioritizing processes based on their priority, execution time, and arrival time. It leverages the Shortest Job Next (SJN) algorithm for modeling, which prioritizes processes with the shortest execution time to minimize overall waiting time. Additionally, the project includes dynamic visualizations for user interaction.
The project includes:
- A Flask-based API for backend processing.
- A React and CSS-based frontend for user interaction.
- Visual tools such as ApexCharts for displaying scheduling results and performance metrics.
🚀 Interactive Input: Users can input process details such as priority, arrival time, and execution time through an intuitive interface.
📊 Linear Programming Optimization: The backend employs linear programming to optimize the process queue and minimize metrics like average waiting time.
🎨 Dynamic Visualizations: Results are presented through interactive charts and animations, making the output easy to understand.
❗ Error Handling: Robust validation for managing invalid inputs and handling algorithmic issues gracefully.
♻ Reset Functionality: Allows users to clear the queue and restart simulations easily.
Ensure you have the following installed:
- Clone the repository:
git clone /~https://github.com/Brahim-gz/process-scheduling-simulator.git cd process-scheduling-simulator
- Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install Python dependencies:
pip install -r requirements.txt
- Run the Flask server:
flask run
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm start
💡Start both the backend and frontend servers.
💡Access the simulator through the frontend interface in your web browser (default: http://localhost:3000
).
💡Enter process details such as arrival time, priority, and execution time.
💡Submit the data to view an optimized schedule, dynamic animations, and performance metrics such as average waiting time.
💡Reset the queue as needed to start new simulations.