Cancel
Showing results for 
Search instead for 
Did you mean: 

Bug - Trying to move transporter from one track to another with a method

Valued Contributor
Valued Contributor

Hello everybody,

 

I want to model a system, where transporter get created once and then are used several times in a loop. You can see in the attached screenshot the system, where the transporter get back to run the loop for a another round.

 

The transporter should be transfered with the method "Exit" to one of its successors, if this transporter reaches the sensor on the object "Rückführung_HW". The method "Exit" ( see the attached code) waits with transfering the transporter until one of the successors has enough capacity. Unfortunatly after some successfull transfers, the transporter stuck short before they reach the sensor, as can be seen in the attached screenshot.

 

At the moment, I do not know what the problem is. I appreciate every suggestion how to solve this problem. I am also open for other suggestions to succesfully simulate a loop of the transporters. 

 

Thanks in advance!

 

 

BUG_Rückführung.PNG

 

is
	Nachfolger:object;
	min1 : integer;
	min2: integer;

do
	-- wenn nur eine Transporterzuführung vorhanden ist, wird diese direkt ausgwählt 
	if ?.AnzahlNF = 1 then
		self.~.ausgangGesperrt := false;
		wait 10.0;
		@.umlagern(?);	
	else
	--sind mehrere Transporterzuführungen vorhanden, wird die ausgewählt, welche noch am meisten Aufnahmekapazität besitzt
		Nachfolger := ?.nf(1);
		min1 := Nachfolger.AnzahlBEs;
		for local i := 2 to ?.AnzahlNF loop
			min2 := ?.nf(i).AnzahlBEs;
			if min2 < min1 then
				Nachfolger := ?.nf(i);
				min1 := ?.nf(i).AnzahlBEs;
			end;
		next;
		waituntil Nachfolger.AnzahlBEs <3 prio 1;
		@.umlagern(Nachfolger);
	end;
end; 

 

2 REPLIES

Re: Bug - Trying to move transporter from one track to another with a method

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

read the return value of @.umlagern e.g. and look what happens

 

if not @.umlagern(Nachfolger) then

  debug;

end;

 

One reason could be, that another MU is blocking the entrance, Since move only moves the front of the MU, the entrance keeps blocked a certain time. To wait for capacity doesnt help in this case. You could make a short observation area (small track piece) that need to be empty or you use a point oriented element infront of the track to avoid such problems (e,g. parallelproc).

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

Re: Bug - Trying to move transporter from one track to another with a method

Valued Contributor
Valued Contributor

Thank you for your anwer Steffen_B! 

 

I finally solved this issue with the object buffer before a transporter gets transfered.