question

Kevin-Hsiang avatar image
0 Likes"
Kevin-Hsiang asked Kevin-Hsiang commented

When using global table, how to looked from column 1 and whole row

Hello,

This question is about lookup the global table column 1 and whole row.

In this model, I want to ask the AGV cart to the specific rack(and each rack represent a type ), so I use the Global Table to choose the specific type.

I want lookup from Global Table(named "AssignedToRack"),but I don't know how to looked from column 1 and whole row. like: lookup row1->row2->row3...

kivasystem_1.fsm1645180210932.png

I had read more tutorial to try, but still not find the appropriate answers.

is there any smart way to do this operation?

Regards,

Kevin

FlexSim 22.0.1
agvglobal table
1645180210932.png (378.8 KiB)
kivasystem-1.fsm (152.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 ·
I don't quite understand your goal. What value should be assigned to the token label?

- All values from the column as an array [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
- A single value from a random row
- First token gets the first row, second the second and so on...

0 Likes 0 ·
Kevin-Hsiang avatar image Kevin-Hsiang Felix Möhlmann commented ·

Thanks for answer me.

My goal is - First token gets the first row, second the second and so on...

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Kevin-Hsiang commented

To assign the row values to tokens in ascending order you can use the input statistic of the activity.

"getstat(activity, "Input", STAT_CURRENT)" returns the number of tokens that have entered the activity. If you combine it with the modulo operator "%" you can repeatedly return the values from 1 to 10.
(1, 2, 3, ...10, 1, 2, 3, ...)

(getstat(activity, "Input", STAT_CURRENT)%10)+1

kivasystem-2.fsm


kivasystem-2.fsm (152.2 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.

Kevin-Hsiang avatar image Kevin-Hsiang commented ·

it's very clear! I get it.
Thanks for help

0 Likes 0 ·
Kevin-Hsiang avatar image Kevin-Hsiang commented ·

Hello,

Thank you for your previous answer, it's a great help!

In this model, I hava other question need some help

Here is the question: https://answers.flexsim.com/questions/115619/how-to-generate-the-lable-value-from-1-to-100-must.html

0 Likes 0 ·