question

Kelvin Barbosa avatar image
0 Likes"
Kelvin Barbosa asked Kelvin Barbosa commented

Floworks: Loading and unloading barges

Hi,

I'm using the Basic berth template for a barge loading and unloading process. In the loading step, the logic seems to work fine, but when I go to the barge unloading step, an error message appears and I can't solve it. Could you help me with this?test_Barges.fsm

FlexSim 24.0.1
proces flowFloWorks
test-barges.fsm (95.6 KiB)
· 1
5 |100000

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

Kelvin Barbosa avatar image Kelvin Barbosa commented ·

I noticed that I forgot to put the code for the unloading arm to acquire the correct product.

Code: WHERE Product = Puller.Product AND value.as(Object).outObjects.length > 0

However, even doing this it still didn't work.

0 Likes 0 ·

1 Answer

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst answered Kelvin Barbosa commented

Hi @Kelvin Barbosa ,

The query you have is all correct, the problem is at the field on the resource. You have the loading arms on the resource, which means that if you want to select the loading arm with the correct product, the Product field on the resource needs to be:
1733382606325.png

You were checking value.inObjects, but the loading arm has no inObjects before the vessel is connected.

Please let me know if changing the Product field did not help or if you have any extra questions.

Patrick


1733382606325.png (5.9 KiB)
· 3
5 |100000

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

Kelvin Barbosa avatar image Kelvin Barbosa commented ·

Hi @Patrick Zweekhorst test_Barges.fsm


I managed to solve it in a different way than yours. For the Basic berth template I didn't change anything. For the Basic berth2 template in the loading arms I used "outObjects". But what if I wanted to load and unload in just one template, what I did might not work. I tried to follow your step by step, but it didn't work. Could you send me an example?

0 Likes 0 ·
test-barges.fsm (95.2 KiB)
Patrick Zweekhorst avatar image Patrick Zweekhorst Kelvin Barbosa commented ·

Hi @Kelvin Barbosa ,


value.outObject[ 1 ].as( FlowObject ) is working for you and value.as( FlowObject ) because the product type has not been changed on the loading arm, but only at the sink. If you change it on the loading arm just value.as( FlowObject ).product will also work.


Regarding the other question of just using 1 flow. I think the main thing you need to do for this is to create 2 fields on the resource (as this is where I can see the difference between the two flows you now have).

The first field should be ProductIn, the second field ProductOut. You just need to update your queries where you were using Product to be either ProductIn or ProductOut.

I did it in the attached example model, hope this helps. Just let me know if it is not clear.

Patrick

test-barges (1)_1.fsm

0 Likes 0 ·
test-barges-1-1.fsm (92.0 KiB)
Kelvin Barbosa avatar image Kelvin Barbosa Patrick Zweekhorst commented ·

Got it, thanks a lot for sharing your knowledge.

0 Likes 0 ·