Cancel
Showing results for 
Search instead for 
Did you mean: 

mu gets several processes from one single proc

Pioneer
Pioneer

Hello,

for an academic project, I want to model an assembly line. A MU passes one single proc #1 for 2 times. After the 1st process, it should drive a loop through another single proc #2, after that the MU will get a second process by the single proc #1, and should then drive straight ahead without entering the loop.

 

How can I count the number of processes of one single proc and add the number to the MU, so that the coverter can recognize that the MU is already processed 2 times by single proc #1 and send it out to the straight ahead exit?

 

Any tip would be helpful, thanks.

7 REPLIES 7

Re: mu gets several processes from one single proc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you could add an user defined attribute to the entity (in the class library). Set the value of this user defined attribute to 0 in the class library.

In proc#1 you could use an entrance control to increase this attribute at each processing step.

In proc#2 you can use the exit strategy MU-Attribute to send the MU to the right successor depend on the number of processings in proc#1 (value of your user defined attibute)

 

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

Re: mu gets several processes from one single proc

Pioneer
Pioneer

Hello,

 

thaks for the quick answer. I applied the user defined attribute count (integer) with the value 0 to the MU in the class libary. In the method for the proc#1 entrance control, the code should be:

do

@.count: =count+1; 

end

 

Is that correct? Debugger says there is a syntax failure.

Sorry, I am doing my first foot steps in sim talk...

 

 

 

 

Re: mu gets several processes from one single proc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the @ is missing and don't make a empty space between :=

try this:

 

do

  @.count:=@.count+1; 

end;

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

Re: mu gets several processes from one single proc

Pioneer
Pioneer

ok, it works. Thank you so much.

Re: mu gets several processes from one single proc

Experimenter
Experimenter

Hi,

 

I am dealing with a kind of simular problem. So i tried the given solution. However, in my case the attribute of the MU becomes the number of MUs that have past this station instead of the time the MU has past the station. In addition the simtalk of the exit strategy gives a default around the if line. Please help me, what is going wrong?

 

is
do
if @.count > 1
then
@.move(location1);
else
@.move(location2);
end;
end;

 

Thanks,

 

Greets Karen

Re: mu gets several processes from one single proc

Gears Phenom Gears Phenom
Gears Phenom

Hi Karen,

 

I don't see anything in that source-code that's wrong; the only issue could be that your MU does not have the user-defined attribute "count" (maybe you misspelled it?) or it could be of the wrong datatype.

 

Anyway, if the debugger window opens, it also includes a message that indicates the kind of problem, so maybe you could post a screenshot or your model here.

 

Regards,

Alex

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Re: mu gets several processes from one single proc

Experimenter
Experimenter
Hi,

I tried it with the adaptions in the code and it didn't work. In the
meantime I found another workaround so my problem is solved for now.
Thanks for the quick reply.

Greets Karen