FLY LITTLE MONSTERS!

This commit is contained in:
Geoffrey Frogeye 2016-02-11 21:35:07 +01:00
parent b2f1c7319f
commit 042f668374

View file

@ -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