question

Aaron C avatar image
1 Like"
Aaron C asked ·

Why do my Operators not respond to the Time Tables appropriately?

shiftproblem.fsm
In the attached model, I have 3 operators, each on their own shift. Shift 1 is 7 am - 3:30 pm, Shift 2 is 3:30 pm - 12 am, and Shift 3 is 12 am - 7 am.
My Process Flow simply has an event triggered source linked to the OnResume function of the appropriate Time Table that acquires an operator and tells them to travel to an object. The token waits until OnDown fires, and releases the operator.
It works until 3:30 pm on 8/15/2019. It appears that the Time Table does not send the Operator to his Down location, and things just get crazier from there. This is just about as simple of an operation as I can create with shifts, but I just can't seem to get it to work....any thoughts?

time tableshift scheduleshiftson downon resume
shiftproblem.fsm (43.5 KiB)
· 1
5 |100000 characters needed characters left characters exceeded

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

As a side note, I WAS able to achieve the result I wanted by breaking up the First Shift table into TWO tables and changing what my activities were listening to and the Tables' down functions, but it seems a bit cumbersome to do that. The issue appears to come from the fact that the First Shift down time has to "wrap" around the daily schedule, which causes problems. Hoping to get a more...."clean" solution from someone here.

0 Likes 0 ·

1 Answer

· Write an Answer
Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered ·

You're trying to create a single down period from 3:30 PM on day N to 7 AM on day N+1, but dragging the time period off the end of the daily repeat schedule isn't the way to do this. First of all, you'll miss the 12 AM to 7 AM section of down time on the first day. But more importantly, dragging off the end of the table changes the repeat time such that it's no longer a daily schedule.

What you should do is create two different down periods (3:30 to 12 and 12 to 7) like in the picture. The Time Table has a mechanism for combining the last and first down periods if they end and then start at the same time. Unfortunately, it looks like there is a bug where the graphical time tables aren't creating the event nodes in the tree correctly to be able to use this mechanism. However, if you run the following script it will fix the node structure and it should all work:

treenode timeTables = Model.find("Tools/TimeTables");
for(int i = 1; i <= timeTables.subnodes.length; i++) {
	treenode table = getvarnode(timeTables.subnodes[i], "table");
	for(int j = 1; j <= table.subnodes.length; j++) {
		table.subnodes[j].value = 0;
	}		
}

See the attached model. shiftfixed.fsm


schedule.png (15.1 KiB)
shiftfixed.fsm (43.7 KiB)
5 |100000 characters needed characters left characters exceeded

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

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.