question

abdo avatar image
0 Likes"
abdo asked Jason Lightfoot edited

how to make route based on global table ?

i need to make a route of each product based on its name by using global table

1710031995686.png

1710031920620.png

1710032026839.png

but when i run the model that error appear

1710032087686.pngwhat should i do

trial 1.fsm

FlexSim 22.2.0
global tablerouting
1710031920620.png (40.5 KiB)
1710031995686.png (2.4 KiB)
1710032026839.png (24.3 KiB)
1710032087686.png (51.1 KiB)
trial-1.fsm (41.2 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @abdo, was one of Jason Lightfoot's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot converted comment to answer

This error is telling you that there is missing a reference for a destination of a travel task. You need to build a process flow structure that assigns labels dynamically by progress in your model. Typically you evaluate on Entry event involved object to assign this data to your involved token. A assign labels activity will set a destination label upon involved object data by case.

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

abdo avatar image abdo commented ·
can you clear that in detials


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

@abdo, I will give it a try.

First there is an misunderstanding, what a field is for:

event-driven-source-entering-item.jpg

Entering Item Label Name or Value. There is an event. It is on Entering an item in Queue1. This item has got a variant value of its own and this can match to a value. OR you can assign this variant value to label at a token by name that you give here. You do not assign a name nor a value to your entering item.

Here happens that you assign a reference to your involved item to a label at your created token with name of "Product 1".
Further on you get errors, because you haven't chosen the global table name when you read value.

look-up-table.jpg As you see, I have changed a property from value to name, because the rowheadername of your global table is not the value of a variant reference to the item rather the name you haven given for the token label. Infact you wouldn't need this statement because you could insert simply "Product 1" to identify the global table row.

In further development of this process you have to consider to change your logic in a way that you assign label values to read "Product 1" or "Product 2". And you have to assgin those rowheader names to your token or your item in a label. You can also replace a rowheader name by number value to identify a table row.

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

Here is a process flow chart designed to react on label Type and On Entry Object:

jv-logic-abdo.jpg


0 Likes 0 ·
jv-logic-abdo.jpg (46.2 KiB)
Show more comments
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Here's a better solution with a better data structure on which you can build/expand with no hard coding/modelling:

1710163289301.png

1710163254524.png

In a less trivial model you might choose to put the remaining process steps label on the item itself and not use the loop, and/or add some sychronization to processing events occuring in the Objects()/3D scope.

trial-1_jl.fsm

I'd recommend you also do the tutorials to get a better understanding of the basics.


1710163254524.png (14.2 KiB)
1710163289301.png (5.0 KiB)
trial-1-jl.fsm (43.2 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.

abdo avatar image abdo commented ·

yes it works but i have few questions


1) when i change things like name of product it doesn't work like P1 to 50047 or P50047 as code of the real item in data base

and when i input P3 the Model work but the station is free " item P3 don't go to dest


2) what is meaning of

( Table.query("SELECT ARRAY_AGG(FR) FROM ProcessDefs WHERE Product=$1 ORDER BY StageNo ASC",token.item.product)[1][1]/**direct*/; )


3 ) if i replace the stage like A to real stage that contain input queue and processor and out put queue and operator , what change in model to do that ? and each item on each stage has different cycle time

1711407464471.pngthank you for your interest .




0 Likes 0 ·
1711407464471.png (121.3 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ abdo commented ·

1) Can you post your changed model for us to check.

2) The query just creates and array of objects to visit in the correct sequence.

3) Instead of travelling and unloading to the processor just connect the input queue to the processor and refer to its inObject[1]. If you don't know how to do that then please go through the tutorials.

0 Likes 0 ·