question

Olav Narjord avatar image
0 Likes"
Olav Narjord asked Jason Lightfoot commented

Pull only elements from list that are in label array

I am having problems filtering out the correct elements from a list. I have a pickloop that has totes on it with specific destinations. I am routing these based on the distance along conveyor, and I have a script that works for the distance. The trouble I'm having is that I only want to have the destinations that are stored in the tote to be "pullable" if that makes sense.

On each tote I have a label array like this:

1681071796927.png

And a list with the following entries:

1681071838619.pngHere is an illustration of the loop:

1681072081962.png

The logic is that I only want the decision points in "dests" to be applicable for pulling. So in this specific situation, "/DP3" is the closest one, but it's not on the list. Thus, it should choose /DP4 because that's in "dests", and is the closest one.

I have tried to make this work for a few hours and I'd appreciate any help.

pull_based_on_approved_destinations.fsm


FlexSim 22.1.4
listspulling from listslabel array
5 |100000

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

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

Change the puller to be the token so that you can reference the tote in a WHERE clause, and the still access the dp in the time_to_dp expression.

WHERE value IN puller.tote.dests
· 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.

Olav Narjord avatar image Olav Narjord commented ·

Thank you!

I got it to work with this query:

WHERE value IN puller.tote.dests ORDER BY time_to_dp ASC

And by slightly changing the conveyor time script to this:

Variant value = param(1);
Variant puller = param(2);
treenode entry = param(3);
double pushTime = param(4);

Object dp = puller.dp;

double convtime = Conveyor.estimateConveyTime(dp, 0, value, 0, 1, CONV_ESTIMATE_STANDARD_SPEEDS);

return /**/convtime/*direct/;

I guess I'll have to use the puller keyword when working with lists.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Olav Narjord commented ·
Yes sorry for the token reference - a late night mistake.
0 Likes 0 ·