timnon / pyschedule

pyschedule - resource scheduling in python
Apache License 2.0
295 stars 61 forks source link

maintenance tasks in industry - BREAK #95

Open Eduardoofc opened 4 years ago

Eduardoofc commented 4 years ago

Hello Tim, Good job with this amazing peace of code. I was wondering If you could give me a hand with some doubts that i have.

I have to set up a maintenance task between two tasks, but how can I do that without knowing their order(tasks order)

transfer = dict() for k, v in malha.items(): list = [] --if(k in hectos): ----for i in range(v['volume']): ----list.append(S.Task('t' + k + str(i+1), length=1)) ----transfer[k] = o --else: ----for i in range(v['volume']): ----list.append(S.Task('t' + k + str(i+1), length=1)) ----transfer[k] = o

This is the result of code above : a dict where the values are a list of tasks. {'STE': [tSTE1, tSTE2, tSTE3], 'BRZ': [tBRZ1, tBRZ2, tBRZ3], 'ANT': [tANT1, tANT2, tANT3] 'BOH': [tBOH1, tBOH2, tBOH3, tBOH4] }