Cancel
Showing results for 
Search instead for 
Did you mean: 

Controling line flow

Pioneer
Pioneer

 Hello, 

 

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? 

 

Thanks.

 

Regards,

 

João

2 REPLIES

Re: Controling line flow

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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.

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Controling line flow

Pioneer
Pioneer

Thanks a lot!