Cancel
Showing results for 
Search instead for 
Did you mean: 

Different proc. time (uniform) for MUs

Creator
Creator

Hello. 
I have 3 MUs (A, B and C), singleproc "Packing"  (proc. time defined by formula with "Method_PT").

I want different processing time for each MUs.

In "Method_PT" is this code:

:time

is
do

     if @.Name="A" then
          Packing.ProcTime:=z_uniform(1, 70, 120);
     elseif @.Name="B" then
          Packing.ProcTime:=z_uniform(1, 120, 180 );
     elseif @.Name="C" then
          Packing.ProcTime:=z_uniform(1, 310, 370);
     end;
end;

 

 

I don't know if it's correct. Can somebody help me? Program included.

 

Thank you!

9 REPLIES

Re: Different proc. time (uniform) for MUs

Genius
Genius

Hello Libor,

Please use the below method & trigger this method in the EntranceCtrl (check the 'Before actions').

is
do
	if @.Name="A" then
		Packing.ProcTime.setparam("uniform",70, 120); 
	elseif @.Name="B" then
		Packing.ProcTime.setparam("uniform",120, 180 );
	elseif @.Name="C" then
		Packing.ProcTime.setparam("uniform",310, 370);
	end;
end;
Thanks & Best Regards,
Abhilash Sridhar
Mercedes Benz R&D India, Daimler AG

Re: Different proc. time (uniform) for MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you want to use the method as formula, you need to select formula as distribution for Process Time and enter the method as value.

The method needs to return for each MU a time value. So you need to change your method:

 

:time
is
do

  if @.Name="A" then
	return z_uniform(1, 70, 120);
   elseif @.Name="B" then
	return z_uniform(1, 120, 180 );
   elseif @.Name="C" then
	return z_uniform(1, 310, 370);
   end;
end;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Different proc. time (uniform) for MUs

Experimenter
Experimenter

my problems same as above. I'm using plm simulation 14. I try using simtalk as above, but failed. I'm not familiar with the use of simtalk. can someone help me to solve this method. I use 3 MU, namely LongKeropokLekor, KeropokLekorCrispy and KeropokLekorBall. MU has a processing time varies.

 

time
if @."LongKeropokLekor" then
return z_uniform(0.1489,4.6163)
elseif @."KeropokLekorCrispy" then
return z_uniform(0.1489,4.6163:
elseif @."KeropokLekorBall" then
return z_normal(10.6,0.10858,9.5,11.5)

end;

 


end

Re: Different proc. time (uniform) for MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

a try

 

->time --return value
if @.name = "LongKeropokLekor" then
     return z_uniform(1,0.1489,4.6163) -- see help parameter for z_uniform
elseif @.name = "KeropokLekorCrispy" then
    return z_uniform(1,0.1489,4.6163)
elseif @.name = "KeropokLekorBall" then
   return z_normal(1,10.6,0.10858,9.5,11.5) 

end

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

Re: Different proc. time (uniform) for MUs

Experimenter
Experimenter

it can't prompt the command 

->time --return value

 

 

  this template form method regarding the ProcTime depends on MU attribute

--Determines the processing time of a station in a formula according to an attribute of the MU.
—@ is the MU that triggers the formula
—? is the station calling this method


->time

if @.«attribute»=«value»
result:=«time»
— add your code here
elseif @.«attribute»=«value»
result:=«time»
— add your code here
else
— add your code here
end

Re: Different proc. time (uniform) for MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
what is your Plant Simulation version? And if it 13 and higher: do you use the new syntax?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Different proc. time (uniform) for MUs

Experimenter
Experimenter

Hi

Mr Steffen Bagsow,

i'm using plant simulation v14.

already activate new syntax.

i'm stuck with processing time.

the system show incorrect method

.Model.Frame.Method.

tqsm..

Re: Different proc. time (uniform) for MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
please check again, if for this method the new syntax is activated (method editor - tools - new syntax must be selected)
your error is typical for the old syntax
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Different proc. time (uniform) for MUs

Experimenter
Experimenter

Hi 

Mr Steffen Bagsow,

Tqsm for your guidance.

i try check using incorrect methods.

it show incorrect method.

the new method i get

 

->time
if @.name="LongKeropokLekor" then
z_uniform(1,0.1489,4.6163)
elseif @.name="KeropokLekorCrispy" then
z_uniform(1,0.1489,4.6163)
elseif @.name="KeropokLekorBall" then
z_normal(1,10.6,0.10858,9.5,11.5)
end

 

Tqsm for your guidance.

 

i have  1 more question, 

how can i check the MU will follow the time that are listed in the method