question

Theresa B avatar image
0 Likes"
Theresa B asked Theresa B commented

Using 2 Task Executers to load 1 Task Executer

Hi, brains trust!

As the title states, I'm trying to get two task executers (ASRSs) to load one (a plane) with a capacity of 2 items, after which that plane will carry the two items to another location to unload to a third task executer (a ship).

I've used process flow to try and direct the ASRSs to unload to the plane but even if the plane remains stationary until the second ASRS arrives, it will not accept the second item but its stats will show an input of 2 but an output of 1.

I've tried a couple of different techniques that haven't worked and I'd like to know what's going wrong in both of them.

Unexpected behaviours in ProcessFlow:

  • Plane leaves without taking on the second box
  • Not sure why the release resource for the plane doesn't work

Unexpected behaviours in ProcessFlow2:

  • Not sure what's so bad about my task executer reference in the "Unload" activity

There may also be other errors in the model.

Thanks in advance!

load1TEfrom2TEs.fsm

FlexSim 22.1.2
processflowtask executerscoordinated task sequenceasrs vehicle behaviourshared assets
load1tefrom2tes.fsm (60.9 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

It looks like your model wasn't uploaded successfully. Could you try to attach it again?

It should appear as an entry at the beneath the 'Publish' button.

1658130063102.png

1 Like 1 ·
1658130063102.png (48.3 KiB)
Theresa B avatar image Theresa B Felix Möhlmann commented ·
Thanks, Felix! I believe I've fixed it now.
0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Theresa B commented

You only reference one item after the tokens have been batched. So the second ASRS doesn't unload its item, but instead moves the first item into the plane a second time (which is why you see both output and input go up).

1658215701985.pngYou could instead use 'token.asrs[token.itemNo].subnodes[1]' to refer to the item the respective ASRS has loaded.

There is also the problem that the batched token can't release the second ASRS because it wasn't the token that acquired it.

Due to this I believe your approach of using multiple tokens in Process Flow (1) is actually the better way to build this logic. All it needs is to preserve the information about the second item.

load1tefrom2tes-fm.fsm


· 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.

Theresa B avatar image Theresa B commented ·

Thanks, Felix! It's clear now what went wrong and that I have some missing foundational knowledge of the way that tokens use labels. Do you know of a publicly available exercise/worked solution to get me more comfortable with using dot syntax/subnodes/etc. in FlexSim?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Theresa B commented ·

In addition to the documentation you can place objects with different label types in a model an then in a script window try referencing them using an expression you write. You can put "return" in front of the expression with a semicolon at the end to see the value in the field of the script window, or just write the expression with no semicolon to do the same.

Note that you can write a long chain of methods and attributes as long as each is correct for the return type of the previous part of the chain. Attached is a small, quick example.

DotChainExample.fsm

1 Like 1 ·
dotchainexample.fsm (33.0 KiB)
Theresa B avatar image Theresa B Jason Lightfoot ♦ commented ·

Thanks, Jason. Does this work with the usual click&Run method, or are the effects of the script window confined to itself? I hadn't opened/used the script window at all before today, so a link to a walkthrough of this feature would be much appreciated.

Regarding the documentation, the examples are great but, for instance:

  • is there anywhere I can see a full list of the methods available to a particular object?
  • is there somewhere I can see the full list of subnodes of an object?

Apologies if these questions seem misguided; I am feeling a little lost in this area of FlexSim.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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