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.
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)
freelance simulation specialist
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:
Is that correct? Debugger says there is a syntax failure.
Sorry, I am doing my first foot steps in sim talk...
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?
if @.count > 1
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.