mirror of
https://github.com/fazo96/pbs.git
synced 2025-01-27 14:34:19 +01:00
fixed inherited chained delays
This commit is contained in:
parent
d4da0aa1fb
commit
ad3b97edd5
@ -58,15 +58,16 @@ class Pert
|
|||||||
|
|
||||||
calculateDelays: (item) =>
|
calculateDelays: (item) =>
|
||||||
if !item.dependant? or item.dependant.length is 0 then return no
|
if !item.dependant? or item.dependant.length is 0 then return no
|
||||||
lowestFDelay = 0; fDelay = no
|
lowestFDelay = 0; fDelay = no; cDelay = 0
|
||||||
for j,i of item.dependant
|
for j,i of item.dependant
|
||||||
x = @toActivity i
|
x = @toActivity i
|
||||||
if !isNaN(x.permittedDelay) or x.permittedDelay < lowestFDelay or fDelay is no
|
if !isNaN(x.permittedDelay) or x.permittedDelay < lowestFDelay or fDelay is no
|
||||||
@log "activity", i, "dependant on", item.id, "has the lowest delay for now ("+(x.permittedDelay or 0)+")"
|
@log "activity", i, "dependant on", item.id, "has the lowest delay for now ("+(x.permittedDelay or 0)+")"
|
||||||
lowestFDelay = x.permittedDelay or 0
|
lowestFDelay = x.permittedDelay or 0
|
||||||
|
cDelay = x.chainedDelay or 0
|
||||||
fDelay = yes
|
fDelay = yes
|
||||||
olDelay = item.chainedDelay
|
olDelay = item.chainedDelay
|
||||||
item.chainedDelay = lowestFDelay or 0
|
item.chainedDelay = lowestFDelay + cDelay
|
||||||
@log "chained delay of", item.id, "is", item.chainedDelay
|
@log "chained delay of", item.id, "is", item.chainedDelay
|
||||||
return item.chainedDelay isnt olDelay
|
return item.chainedDelay isnt olDelay
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user