Verified Commit d5eb92b3 authored by Löscher Mario's avatar Löscher Mario
Browse files

got cheapest running

parent 134f3c30
......@@ -191,7 +191,7 @@ def best_performance_under_limit(
new_runtime = solution / factor
#if new_runtime > getMinRuntime(batch_durations, index):
# new_runtime = getMinRuntime(batch_durations, index)
new_price = math.ceil(solution / 3600 /factor ) * prices[solutions_machine[index]] * factor
new_price = math.ceil(solution / 3600 ) * prices[solutions_machine[index]]# * factor
#if (new_runtime < solutions_hours[max_price_position] * 0.9): # 0.9 to simulate the traffic time needed to transfer
if (new_price < current_price):
current_price = new_price
......@@ -201,7 +201,7 @@ def best_performance_under_limit(
current_solution[solutions_machine[index]] = factor * math.ceil(solutions_hours[index] / 3600)
index += 1
print ("final duration[s]: " + str(solutions_hours[max_price_position] / current_solution[solutions_machine[max_price_position]]))
print ("final duration[s]: " + str(solutions_hours[max_price_position]))
# The calculation only uses homogeneous VM distribution currently
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment