Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
User expired
2018s-advanced-distributed-systems
Commits
e0b5c891
Verified
Commit
e0b5c891
authored
Dec 10, 2018
by
Löscher Mario
Browse files
update
parent
0de226e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
scheduler/preprocessing.py
scheduler/preprocessing.py
+3
-3
No files found.
scheduler/preprocessing.py
View file @
e0b5c891
...
...
@@ -175,7 +175,7 @@ def best_performance_under_limit(
index
+=
1
max_price
=
6
max_price
=
5
#write solution
current_price
=
max_price
current_solution
[
solutions_machine
[
max_price_position
]]
=
math
.
ceil
(
solutions_hours
[
max_price_position
]
/
3600
*
prices
[
solutions_machine
[
max_price_position
]])
...
...
@@ -189,8 +189,8 @@ def best_performance_under_limit(
local_price
=
math
.
ceil
(
solution
/
3600
)
*
prices
[
solutions_machine
[
index
]]
factor
=
math
.
floor
(
max_price
/
local_price
)
new_runtime
=
solution
/
factor
if
new_runtime
>
getMinRuntime
(
batch_durations
,
index
):
new_runtime
=
getMinRuntime
(
batch_durations
,
index
)
#
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
if
(
new_runtime
<
solutions_hours
[
max_price_position
]
*
0.9
):
# 0.9 to simulate the traffic time needed to transfer
current_price
=
new_price
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment