https://github.com/e19166/tlbo_cloud_optimization
he application of the Teaching-Learning-Based Optimization (TLBO) algorithm to optimize cloud resource allocation in virtual machine environments
https://github.com/e19166/tlbo_cloud_optimization
Last synced: 3 months ago
JSON representation
he application of the Teaching-Learning-Based Optimization (TLBO) algorithm to optimize cloud resource allocation in virtual machine environments
- Host: GitHub
- URL: https://github.com/e19166/tlbo_cloud_optimization
- Owner: e19166
- Created: 2024-12-19T17:08:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-27T18:14:53.000Z (about 1 year ago)
- Last Synced: 2024-12-27T19:18:16.288Z (about 1 year ago)
- Language: Python
- Size: 39.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง Cloud Resource Optimization Using TLBO Algorithm
Optimizing cloud resources is a critical task in managing modern applications. This project demonstrates how to use the Teaching-Learning-Based Optimization (TLBO) algorithm to optimize CPU resource allocation for virtual machines in a cloud environment, ensuring cost efficiency and performance.
## ๐ Features
* Optimization Algorithm: Implements the TLBO algorithm for resource optimization.
* Real-World Use Case: Focuses on CPU allocation in cloud environments with latency constraints.
* Easy to Extend: Modular code structure for custom optimization scenarios.
* Visualization: Graphical insights into resource allocation and workloads.
* Comprehensive Testing: Unit tests for all core functionalities.
## ๐ ๏ธ Project Structure
```bash
cloud-resource-optimization-tlbo/
โโโ src/
โ โโโ tlbo.py # TLBO Algorithm implementation
โ โโโ problem_definition.py # Defines the optimization problem
โ โโโ utils.py # Helper functions
โโโ tests/
โ โโโ test_tlbo.py # Unit tests for the TLBO class
โ โโโ test_utils.py # Tests for utility functions
โ โโโ test_validation.py # Validation tests for workloads and constraints
โโโ data/
โ โโโ vm_workloads.json # Example VM workloads (optional)
โโโ notebooks/
โ โโโ visualization.ipynb # Jupyter notebook for visualization
โโโ requirements.txt # Python dependencies
โโโ README.md # Project documentation
โโโ LICENSE # License file
```
## ๐งโ๐ป Getting Started
### Prerequisites
* Python 3.8+
* Pipenv or a similar dependency manager
### Installation
Clone the repository:
```bash
git clone https://github.com/your-username/cloud-resource-optimization-tlbo.git
cd cloud-resource-optimization-tlbo
```
Install dependencies:
```bash
pip install -r requirements.txt
```
## โ๏ธ Usage
### Running the Optimization
1. Define your VM workloads in src/problem_definition.py.
2. Run the main script to execute the TLBO algorithm:
```bash
python main.py
```
## ๐ Example Results

## ๐ How It Works
1. Input: VM workloads and constraints.
2. TLBO Algorithm:
* Teacher Phase: The best solution (teacher) improves the mean performance.
* Learner Phase: Solutions are refined through pairwise interactions.
3. Output: Optimal CPU allocations that minimize cost and satisfy latency requirements.
## ๐งช Running Tests
To ensure everything works as expected:
```bash
python -m unittest discover -s tests
```
## ๐ค Contributing
I welcome contributions! To get started:
1. Fork the repository.
2. Create a new branch for your feature:
```bash
git checkout -b feature-name
```
3. Commit your changes and push:
```bash
git push origin feature-name
```
4. Open a pull request.
## ๐ก๏ธ Acknowledgments
* Inspired by the TLBO algorithm in optimization.
* Special thanks to the open-source community for tools and libraries.
## ๐ Support
If you found this project useful, please โญ the repository and share it with your peers!