-
Notifications
You must be signed in to change notification settings - Fork 1
Some useful functions
framinan edited this page Feb 16, 2022
·
5 revisions
scheptk.util
contains a number of functions that are useful to develop scheduling models. While some of these functions are intended to be used internally by scheptk
, some of them can be useful to build algorithms.
-
sorted_index_asc(list)
yields a list containing the ordered indices of the elements inlist
. The following code:
from scheptk.util import sorted_index_asc
processing_times = [10,69,5,28,12]
jobs_SPT_order = sorted_index_asc(processing_times)
print(jobs_SPT_order)
produces the output [2, 0, 4, 3, 1]