FLY LITTLE MONSTERS!
This commit is contained in:
parent
b2f1c7319f
commit
042f668374
3
main.py
3
main.py
|
@ -135,6 +135,7 @@ def load(d, w, p, q):
|
|||
assert(Da[d])
|
||||
if (Dp[d] != Wp[w]):
|
||||
Dd[d] += distance(Dp[d], Wp[w])
|
||||
Dd[d] = Cw[c]
|
||||
Wi[w][p] += -q
|
||||
Di[d][p] += +q
|
||||
assert(Wi[w][p] >= 0)
|
||||
|
@ -148,6 +149,7 @@ def unload(d, w, p, q):
|
|||
assert(Da[d])
|
||||
if (Dp[d] != Wp[w]):
|
||||
Dd[d] += distance(Dp[d], Wp[w])
|
||||
Dd[d] = Cw[c]
|
||||
Wi[w][p] += +q
|
||||
Di[d][p] += -q
|
||||
assert(Dd[d] <= T)
|
||||
|
@ -159,6 +161,7 @@ def deliver(d, c, p, q):
|
|||
assert(Da[d])
|
||||
if (Dp[d] != Cp[c]):
|
||||
Dd[d] += distance(Dp[d], Cp[c])
|
||||
Dd[d] = Cp[c]
|
||||
Ci[c][p] += +q
|
||||
Di[d][p] += -q
|
||||
Dd[d] += 1
|
||||
|
|
Reference in a new issue