An open API service indexing awesome lists of open source software.

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

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

![alt text](image.png)

## ๐Ÿ” 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!