Skip to content

2. Entity & Bundle

Sebi91 edited this page May 15, 2018 · 6 revisions

Entity & Bundle

This library is specialized on the simulation of material flows in intralogistics. Therefore, the library provides base classes for simulating any kind of material and especially a mechanism how these materials are passed from step to step for processing. The following sections deals with the definition and implementation of materials, so-called Entities, and how they are grouped into work packages, so-called Bundles, such that they are passed from one step to another for processing.

Entity

An Entity represents material which flows through the simulation and which might be processed by a processing step. Since this library aims to provide a code base for every kind of material flow simulations, the characteristics of a material is not further specified. Hence, the class Entity does not define any additional attributes or methods with exception of an identifier which can be set optionally for identifying an Entity flowing though the processing steps. In general, it is intended that for a high-detail simulation different types of materials are implemented by different classes extending Entity.

Example:
Consider the following scenario: You want to simulate the material flow in a production hall of the automotive sector. The material which should be processed by the assembly lines can be distinguished into small consumables and large parts. First of all, you define two classes: SmallConsumable and LargePart extending from Entity. Each instance (object) of one of this class represents a single component or a carrier containing multiple components – depending on your definition and the required granularity of your simulation. An additional counter could help to determine the amount of components in a single, if the latter case is chosen (i.e. one object represents one carrier). It is also conceivable, to define further types of materials and implement the Composite Pattern such that different materials can be stored within one carrier.

Bundle

A Bundle is considered as working package which is processed at each processing step and passed from one step to another. Furthermore, it is a container for Entities meaning that one or multiple instances of Entity (or sub types of Entity) are attached to one Bundle and passed from one step to another as well. Additionally, variable headers (key-value-pairs) can be added to an instance of Bundle containing information for the next processing step or a Connector between two steps for instance.

Example:
An instance of Bundle might represent a shipment containing different kinds and amounts of materials represented by instances of sub types of Entity. In the course of the first processing step, the shipment (Bundle) is accepted at the goods receiving. Then the whole shipment with its underlying materials is passed to the next processing step where all contained materials are scanned (e.g. each ID of Entity is registered). Then the shipment is split into smaller packages (this means that the initial instance of Bundle is split into multiple Bundles containing a predefined portion of the materials (Entities) of the initial Bundle, see Splitter) such that a forklift can bring the materials in multiple iterations with one Bundle per iteration to a repository. For all three steps – goods receiving, scanning and transport – the Bundle represents a working package containing instances of sub types of Entity representing the material which is processed and forwarded to the next step.

Implementation

There are two classes, namely Entity and Bundle, representing a generic type for material and a work package which could contain multiple pieces of materials aka instances of the type Entity or its sub types. As already mentioned, the implementation of Entity is kept quite simple since this library does not specify any characteristics of the represented materials. Only an optional identifier is defined for each Entity. The class Bundle is implemented as a container class including methods for managing the collection of stored Entities. Furthermore, it includes methods for managing the headers which can be set for a Bundle.

Clone this wiki locally