Skip to content

Commit

Permalink
Merge pull request #25 from gitaroktato/chaining
Browse files Browse the repository at this point in the history
Chaining with the help of utility functions
  • Loading branch information
gitaroktato authored Apr 11, 2024
2 parents 0051690 + 8e9e64b commit b3b643c
Show file tree
Hide file tree
Showing 5 changed files with 642 additions and 310 deletions.
321 changes: 321 additions & 0 deletions chaning.ipynb

Large diffs are not rendered by default.

307 changes: 0 additions & 307 deletions simulating-dd1-queues.ipynb

This file was deleted.

317 changes: 317 additions & 0 deletions simulating-ddc-queues.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "01a45e8a-2206-461b-80c5-7970c3b5f7fb",
"metadata": {},
"source": [
"# Simulating M/D/K queues"
"# Simulating M/D/c queues"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions src/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ def __process_departure_times(self) -> None:
start_at = max(self.__executors_at[earliest_executor_id], arrive_at)
processed_at = start_at + self.__execution_times[index]
# processing utilization
self.__utilization_by_executor[earliest_executor_id] += [self.__process_utilization(
utilization = self.__process_utilization(
arrive_at,
self.__executors_at[earliest_executor_id],
self.__execution_times[index]
)]
)
self.__utilization_by_executor[earliest_executor_id].append(utilization)
self.__executors_at[earliest_executor_id] = processed_at
self.__departure_times[index] = processed_at

Expand Down

0 comments on commit b3b643c

Please sign in to comment.