How to choose between global tables in a single processor by a label?

How to choose between global tables in a single processor by a label?

ignasi_p
Not applicable
0 Views
4 Replies
Message 1 of 5

How to choose between global tables in a single processor by a label?

ignasi_p
Not applicable

[ FlexSim 18.1.2 ]

Hi community,

I am trying to implement a simple simulation, but I have to use different process times of a processor based on a label. This process time is taken from a Global Table, which is a different one depending on that label. (I know I could do it in one table but the table would be way too big for me to work for).

I tried a code like this:

16121-code.jpg

But doesn't seem to be working, it never goes into the item.Desti==7 condition even though the label item.Desti is 7. The Variant col doesn't go to 11 either. Do you know how I could make it so I can choose the Global Table I want to use? I know that it is not working because of the error saying that there is no row 126, which it's not on the "TablaGlobalTramoE_D_CC" but it is on the other one.

I attach a simplified model of it, so you can use the Global tables or anything that you might need. If you need further information please let me know.

Thanks a lot in advance,

pregunta.fsm

0 Likes
Accepted solutions (1)
1 View
4 Replies
Replies (4)
Message 2 of 5

sebastian_hemmannE3JAU
Collaborator
Collaborator

Do you have any hint for us, on what Processor in your model we can find the shown code?

0 Likes
Message 3 of 5

ignasi_p
Not applicable

Of course sorry, should have said it on the descripiton. It is on several processors, but one you can look at is "BocS A Paso Torre o Atraque". Thanks for your help.

0 Likes
Message 4 of 5

raja_sekaran
Not applicable
Accepted solution

@Ignasi P

You have initialized the col variable two times, one in line 19 and another one in line 22. You don't need to initialize again in line 22, you can just assign the value to the col variable like below

16125-capture.png

I have attached the model with changes. Hope this helps.

support-vardeclaration-1.fsm

Thanks

Message 5 of 5

ignasi_p
Not applicable
@Raja Sekaran

Thanks for the help mate, I am going to try it right now.

0 Likes