Font size

Create New Factory Extension

In the previous phase we imported the supply chain scenario, ran the experiment and observed the results. In this phase we will create a new factory extension, add quality control and overhaul processing to it to maintain high quality of the produced headphones.

Let us start with opening the extensions editor.

Open the extensions editor

  1. Choose Extensions > Create New... from the main menu to open the dialog box.

  2. In the Create New Extension dialog box select the Factory extension by clicking the checkbox next to it.

  3. Click OK to close the dialog box and launch AnyLogic.
    The selected object will be available in the Projects palette of the extensions editor.

To keep the initial extension intact, we will save our modified version to a new extension.

Rename the extension

  1. Expand the Factory extension model and click the TemplateFactory item to open its properties.

  2. Navigate to the Properties palette in the right part of AnyLogic layout, change the name of the extension to NewFactory and press Ctrl + Enter to save the name and replace all name occurrences.

Now we may modify the new extension. We want the factory to perform quality check and improve the quality of the product if required. This will require us to modify the flowchart of the extension. First, let us open the graphical diagram of the Factory extension and examine the existing flowchart.

Open Factory diagram

  1. Double-click the NewFactory item to open its graphical diagram, containing the structure of the Factory extension.

Now take a closer look at the existing flowchart.

Factory flowchart

The flowchart defines the logic of the factory:

  1. The Production Planning block receives demand from the downstream supply chain and generates production orders.
  2. The Plain Transfer block arranges the required amount of raw materials.
  3. The Batch Size Selector block splits production orders into batches.
  4. The Initial order enter block — loads the initial state of production
  5. The Seize block seizes the production line.
  6. The Delay block models batch production.
  7. The Plain Transfer block adds the produced amount to inventory and updates statistics.
  8. The Select Output block checks if the production order is produced.
  9. The Release block releases the production line if the order is produced.
  10. The Sink block completes the production process and updates statistics.

Let us start modifying the flowchart by adding the quality check control, which will be modeled by the Select Output block.

Add quality check to the factory flowchart

  1. Create space for the new block on the existing flowchart by selecting the loadProduct block and dragging it to the right.
  2. Then select the batchProduction block and drag it to the left. There, we now have enough room for the new block.

  3. Now switch to the Palette view by clicking the Palette tab and navigate to the Process Modeling Library palette.

  4. Drag the Select Output block from the library palette onto the graphical editor and place it between the batchProduction and the loadProduct blocks. The ports of the new block will be automatically connected.
  5. Navigate to the properties of the block and name it qualityCheck.
  6. Set the probability of producing high quality headphones to 90% by typing 0.9 in the Probability parameter field.

That's it. We have added the quality check control to the factory flowchart. Now we can add the Delay block to model the overhauling of the headphones that failed to pass the quality check. But first, we will create space for the new block.

Create space for the Delay block

  1. Select the connector of the batchProduction and the isLastBatch blocks.

  2. Drag down the connector's left point with the left mouse button pressed.

  3. In the same way adjust the position of the connector's right point.
  4. When done, click in the graphical editor to deselect the connector.

Let us add the Delay block now.

Modify the flowchart

  1. Navigate to the Process Modeling Library palette.
  2. Drag the Delay block from the palette onto the graphical editor and place it below the qualityCheck block. The ports of the two blocks will be automatically connected.

  3. Navigate to the block's properties and name it overhaul.
  4. Set the triangular distribution of the Delay time parameter to 25, 30, 40, and set its time measurement unit to minutes.
    In such a way we define the time the production line will spend on overhauling the products, which failed to pass the quality check.

  5. Now connect the exit port of the Delay block to the input port of the qualityCheck block. Start drawing the connector by double-clicking the exit port, then click at each connector's turning point as shown on the screenshot below. Complete drawing the connector by clicking the input port of the required block.

  6. Save the extension by clicking the Save model toolbar button.

That's it. We have completed the second phase of this tutorial. We have created a new factory extension, added the quality check and the overhaul processes to its flowchart. Click the link below to proceed to Phase 3 of this tutorial, in which we will export the extension to anyLogistix.

How can we improve this article?