article

Paul Toone avatar image
0 Likes"
Paul Toone posted

Tutorial - Custom Task Executer - Task Executer Process Flows   

Process Flow makes it easy to add functionality to existing Task Executers, which is one of the purposes of the Task Executer Process Flow. This tutorial will teach you how to modify an existing Task Executer by modeling an operator that returns back to a default location after performing a task. Additionally, if the operator doesn't get a new task to do within a given amount of time, he will go to a "break room" and wait for more work.

Tasks Covered

This tutorial will cover the following tasks:.

How It Will Work

The 3D model we will build is shown in the following image:

Here we will use standard modeling logic to make an operator transport items from a queue to one of two processors.

The process flow we will create is shown in the following image:

Since the standard model logic manages giving the operator work, the main task of the process flow will be to determine what to do when the operator doesn't have any standard work to do. We first wait for him to finish performing a task sequence. If upon finishing a task sequence the operator already has something to do next, then we will just wait again for him to finish that next piece of work. If there isn't something for him to do next, then we will tell him to travel back to the queue so he'll be right there when he does get his next task. Then, when he arrives at the queue, we'll wait to see if he gets a task within 10 seconds of arriving at the queue. If 10 seconds expires and he still doesn't get a task, then we'll tell him to go to the break room and wait there for more work.

Build the Model

3D Model Layout

First we'll build the 3D model layout. Create and connect objects as shown in the following image. This includes a source, a queue, two processors, a sink, an operator, and a visual plane.

Object Properties

Define object properties as follows:

  1. Change the source's Inter-Arrival Time to exponential(0, 30, 0)
  2. In the queue's properties under Flow check the Use Transport box to tell the queue to get the operator to transport the item.

Process Flow

Now we can build the process flow. In the Toolbox press the button and select Process Flow > Task Executer. This will add a Task Executer process flow and open its modeling view.

Next, attach the process flow to the operator in the model. Click in the process flow view, and in Quick Properties under Attached Objects (instances), press the button and then click on the operator in the 3D view. This will make the operator into an instance of the process flow.

Create and connect activities as shown in the following image.

This includes:

  1. A Schedule Soure activity

    Add the activity and name it Start Simulation. Its default properties will create a single token when the model starts. This is exactly what we want, so we can leave its properties as they are.

  2. A Wait for Event activity

    Add the activity and name it Wait for OnResourceAvailable.

    In its properties, under Object press the button, then click on the operator in the model and choose current > On Resource Available.

    Next, under Label Matching/Assignment, in the Next Task Seq row, for the Label Name column enter nextTS , and for the Operation column select assign .

    This will make the activity wait until the operator's OnResourceAvailable event is fired. This event is fired whenever the operator finishes a task sequence. Also, if when the event is fired the operator already has another task sequence to do in his task sequence queue, a reference to that task sequence will be assigned to the token's nextTS label. We will use this in the next activity to decide whether we need to tell him to travel back to the queue.

  3. A Decide activity

    Add the activity and name it Something to Do Next?.

    In its properties, under Decision press the button and select Conditional Decide. Then in the behavior settings popup, for Condition enter objectexists(getlabel(token, "nextTS")). For True enter "Yes". For False enter "No".

    This will check if the token's nextTS label (the label that was assigned in the previous activity) points to a valid task sequence. If so, it will send the token out its "Yes" connector. If not, it will send the token out its "No" connector.

  4. A Travel activity

    Add the activity and name it Travel Back to Queue.

    In its properties, under Executer / Task Sequence enter current, and under Destination press the button, then click on the queue in the model.

    This will tell the operator to travel back to the queue.

  5. A Wait for Event activity

    Add the activity and name it Wait 10 Seconds for Task.

    In its properties, under Object press the button and then click on the operator in the model and select current > On Start Task.

    Next, check Use Max Wait Timer, and for its Time enter 10. Then in the behavior settings for OnWaitTimerFired expand the Release Token behavior and for Destination enter "No Task"

    This will make the activity wait for the operator's OnStartTask event to fire (this event is fired every time the operator starts performing a task). If the event fires within 10 seconds, then it will send the token out its "Task" connector. If the event does not fire within 10 seconds, it will abort the activity and send the token out its "No Task" connector.

  6. A second Travel activity

    Add the activity and name it Travel to Break Room.

    In its properties, under Executer / Task Sequence enter current, and under Destination press the button, then click on the break room visual plane in the model.

    This will tell the operator to travel to the break room.

  7. A final Wait for Event activity

    Add the activity and name it Wait for Next Task.

    In its properties, under Object press the button and then click on the operator in the model and select current > On Start Task.

    This will make the activity wait for the operator's OnStartTask event to fire (this event is fired every time the operator starts performing a task).

Once you've created all the activities, make sure they are connected as follows:

Since we are referencing connectors by their names, make sure especially that the names are correct.

Run the Simulation

At this point the model is ready. Reset and run. You should see the operator transporting items to the processors. When the operator finishes a transport operation and has nothing to do, you should see the token move through process flow and direct him to travel to the queue. Then if he is idle at the queue for 10 seconds, he will travel to the break room and wait there.

For More Information

Adding and Connecting processflow activities

Linking a Process Flow to a FlexSim model

flexsim users manualuser manuals
5 |100000

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

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1