Cancel
Showing results for 
Search instead for 
Did you mean: 

Move MU to all its successors

Creator
Creator

Dear all,

 

I am currently trying to write  a method that determines the exit strategy of a flow control.

 

I have three sources that each produce orders for A, B, and AB. These orders need to be distributed to the correct sorter A, Sorter B and bufferAB respectively.

 

The order AB means that part A and B needs to be retrieved from their warehouses and assembled later on, which creates AB. Order AB is sent to assembly AB waiting for the parts A and B.

 

See below a screenshot of my method

MethodFC.PNG

 

For A and B it works perfectly. However, AB doesn't seem to be directed to all successors.

I can't seem to figure out what I am doing wrong. Could somebody take a look?

 

Thanks in advance!

 

YSB

4 REPLIES

Betreff: Move MU to all its successors

Phenom
Phenom

1. in your method an end - statment was missing

 

2. i is an defined internal variable with NO value - so the method does not know, to which successor to move "AB"

 

If you set return to 3 and not i it works ( s. code below)

 

-> integer
var i: integer
--set values
print name

if  @.name ="A"
	return 2
end
if @.name ="B"
	return 1
end
if @.name ="AB"
	return 3
	end

Betreff: Move MU to all its successors

Creator
Creator
Hi simulator,

Thank you for your reply. However, I would like that the MU that carries AB as name to be returned to 1, 2 and 3. The same functionality if I would have imported a flowcontrol that has ExitBehaviour "All successors".

Thanks in advance!

YSB

Betreff: Move MU to all its successors

Phenom
Phenom

ok,

 

delete the connection between flowcontrol and BufferAB

 

and

 

 insert a second flowcontrol as 3. successor ( of the existing flowcontrol ) and

 

connect the exit of the new flowcontrol with Buffer A,B, AB

Betreff: Move MU to all its successors

Creator
Creator
Thanks Simulation. Very good and simple solution. You have no idea how long I have been thinking about the solution Smiley Tongue.

Thanks!

YSB