Skip to content

Releases: TimJentzsch/cloud_resource_matcher

v0.2.0

05 May 19:07
da9226d
Compare
Choose a tag to compare

This release updates to optiframe v0.5.0 to use the new API naming conventions.

v0.1.0

29 Apr 10:13
8c96f27
Compare
Choose a tag to compare

This is the first release of cloud_resource_matcher, a framework for cloud cost optimization.

It provides modules for the optiframe optimization framework to allow you to model your cloud infrastructure and obtain a cost-optimal solution.

You can install it via pip install cloud_resource_matcher.
You should install optiframe and pulp as well.

Afterwards, you can use it as follows:

from pulp import LpMinimize
from optiframe import Optimizer, SolutionObjValue
from cloud_resource_matcher.modules.base import BaseData, BaseSolution, base_module
from cloud_resource_matcher.modules.performance import PerformanceData, performance_module

# Specify the data of the problem instance
base_data = BaseData(...)
performance_data = PerformanceData(...)

solution = (
    Optimizer("cloud_cost_optimization", sense=LpMinimize)
    # Configure which modules you want to use
    .add_modules(base_module, performance_module)
    # Add the data of the problem instance
    .initialize(base_data, performance_data)
    # Obtain the optimal solution to the problem
    .solve()
)

# Extract the total cost of the solution
cost = solution[SolutionObjValue].objective_value
# Determine which cloud resource should be matched to which cloud service
matching = solution[BaseSolution]