Phase 2. Adding resources

Let’s continue developing our model by adding resources – forklift trucks – to store the pallets in the pallet rack and then move them to the production area.

Resources

Resources are objects that agents use to perform a given action. An agent must obtain the resource, perform the action, and then release the resource.

Some examples of resources include:
There are three types of resources: static, moving, and portable.
In AnyLogic, the Process Modeling library’s ResourcePool  block defines each set or pool of resources. Resource units can have individual attributes, and each resource has a graphical diagram where you can add elements such as statecharts, parameters, and functions.

Our model’s resources are the forklift trucks that move pallets from the unloading zone to a pallet rack and then deliver pallets from the rack to the production zone.

  1. On the  Process Modeling Library palette, drag the ResourcePool  block on to the Main diagram. You do not have to connect the block to the flowchart.

  2. Name the block forklifts.

  3. In the forklifts block’s Properties area, click the create a custom type button. This way we create a new type of a resource.
  4. In the New agent wizard:
    1. In Agent type name box, type ForkliftTruck.
    2. Click Next.

    3. On the next page, in the list in the left part of the wizard, expand the Warehouses and Container Terminals area, and then click the Fork Lift Truck 3D animation figure.

    4. Click Finish.
  5. Click the Main tab to open the Main diagram.


    You’ll see the ForkliftTruck resource type has been selected in the ResourcePool block’s New resource unit parameter.

  6. Modify the forklifts resource type’s other parameters:
    1. In the Capacity box, type 5 to set the number of forklift trucks in our model. 
    2. In the Speed box, type 1 and choose meters per second from the list on the right.
    3. In the Home location (nodes) area, select the forkliftParking node.

      Click the plus button  and then click forkliftParking in the list of the model’s nodes.


    We’ve defined our resources, but we still need to make sure our model’s flowchart blocks will use them during the simulated processes.

  7. In the storeRawMaterial block’s Properties area, do the following:
    1. Click the arrow to expand the Resources area.
    2. Select the Use resources to move check box.
    3. In the Resource sets (alternatives) list, select forklifts to ensure the flowchart block uses the selected resources - in our case, the forklift trucks - to move the agents. Click the plus button and then click forklifts in the list of the model’s resources.
    4. Select the Move at the speed of resource check box.
    5. In the Moving resource list, select forklifts to make the agents move with speed of the forklift trucks.
    6. In the Return home area, select if no other tasks to ensure the forklift trucks return to their home location after they complete their tasks.

  8. In the pickRawMaterial block’s Properties area, do the following:
    1. Click the arrow to expand the Resources area.
    2. Select the Use resources to move check box.
    3. In the Resource sets (alternatives) list, select forklifts to ensure the flowchart block uses the forklift trucks to move the agents.
    4. Select the Move at the speed of resource check box.
    5. In the Moving resource list, select forklifts to make the agents move with speed of the forklift trucks.
    6. In the Return home area, click if no other tasks to ensure the forklift trucks return to their home location after they complete their tasks.

    If our model’s resources move an agent, RackStore (or RackPick) block seizes them, brings to the agent location, attaches to the agent, moves the agent to the cell, and then releases the resources.

  9. Run the model.


    You’ll see the forklift trucks pick up the pallets and store them in the pallet rack. After a brief delay, they move the pallets to the forklift truck parking area where the pallets will disappear.


Reference model: Job Shop - Phase 2


          Phase 1. Creating a simple model

          Phase 3. Creating 3D animation