solve by enumeration
This commit is contained in:
parent
ba91f321e2
commit
e3945ce3dc
10
src/SchedulingAlgorithms/enumerate.py
Normal file
10
src/SchedulingAlgorithms/enumerate.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from JobShopParser import JobShopProblem as Problem
|
||||
|
||||
def enumerate(problem):
|
||||
schedule = [ (job, task) for job in range(0, problem.jobs) for task in range(0, len(problem.problem_data[job])) ]
|
||||
begin = 0
|
||||
solution = []
|
||||
for task in schedule:
|
||||
solution.append((begin, task))
|
||||
begin += problem.problem_data[task[0]][task[1]][0]
|
||||
print(solution)
|
6
src/SchedulingAlgorithms/lpt.py
Normal file
6
src/SchedulingAlgorithms/lpt.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from JobShopParser import *
|
||||
|
||||
def lpt(problem : JobShopProblem):
|
||||
while problem:
|
||||
ready = [ job[0] for job in problem.problem_data ]
|
||||
req_machines = [ task[1] for task in ready ]
|
0
src/SchedulingAlgorithms/simanneal.py
Normal file
0
src/SchedulingAlgorithms/simanneal.py
Normal file
Loading…
Reference in a new issue