I'm having some problems simulating this case:
Beetween 2 machines I have a line and, for security reasons if the line has 5 MU's the sucessor machine should stop. If the line have more than 20 MU's the previous machine should stop. How should I write the method?
Solved! Go to Solution.
you could use a observer control for line.numMu. Within this control you can lock and unlock the exit of the predecessor and the entrance of the successor e.g.
(param Attribut: string; oldWert: any) is do if line.numMu <6 then predecessor.exitLocked:=false; successor.entranceLocked:=true; elseif line.numMu >=6 and line.numMu <=20 then predecessor.exitLocked:=false; successor.entranceLocked:=false; else predecessor.exitLocked:=true; successor.entranceLocked:=false; end; end;
You need a init-method to unlock the exit of the predecessor in this case.
freelance simulation specialist