question

Kari Payton avatar image
1 Like"
Kari Payton asked Matt Long commented

Resource backorder staytime that does not overlap.

Hi,

I was wondering if there is a way to calculate the average staytime for resource backorders that do not overlap. For example, if on the backorder list I have something that comes in at time 14 and stays on the list for 1 hour, but another backorder that comes in at time 14.1 and stays on the list for just .5 hours b/c the priority is greater than the first backorder entry. The real backorder staytime is one hour. Is there a way to get this statistic? This is just a simple example illustration. In the actual model there can be up to 4 backorders with 4 different resource priorities. But I don't want the staytime to overlap because I am trying to get a sum of the time the resource was not avaivable when there's one or more backorders.

FlexSim 17.0.0
statisticsbackorder
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

·
Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Matt Long commented

I would use a tracked variable. You could create a Process Flow with an event triggered source. Have the event listen to your list for the OnBackOrderContentChange event (or something). Then assign a label for the enter time, and have it listen at a wait for event activity for each time when the Back Orders change again. Have it check in a decide activity if the content(listbackorders(GlobalListNode)) == 0 (there are no more back orders left) if not, cycle back to the wait for event activity. If there are NO more back orders, record that last exit time, and there you go subtract the first entry time from the last exit time and assign that time to a tracked variable. Does that make sense? Hopefully that's not too confusing.

· 5
5 |100000

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

Kari Payton avatar image Kari Payton commented ·

Thanks @Sam Stubbs. I see what you're saying, but not having success. I'm not finding a way to trigger a source based on backorder change. resource-backorder.fsm

0 Likes 0 ·
Matt Long avatar image Matt Long Kari Payton commented ·

Your first issue is that a Resource that is set to Numeric Mode does not use a list. In order to have a Resource use a list to handle requests, you need to tie the resource to either a 3D object or create an array of values (under Reference, Array of Values). Then, you have to either create a Queue Strategy for the Resource, or the Acquire activities need to utilize a Query. Otherwise, the Resource just handles requests on it's own in a very simple, first in first out way.

You may want to change from using a Resource to using a List and then Push and Pull from the List. This will then allow you to tie the List to a Global List (in the toolbox) where you can use the command as described by Sam content(listbackorders(GlobalListNode)).

On another note, the getentrytime() command is only useful for flow items and does not work on a token. You can just use time().

2 Likes 2 ·
Kari Payton avatar image Kari Payton Matt Long commented ·

@Matt Long this is just a small scale model of what I'm trying to do. In the actual model the resource is tied to a 3D object and has a queue strategy. I want to limit it to where only one of the resource is available at a time. I changed it to use a list, but I am still running to a problem on the wait for event. I have it set to wait until the content changes but the token does not move after the content changes. resource-backorder.fsm

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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