if the operator is released due to offshift interruption then exitTime is not...

if the operator is released due to offshift interruption then exitTime is not recorded to the off-shift schedule (off-shift is just started)
parent d0da9a2b
......@@ -1166,7 +1166,12 @@ class Machine(CoreObject):
# this checks if the operator is working on the last element.
# If yes the time that he was set off-shift should be updated
operator=self.currentOperator
operator.schedule[-1]["exitTime"] = self.env.now
station = operator.schedule[-1].get("station", None)
if station:
if issubclass(station.__class__, CoreObject):
operator.schedule[-1]["exitTime"] = self.env.now
elif not operator.schedule[-1]["station"].get("id", None)== "off-shift":
operator.schedule[-1]["exitTime"] = self.env.now
# operator.schedule[-1]["entity"] = self.getActiveObjectQueue()[0]
if not self.currentOperator.onShift:
operator.timeLastShiftEnded=self.env.now
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment