question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Borja Lorenzo commented

Sending to a port depends on the finished object's labels.

Hello,


I'm modifying a model that was made by someone else.


The objects are connected by a central port, and in the process flow, there is a 'Decide' action that checks a specific finished object's label. It does this using the expression 'centerObject[2]' or 'centerObject[3]'. 'CenterObject[1]' is connected to the operator, who does not perform the move. Instead, the move is made by the 'Move Object' activity in the Process Flow.


Is it possible to make this decision using the output port? What would the expression for the 'Decide' look like?
Clearly, I would alter the connection between objects to 'Connect Object' rather than 'Center Object' as they are currently linked.
centerobject.png

FlexSim 24.1.0
output portdecide activity process flowcenterobject
centerobject.png (952.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Oriol Font avatar image
1 Like"
Oriol Font answered Borja Lorenzo commented

The expresion would be the same, the only difference is that you would have to change "centerObject[2]" for "outObject[n]", where n would be the number of the output port that you created.

· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hello Oriol, thanks for your comments.

The outObject function is operational, but the model isn't performing as desired.

I am providing additional details about the logic to determine if outObject is the correct method to use.

When an item enters a queue named "Puesto" (the Event Trigger Source assigns which queue "puesto" triggers the activity), the event object is assigned to: "token.Puesto".

Assign the label "CestonDescarga" to the token "token.Puesto". This label, which acts as a "pointer", is also created in the queue and is linked to one of the two queues connected to the puesto with the Center Port "S" join type.

In this "CestonDescarga" queue, there is another label called "Disponible" with the value 1.

In the process flow, the first 'Decide' checks if this queue "CestonDescarga" has the label "Disponible" with value 1 (in other logic, this value changes to 0 when it's not available). This occurs when the forklift takes the tote from the queue "CestonDescarga".

Following this, the next Decide action checks the label "Disponibilidad" of the other queue "CestonDescarga" using the expression "token.Puesto.centerObjects[2].Disponible == 1" (centerObjects[3] refers to the first queue "CestonDescarga", next and last Decide).

If I use Connect Objects instead of Center Ports between objects, the expressions outObject[2] or outObject[3] do not work. Items continue to be directed to the first queue "CestonDescarga" even though the label "Disponibilidad" has changed its value to "0".

After these "Decide" actions, the "Move" activities follow.

Is it feasible to use Connect Object for this purpose, or is it not the correct way to combine a 3D Model with ProcessFlow?

Thanks in advance for your support.


0 Likes 0 ·
Oriol Font avatar image Oriol Font Borja Lorenzo commented ·
If I undesrstand correctly, when you change the central ports to in/out ports, the objects flow from the queue "Puesto" to "CestonDescarga" ignoring the value of the label "Disponible". This might be because when connecting two objects with in/out ports, whenever there's an item in the first object, and the second object has an empty space (it's max content is not filled) the item willl move from one object to another following this connection.


To avoid this movement, and use the in/out connection just as reference from one object to another (just as you were doing with the central port), you can change in the properties of the queue, in the Outpt panel the "Send to port" optieon. If its in First available it will send the object automaticaly through the first available in/out port, if you select "Do not release Item" then the item will remain in the queue. If you use this option the you'll have to move the item through process flow as you were doing, and just use the connection as a reference.


I would suggest that if it is not vital for the model to use the in/out ports just as reference, use the central port for this purpose as it's for what it was designed.

1 Like 1 ·
Borja Lorenzo avatar image Borja Lorenzo Oriol Font commented ·

Thank you for your answer. Now, it works.


Utilizing the input/output port for such logic might lead to complications if the model were to become more intricate. Could do I know the rationale behind this recommendation?
Thanks in advance for your comments Oriol

0 Likes 0 ·
Show more comments