question

Sebastien avatar image
0 Likes"
Sebastien asked Joerg Vogel edited

moveobject() is duplicating the flowitems

Hello !

In my processor 50% of the products should go to Waste. Instead of having a "send to Port" function doing that as I did before, I would like to just move the object if it is bad once the process is finished.

In the On Process Finish trigger I added a moveobject line in a condition.

It works except that when 200 items are processed. 100 of them go as expected in the Waste but 200 go in the Sink. According to the manual it looks like moveobject is more what I need than transfernode, as I want the Waste Sink to execute its Entry trigger later.

Is the moveobject triggering the send to port code and hence uses only defined output port ? Or is it possible to move an object from an output port that doe not exist ? How can I avoid the duplication of flowitem with moveobject ?

If needed here is my test model.

test-separate-waste.fsm

Thank you for helpful support.

Best regards,

FlexSim 19.0.0
moveobject
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

The items aren't duplicated! They jump to the object, which event is currently done by the FlexSim program engine through the already written event list. If an item enters a processor several future events are created instantly. If you move an item before it is ready to be released then there are still the events that will be executed later.

There is the function Send to Port in the properties of a processor. This is the function where you are allowed to decide where the items go.

The process finish trigger is a function to change the attributes of an item before it is leaving the processor.

You connect the processor to a sink and the waste will go to the sink if you set the output port in the send to port function of the sink for the processed items for example by a label.

Please look into the functions: OnProcessFinish trigger and Send To Port of the attached model!

separate-waste.fsm

I recommend you should do the tutorials in FlexSim the addition models of the Educational link, watch the basic FlexSim Youtube or Vimeo videos! Currently, you are assuming how the program works, that won't work.


separate-waste.fsm (17.6 KiB)
· 2
5 |100000

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

Sebastien avatar image Sebastien commented ·

@Jörg Vogel

Thank you for the glimpse in the FLexSim engine.

I have already developped my model with a "send to port" but I want to avoid using connection between the machine and the waste so as to ease the modelling process for the user.

Are you than telling me that moving a flowitem to another object is not possible without launching future registered events and using an output port?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Sebastien commented ·

You can tell in the Send To Port function that the item isn't released "Do Not Release Item". This allows you to move the item to another object, otherwise it stays at the processor. You can call a releaseitem-command on this item telling it later which output port it should use. You can use moveobject, too.

separate-waste-moveobject.fsm This model use both methods moveobject similar as you built and the classic with connection flow. The main difference is "Do Not Release Item" as the send to port function. @Sebastian.

0 Likes 0 ·