question

Jacek Diakun avatar image
2 Likes"
Jacek Diakun asked Joerg Vogel commented

Is it possible to set queue batch size by value taken from Global Table?

set-queue-batch-size-as-value-from-global-table.fsm

Dear FlexSim Team and Users,

I have a Global Table with a parameter and I want to set queue batch size by value taken from this parameter. Is is possible to do it in FlexSim (in Queue object parameter "Target Batch Size" I am able to enter a number only).

Regards,

Jack

P.S. Please see the attached model - I would like to set the parameter "Target Batch Size" from "processor1_output_queue" by the value from Global Table "parameters" (the only value in this table).

J.

FlexSim 16.2.2
queue batch size
· 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.

Marc K avatar image Marc K commented ·

I see the answer below. Is there a way to have a string of Queues to set to the value of the first Queue? Possible a code to get batch size from Queue1?

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

@Marc K, Please ask a new question! You can set a link to this question and/ or answer as well.

0 Likes 0 ·

1 Answer

David Seo avatar image
2 Likes"
David Seo answered Joerg Vogel edited

@Jacek Diakun

You can use the picklist option of 'Update Queue's Batch Size' onEntry trigger in the Queue.

The commands for it are 'gettablenum("tablename", row, col) and setvarnum(objectname, "batchsize", value). The value is gettablenum("tablename", row, col).

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

Brian W avatar image Brian W commented ·

@Jacek Diakun (or anyone else with the answer) I was referencing this answer for a project that I need to do a similar option. I couldn't see the "Update Queue's Batch Size" in the pick list. Was that option removed on a new update?

Is there a new way to accomplish this task?

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

code snippet in Queue Trigger:

current.attrs.variables.subnodes["batchsize"].value = 7

or

current.find(">variables/batchsize").value = 7

or

setvarnum(current,"batchsize",7)

or you are waiting until the option will be updated in a next release.

2 Likes 2 ·