We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using the range method to restrict a resource
R = S.Resource('R',periods=range(0,21,3)
I was expecting this resource to only be available in periods 0, 3, 6, 9, 12, 15, 18.
`from pyschedule import Scenario, solvers, plotters, alt
S = Scenario('nozzle',horizon=20)
R1 = S.Resource('R1',periods=range(0,21,3)) R2 = S.Resource('R2',periods=range(1,21,3))
T1 = S.Task('T1',length=1,delay_cost=1) T2 = S.Task('T2',length=2,delay_cost=1)
T1 += R1 | R2 T2 += R1 | R2
solvers.mip.solve(S,msg=1) print(S.solution())`
Result: [(T2, R1, 0, 2), (T1, R2, 1, 2)]
[(T2, R1, 0, 2), (T1, R2, 1, 2)]
I was expecting '[(T2, R1, 0, 3), (T1, R2, 1, 1)]'
Am I using the range function incorrectly?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using the range method to restrict a resource
R = S.Resource('R',periods=range(0,21,3)
I was expecting this resource to only be available in periods 0, 3, 6, 9, 12, 15, 18.
`from pyschedule import Scenario, solvers, plotters, alt
S = Scenario('nozzle',horizon=20)
two resources
R1 = S.Resource('R1',periods=range(0,21,3))
R2 = S.Resource('R2',periods=range(1,21,3))
T1 = S.Task('T1',length=1,delay_cost=1)
T2 = S.Task('T2',length=2,delay_cost=1)
T1 += R1 | R2
T2 += R1 | R2
solvers.mip.solve(S,msg=1)
print(S.solution())`
Result:
[(T2, R1, 0, 2), (T1, R2, 1, 2)]
I was expecting '[(T2, R1, 0, 3), (T1, R2, 1, 1)]'
Am I using the range function incorrectly?
The text was updated successfully, but these errors were encountered: