question

Allison H2 avatar image
0 Likes"
Allison H2 asked tannerp edited

Enter Zone, Move object error

ar-buffer.fsmHere in the model, it is supposed to check yard capacity, and move into the queue.
However, the items never leave the enter yard phase.

Is this an error? Bug? is there an input I am missing?

FlexSim 19.1.0
FlexSim 19.0.2
process flowmove objectzones
snip.png (244.9 KiB)
ar-buffer.fsm (29.7 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.

Allison H2 avatar image Allison H2 commented ·
0 Likes 0 ·

1 Answer

tannerp avatar image
1 Like"
tannerp answered tannerp edited

I figured it out.

The calculation to limit the number of tokens in each partition won't work because before there's a token in the zone, there's no token for which it can read the label, "capacity_yard". This would only work after the first token has entered with the value for "capacity_yard" on it. By changing this to an integer value (i.e. "30"), the tokens enter the zone properly.

You'll have to come up with a different way of limiting the number of tokens in the partition. Will it ever be something other than 30?


· 4
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

@Tanner Poulton Use this script to enumerate the partition constraints:

treenode zone = getactivity("ProcessFlow", "yard");
treenode table = zone.find(">variables/partitionConstraints/1/exceptionTable");
table.subnodes.clear();
for(int i = 1; i <= 30; i++) {
	treenode row = table.subnodes.add();
	treenode partition = row.subnodes.add();
	partition.name = "Partition";
	partition.value = "DS" + string.fromNum(i);
	treenode limit = row.subnodes.add();
	limit.name = "Limit";
	limit.value = "Table(\"yardcapacity\")[1][" + string.fromNum(i) + "]";
	switch_flexscript(limit, 1);
	buildnodeflexscript(limit);
}
1 Like 1 ·
Allison H2 avatar image Allison H2 Matthew Gillespie ♦♦ commented ·

Sorry, I tried this and it ran briefly and flexsim closed. no notice, just failed

@Tanner Poulton

@Matthew Gillespie

0 Likes 0 ·
tannerp avatar image tannerp Allison H2 commented ·

Hi @Allison H2,

I apologize for the delayed response. Did you ever get the code to work? I'm uploading with this post a model in which the script has already been executed. It runs for me until the row numbers gets incremented by the Process Flow (I'm not sure why that is happening...) around 100000 seconds or so.

ar-buffer.fsm

0 Likes 0 ·
ar-buffer.fsm (32.3 KiB)
Allison H2 avatar image Allison H2 commented ·

The limit is not consistent for all 30 destinations, which is why I wanted to reference the capacity per the assigned column.

that value is based off of the 'yard capacity' global table.

0 Likes 0 ·