You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to limit number of resources for a task for a period..
For the code, I want to limit only two resource to cook at a time and cooking can be done once in 3 hrs.
So the third resource should cook before or after a span of 2 hrs
expected result :
[(cook, Alice, 0, 1), (cook, Bob, 0, 1), (cook, Jim, 3, 4), (MakeSpan, Alice, 4, 5)]
code:
from pyschedule import Scenario, solvers, plotters
S = Scenario('hello_pyschedule',horizon=10)
Alice, Bob = S.Resource('Alice'), S.Resource('Bob')
Jim=S.Resource('Jim')
cook= S.Task('cook',1)
S += cook % (Alice,Bob,Jim)
S.use_makespan_objective()
solvers.pulp.solve(S,msg=1)
print(S.solution())
plotters.matplotlib.plot(S,fig_size=(8,4))
The text was updated successfully, but these errors were encountered:
Is there any way to limit number of resources for a task for a period..
For the code, I want to limit only two resource to cook at a time and cooking can be done once in 3 hrs.
So the third resource should cook before or after a span of 2 hrs
expected result :
[(cook, Alice, 0, 1), (cook, Bob, 0, 1), (cook, Jim, 3, 4), (MakeSpan, Alice, 4, 5)]
code:
from pyschedule import Scenario, solvers, plotters
S = Scenario('hello_pyschedule',horizon=10)
Alice, Bob = S.Resource('Alice'), S.Resource('Bob')
Jim=S.Resource('Jim')
cook= S.Task('cook',1)
S += cook % (Alice,Bob,Jim)
S.use_makespan_objective()
solvers.pulp.solve(S,msg=1)
print(S.solution())
plotters.matplotlib.plot(S,fig_size=(8,4))
The text was updated successfully, but these errors were encountered: