Cancel
Showing results for 
Search instead for 
Did you mean: 

Processing Time - Table, Formula and Method

Experimenter
Experimenter

Hello,

 

I have a process that is used by 3 differents entities and I am trying to set the processing time according to each of them. I am using Method and Formula to set the time, the issue is that as soon as the first entity pass through, my processing time swithc to a "const" and remains the same for all entities for the lasting of the simulation. I am missing a line on my code, that will make the processing time to remains as formula and pick the proper time according to the entity name.

My companie is using Plant Simulation 10.1

 

:time
is
	Model : string;
do
	Model := @.name;
	If Model = "CR1" then
		FC1.CycleTime := P_Time[2,1];
		
	elseif Model = "LHS" then
		FC1.Cycletime := P_Time[2,2];
		   
	elseif Model = "C1" then
		FC1.CycleTime := P_Time[2,3];
	
	else
		
	end;
	
end;

Thank You!

 

2 REPLIES

Re: Processing Time - Table, Formula and Method

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the method needs to return the procTime (return...)

I have activated the row index in your table and I have included the MU names in the row index.

So you can simplify your method:

 

:time
is
do
   return P_Time[2,@.name];
end;

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

Re: Processing Time - Table, Formula and Method

Experimenter
Experimenter

Thank You for the help.