Cancel
Showing results for 
Search instead for 
Did you mean: 

Lead Time

Pioneer
Pioneer

Hey guys,

for looking for the lead time of each MU i write the entrytime and exittime in a table and via formula a subtraction.

 

is
	Tabelle : object;
	NächsteZeile : integer;
do
	Tabelle := .Modelle.Netzwerk.Tabelle_DLZ;
	
	if ? = .Modelle.Netzwerk.Quelle then
		
		NächsteZeile := Tabelle.YDim + 1;
		
		-- <Pfad>.schreibeZeile(Spalte:<any>, Zeile:<any>, Wert:<any> [,<any>, ..., <any>]);
		Tabelle.schreibeZeile(1, NächsteZeile, @, Ereignisverwalter.Zeit);
		
		@.umlagern(E1);
			
	elseif ? = .Modelle.Netzwerk.Senke then
		
		-- <Pfad>.finden(Bereich:<listrange>, Wert:<any>);
		if Tabelle.finden({1, *}, @) = true then
			
			Tabelle[3, Tabelle.ZeigerY] := Ereignisverwalter.Zeit;
			
			-- <Pfad>.setzeFormel([Bereichanfang:<any>, BereichEnde:<any>,] Formel:<string>);
			Tabelle.setzeFormel({4, Tabelle.ZeigerY}..{4, Tabelle.ZeigerY}, "?[3, ySelf] - ?[2, ySelf]");
			
		else
			
			print "kein passendes BE gefunden!";
			
		end;
		
	end;

end;

That works how it should. But i have the problem that if a MU leaves the system the entry in the table shows (?).. only the times remain and the 2 MU which are left in the system.

 

I have other programms where the @ works but somehow this time it doesn't.

Anybody a solution what i did wrong?

 

Or is there another method how i can collect the lead time of each MU?

 

My system is an example and is deliberately kept simple.

 

Thanks in advance

 

Regards

Carsten

4 REPLIES

Re: Lead Time

Phenom
Phenom

this is a normal behavior. If the drain deletes the MU the object-link becomes void (Plant Simulation shows a ? or ?? instead of the path). So you can write the object-name instead of the object itself into the table (column type string, value @.name).

 

There is an easier way to calculate the lead-time. If the MU is created, the attribute erzeugt is set. So you can calculate the lead-time in the drain with ereignisverwalter.zeit-@.erzeugt.

 

This you can write into a table (first column the name of the MU, second column lead-time):

 

tabelle.schreibeZeile(1,tabelle.yDim+1,@.name,ereignisverwalter.zeit-@.erzeugt);

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

Re: Lead Time

Pioneer
Pioneer

Hi,

thank you very much for your quick reply and the better suggestion for calculating the lead time Smiley Happy

 

Regards

 

Carsten

Re: Lead Time

Experimenter
Experimenter

Hello Steffen, 

 

I am facing problem with calculating the lead time for MU, with the formula  ereignisverwalter.zeit-@.erzeugt.

 

I am using English version software. 

Could you please tell what is the attribute 'erzeugt' in English version ?

 

Thank you in advance, 

Varuna

Re: Lead Time

Phenom
Phenom

the English version is:

 

EventController.simTime - @.creationTime

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