07_basicelements

28
Chapter 3. Basic Elements 3.1 Introduction This chapter will concentrate on the use of the basic modelling elements available in QUEST; sources, buffers, machines, and sinks. The discussion will center primarily upon the effects of the various parameters available for defining the behavior of these element class types and how and why they may be set in various ways in order to model different physical systems. In this chapter it is assumed that you are now familiar with the basics of the QUEST user interface and with the concept of elements, classes, parts, and logics. If not, read Chapter 2, Modelling Methodology and Appendix A, The QUEST User Interface before reading this chapter. Objectives This chapter introduces some of the basic QUEST modelling element classes — source, sink, buffer, and machine. Each element class is described and the details of its parameters discussed. An explanation of how these parameters may be used to model physical systems is provided. Associated Tutorials This chapter contains explanations for many of the concepts presented in the following chapters of the QUEST Tutorials online documentation delivered with QUEST: Chapter 6, Basic Constructs I Chapter 7, Basic Constructs II It is advisable that you work through these tutorials in conjunction with reading this chapter to gain a further understanding of the basic elements. 3.2 Common Element Creation Functions During the process of creating the elements described in this chapter, many common functions are used. This section describes these functions. Naming Conventions When a new element class is created, QUEST automatically assigns unique names to the element class and all the elements in that class. The element class name will be the type of element class followed by a number, e.g., Machine1 is the first element class of type machine created using the default options. The elements in that class will then be named with the class name followed by a number, e.g., Machine1_1, Machine1_2, etc. You have the option of entering a custom class name. The individual element names cannot be set when the element class is created. However, once the element class is created the individual element names can be modified by selecting Model | Build | Element | Modify. If the name of an element class is modified at some stage after it has been created, QUEST will present you with the option of automatically renaming all the elements in that class or renaming only those elements that have the default names. Priority This lets you assign a positive non-zero integer value as the priority for the element class. This priority may later be used in the SCL logic as desired.

Upload: sandy-delgado-a

Post on 25-Oct-2014

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 07_BasicElements

Chapter 3. Basic Elements

3.1 Introduction

This chapter will concentrate on the use of the basic modelling elements available in QUEST; sources, buffers, machines, and sinks. The discussion will center primarily upon the effects of the various parameters available for defining the behavior of these element class types and how and why they may be set in various ways in order to model different physical systems.

In this chapter it is assumed that you are now familiar with the basics of the QUEST user interface and with the concept of elements, classes, parts, and logics. If not, read Chapter 2, Modelling Methodology and Appendix A, The QUEST User Interface before reading this chapter.

Objectives

This chapter introduces some of the basic QUEST modelling element classes — source, sink, buffer, and machine. Each element class is described and the details of its parameters discussed. An explanation of how these parameters may be used to model physical systems is provided.

Associated Tutorials

This chapter contains explanations for many of the concepts presented in the following chapters of the QUEST Tutorials online documentation delivered with QUEST:

• Chapter 6, Basic Constructs I

• Chapter 7, Basic Constructs II

It is advisable that you work through these tutorials in conjunction with reading this chapter to gain a further understanding of the basic elements.

3.2 Common Element Creation Functions

During the process of creating the elements described in this chapter, many common functions are used. This section describes these functions.

Naming Conventions

When a new element class is created, QUEST automatically assigns unique names to the element class and all the elements in that class. The element class name will be the type of element class followed by a number, e.g., Machine1 is the first element class of type machine created using the default options. The elements in that class will then be named with the class name followed by a number, e.g., Machine1_1, Machine1_2, etc. You have the option of entering a custom class name. The individual element names cannot be set when the element class is created. However, once the element class is created the individual element names can be modified by selecting Model | Build | Element | Modify.

If the name of an element class is modified at some stage after it has been created, QUEST will present you with the option of automatically renaming all the elements in that class or renaming only those elements that have the default names.

Priority

This lets you assign a positive non-zero integer value as the priority for the element class. This priority may later be used in the SCL logic as desired.

Page 2: 07_BasicElements

Element Geometry

This function allows you to set the display parameters of the element when creating the element class. Selecting Model |

Build | Element Class | (Appropriate Class), choosing new or the desired existing element class from the Select a Class dialog box, and selecting the Display button from the element class dialog box will present you with the Display dialog box shown below.

Kin Data. This field is used to assign kinematic data to the element class. This data can be any one of the following:

• None — Not a kinematic device. This is the default option.

• Kin file — This function enables you to create the kinematic element from a kinematic file previously saved in a KINEMATICS$LIB directory. The kinematic file has the following information saved:

— Devices information.

— Substituted device information.

— Grab/release information.

— Scripts/poses/pose association information.

— Script/process association.

• Questcell file — This function enables you to play a recording previously created in any of the other DELMIA Corp. software products (with the exception of Assembly(). Here, you create the kinematic element from a workcell file previously exported from the other DELMIA software product to a QUESTCELL$LIB directory.

• Device file — This function allows you to create the kinematic element from a device file in a DEVICE$LIB directory. The device file has the following information saved:

— Device and its parts geometry.

— Degree of Freedom (DOF) information of its joints.

NOTE: The device file does not have the information for scripts, poses, associations, or substituted devices.

Page 3: 07_BasicElements

• New device file — This function allows you to create a new kinematic device. You are prompted to select a CAD part to be used as the base part of the device. Additional parts of the device can then be added using the kinematics functions described in Chapter 19, Kinematics.

Color. This field is used to assign color data to the element class. You select a color from a pull-down list of the available system colors.

NOTE: If the part was created in the CAD world, then the color can be changed using this function only if the part was created with the color part in the CAD world.

Stacking. The location of a part inside an element is based on the stack point of that element. Every element display has a pre-defined stack point and a part will be located at this point when it enters the element. The buttons provided in the Advanced | Anim page allow you to add more stack points and manipulate their position and orientation. If more than one stack point is available on an element, parts will stack starting at the first free point, filling all stack points before starting to accumulate.

There are several fields in the Display Dialog box for determining how parts will stack on any element: Stacking Axis, Stacking Factor, and No. of Stack Points.

Stacking Axis. This is the axis of the element along which multiple parts will accumulate. The default option is the z-axis, so that parts stack one on top of the other vertically.

Stacking Factor. This is the distance between multiple stacked parts. Default value is 1, which means that parts will have no space between each other. A value of 2 will set the distance between parts equal to one part length, width, or height depending on the stacking axis. For example, if the stacking axis is set to z-axis and stacking factor is 2, then the space between parts will be exactly equal to the height of one single part.

No. of Stack Points. This is the number of stack points on the element.

No. of Labor Points. This is used to set the number of labor points for an element. Labor points are similar to stack points except they are used to set the location of laborers when present at an element.

3D File. This function is used to set the geometry for an element class. There are two alternatives, they are:

• Default Geometry — The new Sink will be represented by default geometry contained in a part file named Sink in the library defined by the current value of DEFAULT$LIB. The system is shipped with default geometry. This may be customized as desired by renaming your CAD part to that of the default geometry.

• Select from library — You are prompted to select any part file from PART$LIB.

Dimensions. This is the dimension of the element class. You can specify the length, width and height. The element class geometry will be of given dimension.

Icon File. The 2D world is a schematic representation of the 3D world. The 2D environment gives you the flexibility to view run-time data in a dynamic way, which will be updated during a simulation run. The model in the 2D world is an iconic representation of the 3D model. The charts and icons associated with a particular element of the model represent that element. The No. of Icons, Icon File, Icon Index, and File functions allow you to assign an icon to a 3D element, that will then be used to represent that element when it is put into the 2D world with the Model | Build | Element | Populate button:

Page 4: 07_BasicElements

• No. of Icons — This identifies the number of icons that are assigned to the element.

• Icon File — This button is used to define the icon file.

• Icon Index — The icon index defines the geometry index for an Icon. The index ranges from 1 (one) to the number of icons assigned.

• File — You can assign either the default geometry file from the DEFAULT$LIB or select a library file from the ICON$LIB. The 2-D modelling is covered in more detail in Appendix H, 2-D Modelling.

Stacking Table. The stacking table button allows you to determine which part classes will stack at each of the points.

The buttons provided on the Advanced | Anim | Way Point page allow you to add more stack points and manipulate their position and orientation.

If more than one stack point is available on an AGV, parts will stack starting at the first free point, filling all stack points before starting to accumulate.

Logics

Logics are the mechanisms that control the behavior of element classes in QUEST. Some of the common logics for most element classes are discussed below.

Request Logic/Request Input Logic

Relate to pull systems and are discussed in Chapter 18, Pull Systems.

NOTE: Sinks do not have request input logic or route logic since they may not have any output connections.

Init Logic

Init logic specifies a user-defined SCL procedure that will be run after the start offset time in a model run. It is generally used to set up any initialization data that may be needed by other user-defined logics. This init logic is executed one time only at the start of the simulation run. All the SCL statements that can be used in the process logic may be used in the init logic of the element class.

Part Input Logic

Part input logic allows definition of the rules governing the input of parts into the buffer when the input connection is a class connection. Parts are selected for input from an upstream element (within the connected element class) using this logic. The alternatives are:

• First Free — The inputs of the element are evaluated starting at input one. The part is input from the first element within the element class that is able to supply the part.

• Cyclic — This option inputs parts in a cyclic fashion based on the elements input connections.

• User Func — Allows you to select your own SCL file to control the input of parts.

NOTE: Sources do not have a part input logic since they may not have any input connections.

Process Logic

This controls the behavior of a part (or a number of parts) inside an element. Process logics are specific for each element class and are discussed in detail under each element class later in this chapter and some of the following chapters.

Route Logic

Page 5: 07_BasicElements

Route logic controls the destination of parts that flow out of the current element class. In QUEST, for a part to get transferred from one element to another, two conditions must be satisfied:

• The sending element must be ready to route the part.

• The receiving element must be free and willing to receive the part.

Routing is thus accomplished by a "handshake" between elements. The available choices for route logic are shown in the dialog box shown and explained below.

NOTE: The First Allowed Output (Built-In) logic involves no SCL coding and can be used for better

speed performance.

There are two main types of route logic: blocking and non-blocking. Blocking logic holds the logic until the part being routed actually leaves the element. Thus, no other parts may be routed until the current part leaves the element. On the other hand, non-blocking logic can proceed to the next part once it has decided the destination of the first part. Thus, the part does not actually have to leave the element before the next part is routed. Once the destination has been decided, and the routed flag has been set, the route logic can move to the next part on the element, and route that part.

NOTE: In the case of labor being required to move a part, if the route logic is a blocking logic, then the labor is not requested until the part destination element can accept the part. Therefore it is guaranteed that the labor will not have to wait at the destination element to drop the part off. In the case of non-blocking logic, the labor is requested as soon as the part's destination is decided. If the labor picks up the part and arrives at the destination element before it is ready to accept the part, the labor will have to wait there.

Page 6: 07_BasicElements

In the logic explained below, the cyclic, proportions and first allowed output selections will select a destination without checking if the destination will accept the part. All other logics ensure that the destination element is willing to accept the part before routing the part. Therefore, the difference in blocking and non-blocking logics is apparent when there is only one possible destination for the part. In such a situation, non-blocking logic will select the destination immediately, while blocking logic will wait until the destination element is ready to accept the part.

Next Free. This procedure is the default route logic for all elements. The outputs for any element are evaluated starting at output one. The part is routed to the first element that is able to accept the part.

Cyclic Order. This procedure routes parts in a cyclic fashion based on the output connections. If the destination is not available, the routing element will be blocked until such a time that the transfer can be completed. If the output connection is restricted for the part being routed, it is skipped. If an element class is connected to other element classes using class connections, then, the cyclic order will send the parts cyclically to the different element classes. However, the actual selection of one particular element inside the receiving element class will be based on next free.

Maximum Room. This procedure evaluates the remaining room of each of the buffers attached to an element class and selects the buffer with the maximum amount of remaining space. If the downstream connection is a class, then the class that has the element containing the maximum room among all the downstream elements is selected as the destination of the part. Once the part reaches the class, it may be routed to an element different from the one actually tested. This route procedure should only be used if all of the outputs for an element class are buffers. This procedure will behave similar to the Minimum Queue logic if all of the buffers have the same capacity.

Least Utilized. This procedure evaluates the average utilization for an element class attached to the element and selects the one with the lowest utilization. If the downstream connection is a class, then the class that has the element with the lowest average utilization among all the downstream elements is selected as the destination of the part. Once the part reaches the class, it may be routed to an element different from the one actually tested.

Minimum Queue. This procedure evaluates the queue size of each of the buffers attached to the element classes and selects the buffer with the minimum contents. If the downstream connection is a class, then the class that has the element containing the minimum contents among all the downstream elements is selected as the destination of the part. Once the part reaches the class, it may be routed to an element different from the one actually tested. This route procedure should only be used if all of the outputs for an element class are buffers.

Minimum Waiting. This procedure evaluates the average residence time of parts on each of the buffers attached to the element class and selects the buffer with the minimum time. If the downstream connection is a class, then the class that has the element with the minimum average residence time among all the downstream elements is selected as the destination of the part. Once the part reaches the class, it may be routed to an element different from the one actually tested. This route procedure should only be used if all of the outputs for an element class are buffers.

Proportions. This procedure uses a random number to select the next output for routing based on percentages entered through the user interface. These proportions are entered in the Routing Proportion Info dialog box that appears by selecting the Part Routing | Proportions button. This button will not be available if the number of output connections to the element is less than two. For example, if a machine has 2 outputs, but 95% go to output 1 and 5% go to output 2, this procedure would be the preferred choice. It does not test if an output is available before transferring the part to it. If the destination is not available, the routing element will be blocked and other parts may be routed. By default random stream 1 will be used for sampling the proportions and this can be changed through the element modification user interface.

Page 7: 07_BasicElements

Priority. This procedure uses information entered in table format (using the Part Routing | Priority button) by you to determine the highest priority output that is available for each part class. If none of the outputs are available, the logic defaults to the next free element logic that will take the first available output. This function is not available if the number of output connections to the element is less than two.

First Allowed Output (Built-in). This is a non-blocking procedure and will route the part to the first output that is not restricted for that part. This is a simple routing rule that may apply to many simple situations. In order to increase model run speeds, this procedure is hard-coded internally and is not available in SCL format.

Next Free Element (Non-blocking). The outputs for any element are evaluated starting at output one. The part is routed to the first element that is able to accept the part. If the destination is not available, the routing element will not be blocked and other parts may be routed.

Cyclic Order (Non-blocking). This procedure routes parts in a cyclic fashion based on the output connections. If the destination is not available, the routing element will not be blocked and other parts may be routed.

Maximum Room (Non-blocking). This logic is similar to the Maximum Room logic except that if the destination element or class is not ready, the routing element will not be blocked and other parts may be routed.

Least Utilized (Non-blocking). This logic is similar to the Least Utilized selection except that if destination is not available, the routing element will not be blocked and other parts may be routed.

Minimum Queue (Non-blocking). This logic is similar to the Minimum Queue selection except that if the destination is not available, the routing element will not be blocked and other parts may be routed.

Minimum Waiting (Non-blocking). This procedure evaluates the average residence time of each of the buffers attached to the element class and selects the buffer with the minimum time. If the downstream connection is a class, then the class that has the element with the minimum average residence time among all the downstream elements is selected as the destination of the part. Once the part reaches the class, it may be routed to an element different from the one actually tested. This route procedure should only be used if all of the outputs for an element class are buffers. If the destination is not available, the routing element will not be blocked and other parts may be routed.

Proportions (Non-blocking). This procedure uses a random number to select the next output for routing based on percentages entered through the user interface. For example, if a machine has two outputs, but 95% go to output 1 and 5% go to output 2, then this procedure would be the preferred choice. It does not test if an output is available before transferring the part to it. If the destination is not available, the routing element will not be blocked and other parts may be routed.

Page 8: 07_BasicElements

Priority (Non-blocking). This procedure uses information entered in table format by you to determine the highest priority output that is available for each part class. If none of the outputs are available, the logic defaults to the next free element logic that will take the first available output. If the destination is not available, the routing element will not be blocked and other parts may be routed.

Fixed Routing. This procedure routes parts to a specific output based on table data entered by you in a matrix of part class versus output number. This procedure is useful for sorting parts by part class and specifying fixed destinations based on the part class. You can set the fixed destinations by selecting Part Routing | Restrictions.

User Func. User func allows you to select your own SCL file to control the routing of parts.

NOTE: In the above logics, the Maximum Room, Least Utilized, Minimum Queue, Minimum Waiting and the Priority logics select the destination that is willing to accept the part and that best meets the required criteria. For example, if route logic is set to Least Utilized, and the part can be routed to one of two machines, then if the least utilized machine is not ready to accept the part, it will be routed to the other machine (provided it is ready to accept the part). In all of the logics above, if all possible destination elements are not accepting the part, then the logic will behave like Next Free.

Part Routing

The Part Routing Info dialog box allows you to route the parts from the element class based on any of the following:

Proportions

This allows you to route parts from the machine on the basis of some user-defined percentages. This option works only if:

• Number of output connections is greater than one, and

Page 9: 07_BasicElements

• Route logic is set to Proportions or Proportions (Non-blocking).

Priority

On selection of this button you can route parts on the basis of priority that you set. This option works only if:

• Number of output connections is greater than one, and

• Route logic is set to priority or priority (non-blocking).

Restrictions

Selection of this button allows you to route parts in accordance with the restrictions imposed by you on routing of parts through a particular output. If Route is selected then the part is permitted to go to that output else, if left blank, then the part will not be allowed to go to the specified output. This option works only if:

• Number of output connections is greater than one, and

• Route logic is set to fixed routing.

Labor Requirement

Page 10: 07_BasicElements

This dialog box allows you to route parts only on the satisfaction of labor requirement for the specified part class. The From Part Class selection indicates that the labor requirements to route the specified part is obtained from the Routing Requirement definition set in the Part Class dialog box (Model | Build | Part Class | Create/Modify).

You also have the option of setting no labor requirement or any labor or specifying a labor in this Labor Requirement dialog box. The option selected in this dialog box always takes precedence over any definitions set at the Part Class level.

The ‘With Sub-Resource’ column can be used to model the labor using a tool or a transport vehicle for routing the part. The sub-resource is the tool or the vehicle used by the labor. You have an option to set any sub-resource or a specific sub-resource class. The default option is ‘None’.

NOTE: The Priority, Restrictions, and Proportions buttons will be disabled, if the number of outputs is one. Part routing is not available for sinks since they do not have an output connection.

User Attributes

This function is used to define a user attribute. The attribute can be of numeric or string type. The user attributes, which are created at the class level with some default values, can be modified at the element level to assign specific values for each element of the class.

Selecting the User Attribute button will give a dialog box as shown.

Add

This is used to create a new user attribute. A dialog box will be displayed asking for a name and type (either numeric or string). Your attributes that are created at the class level with some default values can be modified at the element level to assign specific values for each element of the class. By default, user attributes, when created, are assigned a value of zero.

Modify

Page 11: 07_BasicElements

Once created, a user attribute may be assigned a value using this button. It may also be used to modify an existing value. This is to modify a user attribute. After selecting the name of the user attribute to modify, the name or the numeric value/ string value can be modified.

Delete

This is to delete a user attribute. On selecting a user attribute and on confirmation it will be deleted.

Saving Individual Elements

The Save In selections allow you to save the element to be created as either part of the model file or in an independent file in ECLASS$LIB. This function is useful for saving element classes so that they may be reused in later models, thus saving time in redefining new element classes. Saved classes can be recalled by using File | Read Entity.

Electronic Notes for Element Description

This allows you to add user-desired descriptions to elements that can be viewed easily as electronic posting (similar to cell

description in spreadsheets). This can be used as an aid for large model understanding, communication between modelers, and also as descriptive notes for modelers at each element level.

Using the "Description" button in the Modify Element dialog box (Modify | Element button) you may enter any notes for any number of lines to the selected element. This information is saved with the model file.

The descriptions added to elements can be easily viewed like and electronic note using the annotation feature. Using the Tools | Properties | Properties | Description Annotation button, element notes can be viewed with the following options:

• Toggle Selected Element: On selecting this option, you will be prompted to select an element in the model. If annotation is already displayed for the selected element, the annotation will be removed; otherwise, the annotation for the selected element will now be displayed.

• Elements in the model: Annotation text for each element will have the element will have the element name and element type along with the description.

• Show All: On selecting this option, annotations (related to description) for all elements will be displayed.

• Clear All: On selecting this option, annotations (related to description) in the model will be removed.

• File Output: This option allows you to save element description in a file.

• Model Descriptions to File: In the above File Output option, the whole model description is also written with the following information:

— Model general information

— Entity/class level information

— User-defined logics information

Displaying an Element’s Properties

The Properties button displays a summary of the current settings for the element class.

Properties of all entities in the model can also be written to an ASCII file using the Tools | Properties | Description

Annotation button and selecting the "File Output" option. The output file created will have all of the main entities in the model and their main attributes listed. If .html is appended to the file name, the model description is written in HTML format and can be viewed by any web browser.

Page 12: 07_BasicElements

3.3 Basic Elements Sources

Parts are the entities in a QUEST model that move through the system, occupying resources and undergoing processing. Parts may represent the raw materials, finished goods, and work in progress of a manufacturing system; the customers in a bank or shop; or they may serve a more abstract purpose such as representing orders for goods or messages sent between resources. However, no matter what parts may represent in a model, it is necessary to have some way of creating parts in a model. This is most commonly and easily done using one or more sources. In the models in Chapters 6 and 7 of the online tutorials, the first elements that are created are the sources.

Source Dialog Box Parameters

Sources in QUEST are designed to produce parts for processing and consumption by the other elements in a model. A source thus represents the point-of-entry of parts into a model. While this may seem like a simple enough concept, sources are actually very flexible elements that offer a wide range of options. The characteristics of a source may be modified by selecting Model | Build | Element Class | Source. The dialog box for creating and modifying the characteristics of a source is shown below.

Max. Part Count. Max. Part Count allows you to set the maximum number of parts that a source can produce during a single run of the model after which it ceases to produce. The large default value of 1,000,000 effectively means that the

Page 13: 07_BasicElements

source has infinite capacity to produce parts since it is extremely unlikely that any real model will be called upon to handle so many parts. When using parts to model entities with a fixed or maximum number, e.g., fixtures, it is a good idea to use a source specifically for this purpose and to set the maximum part count appropriately. In the two tutorials referenced above, the default value of maximum part count is used.

Start Offset. Start Offset allows you to set a time delay on commencement of the source's production of parts. The default value of zero means that the source will start producing parts the moment the model starts to run. If, on the other hand, a non-zero start offset time is specified, then the production of parts from that source will not commence until the specified time after the start of the model run. In the two tutorial's reference above, the default value of zero is used for the start offset.

Part Creation Mode. Sets the manner in which part creation is controlled. The default value of Active causes the source to create parts independently of the rest of the model. (See description of the source dialog box button IAT). The alternative setting for this field is Passive, which causes the source to create parts based on requests generated by other elements in the model. (See description of the source dialog box button IRT and also Chapter 18 where the concept of

pull-based modelling is discussed).

In many situations, including the two tutorial models referenced above, the default (active) part creation mode is used. This models the arrivals of parts into the system based on conditions that are external to the system. Physical examples of this include scheduled arrivals of parts and materials from external suppliers or the arrival of parts produced by other departments that are outside the scope of the model. In these situations, using the Active option, the source is responsible for creating parts and injecting them into the model at the time, rate and of the type as determined by other characteristics of the source.

In other physical situations, part and material arrival is controlled not by an external schedule but by the system's requirements for parts. The most common physical example of this is a Pull system (see Chapter 18 for more details). Another example is where the source represents an effectively infinite supply but for modelling efficiency reasons only needs to generate a part when the downstream resource can accept it. In these cases the source part creation option of Passive is used. This restricts the source, rather than controlling when parts such as raw materials arrive, to providing parts to the system when the downstream processes create a demand.

When the part creation mode is Active there are four additional characteristics of a source that are available for specifying the details of the part arrivals and are not available when the part creation mode is Passive. They are:

• Output Type field

• IAT button

• Lotsize button

• Part Fractions button

Output Type. Sets the manner in which parts are dispatched from the source. The default value of Push causes parts to be available for release to downstream elements immediately after they are created. The alternative option for output type is Pull that causes parts to be held in the source until a request for a part is received from a downstream element. Pull systems are discussed in more detail in Chapter 18.

Part Initial Stock. The Part Initial Stock button sets the numbers and classes of parts that are already present in the source when the model run begins. The default is zero, and this value is used in both of the tutorials referenced above. This parameter allows a source to begin with any number of any class of part that has been defined within the model in any combination — a source is not restricted to producing parts of only one class.

Page 14: 07_BasicElements

When the Part Initial Stock button is selected a class initial stock dialog box appears similar to that shown in below. This allows the initial quantity of each part class to be specified. Of course, the part classes must have already been defined or they will not be available in this dialog box. If no part classes have been defined in the model, this button will not operate.

NOTE: The parts created as initial stock of an element will automatically be placed on the out part list of that element and will not undergo the process logic of that element class.

IAT. This button sets the time between part creations. The default is a constant value of 1 second. During the source's initialization, and subsequently at the time of each part creation, the source uses the values set here to determine how far into the future the next part creation will occur. This time between part creations (or arrivals as they are sometimes called) is known as the Inter Arrival Time (IAT).

Selection of the IAT button brings up the Distributions dialog box shown below.

This dialog box allows two distinct types of arrival patterns; deterministic - using the Constant or File Based selections, or stochastic (random) - by selecting a probability distribution from the list. In addition, you can write an SCL routine that produces the IAT using the User Func option or a simple SCL Expression using the SCL Expression.

SCL routines are documented in Chapter 5 of this manual and the QUEST SCL Reference Manual.

When a File Based inter-arrival time is chosen you are prompted to supply the name of the file containing the inter-arrival time data which must be located in the SCHEDULE$LIB directory. The numbers specified in the file are used in a relative manner. For example, if the file contains:

10

20

Page 15: 07_BasicElements

The first part is created at time zero unless a start offset is specified. The second part at time 10 seconds, and the third part at simulation time 30 seconds, i.e., 20 seconds from the time the previous part was created.

In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

NOTE: The default logic used for the IAT, file-based option is found in the file distrib.scl.src located in

../QUESTlib/SYSDEF/LOGICS directory.

Lotsize. This button sets the number of parts arriving simultaneously. The default is 1. However, physical systems often do not behave this way. For example, a manufacturing system may involve the supply of raw materials that are delivered in batches, perhaps once a week. This situation can be easily modelled using the source's Lotsize button. Selecting this button displays the Distributions dialog box. This dialog box allows two distinct types of lot size calculations; deterministic - using the Constant or File Based selections, or stochastic (random) -using a probability distribution from the list. In addition, you can write an SCL routine that returns the lot size using the user func option or a simple SCL Expression using the SCL Expression.

When a file based lot size is chosen you are prompted to supply the name of the file containing the lot size data that must be in a SCHEDULE$LIB directory. In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

NOTE: The default logic used for the IAT, file-based option is found in the file distrib.scl.src located in

../QUESTlib/SYSDEF/LOGICS directory.

Part Fractions. This button sets the proportions of each part class that the source will create. When the source creates a part it chooses the new part's class at random based on probabilities determined from the specified part fractions, and independent of the proportions of any initial stock in the source. If a model with n different part classes has a source with part fractions F1, F2, F3,...Fi,...Fn then the expected proportion of parts of type j will be:

∑=

nF

1iF

j

i

Part classes with a proportion of zero will never be created.

Hence, the first source found in the Chapter 7 online tutorial, produces only PartA, PartB, and PartC, since all other part classes have fractions of zero and equal proportions of these three parts since they all have equal part fractions of one. The second source in this tutorial produces only PartD because all other part classes have proportions of zero.

NOTE: By default Part fractions are generated by sampling random stream 1. You can change this default stream number by modifying an individual element.

Labor Controller. This button allows the selection of the labor controller element that will be used to satisfy any labor requirements that this source may have during its operation. The topic of labor is covered in detail in Chapter 11 of this manual.

Unload Process. This button sets the manner in which parts are to be unloaded from the source. The default is that parts can be unloaded without any unloading time and without any unloading resources being required. Very often the operation of a source actually releasing a new part into the rest of the model needs to be modelled in some detail. It may be that there is simply a time delay between the part being released and the actual arrival that is related to something like the act of lowering the part from the loading bay into a buffer. In other cases more detail may be required, such as

Page 16: 07_BasicElements

particular resources, labor or a forklift for example, needing to be called to perform the unloading. A source can handle these situations by assigning an unload process to it. This button presents you with three alternatives.

• None — The default and specifies that no unload process is used. This default was used in the two tutorial models referenced above.

• Time Only — Allows the specification of a time delay for unloading parts. Selection of this option brings up the Distributions dialog box. This dialog box allows two distinct types of unload time calculations — deterministic, using the Constant or File Based selections, or stochastic (random), using a probability distribution from the list. In addition, you can write an SCL routine which produces the unload time using the User Func option or a simple SCL Expression using the SCL Expression option. When a File Based unload time is chosen you are prompted to supply the location and name of the file containing unload time data. The data file must be in a SCHEDULE$LIB directory. In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

• New Process — Allows a process to be associated with the unload process, either a new process or one that has already been defined. Processes are covered in more detail in Chapter 4: Logical Modelling Elements. The definition or association of a process here allows an unload process to require certain part combinations and additional resources (labor or AGV) and to specify a duration.

NOTE: In the sequence of events, the unload process is performed before the part is routed. However, both of these are executed inside the same SCL procedure, i.e., in the route logic of the element class.

Shifts. The Shifts button allows you to set the operating hours of the source to follow a daily or weekly pattern. They are discussed in detail in Chapter 4: Logical Modelling Elements.

Failures. Failures makes it possible for you to model the source ceasing to operate for a finite period of time thus representing unscheduled down time such as breakdowns and strikes. Failures are covered in more detail in Chapter 4: Logical Modelling Elements.

Source Logics Logics

The Logics button allows you to set different logics to a source, which will affect the behavior of the source. The logics available for the source are shown in the Logics dialog box.

Page 17: 07_BasicElements

Process Logic. The process logic of a source can be specified as one of five options as shown.

• Default Source Logic — Causes the source to behave as defined by all of its parameter settings discussed above i.e., parts will be created based on the IAT, part fractions, lot size, and max part count defined through the user interface.

• File Based Source Logic — Creates parts at the source based on the part class name, creation time, and lot size that are specified in an ASCII text file. This text file must be placed in a SCHEDULE$LIB directory and its format should be as specified in Section 3.3.13 at the end of this chapter.

• Maintain Stock Source Logic — Creates parts of a part class at the source as the parts are dispatched from the source. In order to execute the logic successfully, ensure that the Part Initial Stock is set to at least 1 (one).

• Sub Model Source Logic – This is used in source that is part of a Sub-Model in the model. See the Chapter 20, Hierarchical Modelling.

• User Func — Allows the specification of an external, user written SCL procedure to control the source. This may or may not make use of any of the data entered in the various parameter fields for the source such

as inter-arrival times, lot size and part proportions.

NOTE: You may use a custom file format for part creation at the source, by modifying the SCL file pr_file.scl.src found in QUESTlib / LOGICS / SYSDEF / LOGICS directory.

NOTE: In many cases the options specified in the Process Logic may over-ride any options set through

the user interface.

Page 18: 07_BasicElements

3.4 Basic Elements — Buffers

Buffers in QUEST are used to represent the locations where parts are stored or where they queue to get access to other resources such as machines. A buffer might thus represent a storage location in a warehouse, the hopper or buffer feeding parts into a machine or a queue for customers waiting in a bank.

Buffer Dialog Box Parameters

A new buffer may be created or an existing one modified by selecting Model | Build | Element Class | Buffer. When the Buffer button is selected the Buffer dialog box appears that allows the selection of an existing buffer class by name or new which allows the creation of a new buffer class.

Input Type. You can use this option to specify the method by which parts are to enter the buffer. This can be toggled to either push or pull. When pull is selected, the buffer will only receive parts on its inputs after it sends out a request for the part. Pull systems are discussed in detail in Chapter 18, Pull Systems. With the input type set to push, the buffer's inputs are passive and the buffer receives parts on the inputs whenever they are pushed on to them by upstream elements.

Output Type. This field is used to specify the method by which parts are to leave the buffer. Using this field, the output type of the sink can be toggled to either Push or Pull. If Pull is selected, then parts will not be routed out of the buffer until

Page 19: 07_BasicElements

a request is received from a downstream element. An output type of Push means that the buffer routes parts from its outputs as soon as the downstream elements are able to receive them.

Capacity Type. This defines the maximum number of parts that the buffer can hold at any point in the simulation run. The buffer is permitted to hold lesser number of parts than its capacity, but it can never hold more. Available options are:

• Infinite — Capacity is set to infinity. This is the default option.

• Number — Capacity is a finite number of parts, the number being specified in the dialog box that appears when the Capacity button is pressed.

• Table — The capacity is a function of not just the number of parts, but also the type of parts (only if there are more than one part class). The dialog box that has the Table option allows you to specify multiple combinations of parts. For example, if the system contains two part classes, Large and Small, a buffer may be able to hold any of the following combination: four small and one large or two small and two large. The number of combinations can be altered in Pref | Preferences | Environment | Model. The combinations are evaluated from left to right and the first one that can be combinations are evaluated from left to right and the first one that can be satisfied is used. Combinations with all values set to zero are not evaluated.

• User-defined — You can specify an SCL routine that returns a zero (true) or a one (false), to determine when the buffer is full. Note that the routine must return an integer value. This is one of the few cases where an SCL routine is assigned through the user-interface.

Part Capacity. As described above, in the section on capacity type, this button allows the specification of the numerical values required to determine the buffer's maximum number of parts.

Thresholds. This button is used to define the upper and lower thresholds for parts inside the buffer. When the number of parts in the buffer becomes less than the lower threshold value, a request is placed on the upstream element to send the exact the number of parts required to bring the buffer back to its upper threshold limit. This button is activated only if the input type is set to Pull. Pull Systems and the concept of requests are discussed in depth in Chapter 18, Pull Systems.

Labor Controller. This button allows the selection of the labor controller element that will be used to satisfy any labor requirements that this buffer may have for its load or unload process. If a labor controller is assigned, then the buffer uses that controller in selecting the labor. This ensures that only available labor is selected for the load/unload process. If no controller is assigned, then the assigned labor is selected independent of the controller and this may lead to some unpredictable flow of events. The topic of labor is covered in detail in Chapter 11, Labor.

Shifts. Allow the operating hours of the buffer to follow a daily or weekly pattern. They are treated in detail in Chapter 4: Logical Modelling Elements.

Initial Stock. The Initial Stock button allows you to set the numbers and classes of parts that are already present in the buffer when the model run begins. The default is zero, and this value is used in both of the tutorials referenced above. This parameter allows a buffer to begin with any number of any part classes that has been defined in the model.

When you select the Initial Stock button a Class Initial Stock dialog box appears. This allows the initial quantity of each part class to be specified. Of course, the part classes must have already been defined or they will not be available in this dialog box.

NOTE: If no part classes have been defined in the model, this button will not be activated.

Page 20: 07_BasicElements

Load Process. This button sets the manner in which parts are to be loaded into or unloaded from the buffer. The default is that parts can be loaded and unloaded without any loading time and without any loading resources being required. Very often the operation of a buffer receiving or sending a part needs to be modelled in more detail. It may be that there is simply a time delay between the part arriving at a buffer and actually being loaded on to it. In other cases more detail may be required, such as particular resources like a labor or a forklift may be needed to perform the load or unload operation. A buffer can handle these situations by assigning a load process or unload process. These buttons present you with three alternatives for loading and unloading:

• None — The default and specifies that no load process is used.

• Time Only — Allows the specification of a time delay for loading parts. Selection of this option brings up the Distributions dialog box. This dialog box allows two distinct types of unload time calculations — deterministic, using the Constant or File Based selections, or stochastic using a probability distribution from the list. In addition, you can write an SCL routine that produces the load time using the User Func option or a simple SCL expression using the SCL expression option. When a file based load time is chosen you are prompted to supply the location and name of the file containing the load time data. The data file must be in a SCHEDULE$LIB directory. In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

• New Process — Allows a process to be associated with the load, either a new process or one that has already been defined. Processes are covered in more detail in Chapter 4: Logical Modelling Elements. The definition or association of a process here allows a load to require certain part combinations and additional resources (labor or AGV) and to specify duration.

Failures. This button makes it possible to model the buffer ceasing to operate for a finite period of time thus representing unscheduled down time such as breakdowns. They are covered in more detail in Chapter 4: Logical Modelling Elements.

Buffer Logics

The Logics function allows you to further influence the behavior of a buffer by changing the rules by which the buffer operates. This can involve selecting from one of the many available standard behaviors or specifying a user-defined function, written in SCL that performs the required operations.

The logics available for a buffer are shown below.

Page 21: 07_BasicElements

Process Logic. This controls the behavior of a part after it enters the buffer. You can either set the buffer to its default process logic or to User Func where the buffer process logic can be defined in SCL.

Queue Logic. Not all buffers operate like the queue in a bank where customers are served in the order in which they arrive known as First-In-First-Out (FIFO) queuing logic. A buffer might be a stack where parts are both added and removed from the top of the stack so that the queuing logic is LIFO. This button allows you to specify the rules that define the order in which parts are passed out of the buffer. The default queue logics provided are.

• FIFO (First In First Out) — The first part to enter the buffer will be the first part to be routed out.

• LIFO (Last In First Out) — The last part to enter the buffer will be the first part to be routed out.

• Ascending Order — This option sorts the queue from the lowest to the highest value based on user-defined attributes on the parts.

• Descending Order — This option sorts the queue from the highest to the lowest value.

• User Func — Allows you to select your own SCL file to control the queuing of parts.

NOTE: The queue is executed whenever pass, produce, or do process statements attempt to place the parts at the output. Once a part has been placed on to the output (and hence under the control of the route logic) it is not affected by the queuing logic. This means that the parts specified as initial stock will not be ordered in accordance with the queuing logic.

3.5 Basic Elements — Machines

Machines are used to represent the system resources that are responsible for processing or carrying out work on a part.

Machine Dialog Box Parameters

The characteristics of a machine may be modified by selecting Model | Build | Element Class | Machine. When the Machine button is selected a dialog box appears that allows the selection of an existing machine class by name or New, which allows the creation of a new machine class. If new is selected and the simulation has been run for any length of time, a dialog box will appear prompting for confirmation that the simulation run is to be terminated. After creation of a new machine class it is necessary to start the simulation run from time zero.

Page 22: 07_BasicElements

Input Type. Using this button the input type of the machine can be toggled to either Push or Pull. If Pull is selected then the machine will only receive parts on its inputs after it sends a request. More details of Pull Systems are presented in Chapter 18. Push input means that the machine's inputs are passive and receive parts on their inputs whenever they are pushed on by upstream elements.

Output Type. Using this button the output type of the machine can be toggled to either Push or Pull. If Pull is selected, then parts will not be routed out of the machine until a request is received from a downstream element. An output type of Push means that the machine routes parts from its outputs as soon as the downstream elements are able to receive them.

No. of Processes. Machines are capable of performing more than one operation, may be even simultaneously. The operation that a lathe performs, for example, may depend on the type of part that it is processing. Using this button you can set the total number of processes associated with the machine class.

Initial Stock. Initial stock allows you to set the numbers and classes of parts that are already present in the machine when the model run begins. The default is zero. This parameter allows a machine to begin with any number of any part class that has been defined within the model.

Page 23: 07_BasicElements

When the Initial Stock button is selected, a class initial stock dialog box appears. This allows the initial quantity of each part class to be specified. Of course, the part classes must have already been defined or they will not be available in this dialog box.

NOTE: If no part classes have been defined in the model, this button will not operate.

Process Percentage. This button is used to set the percentage for the various processes assigned to the machine class. These percentages will work only if the process logic of the machine is set to Percentage Process.

Unload Process. This button allows assignment of an unload process to the machine. When selected, you are prompted to choose from the following:

• None — No load/unload process is to be set for the machine.

• Time Only — Time distribution of the load/unload process is to be entered.

• New Process — A new load/unload process is defined and set, or an existing load/unload process is to be assigned to the machine.

Labor Controller. This button allows the selection of the labor controller element that will be used to satisfy any labor requirements that this machine may have during its operation. The topic of labor is covered in detail in Chapter 11.

Shifts. Shifts allow you to set the operating hours of the machine to follow a daily or weekly pattern. Shifts are discussed in detail in Chapter 4, Logical Modelling Elements.

Cycle Process. Using this button, you can define and assign cycle processes to the machine class. You are prompted to choose from the following options:

• None — sets no cycle process to the machine.

• Default_cycle — sets the cycle process to the default cycle process.

• New Process — defines and sets a new cycle process to the machine.

• Current Process Details — displays a dialog box with the current process settings.

NOTE: Cycle processes may also be defined through the Model | Aux menu item.

Setup Process. Setup process can be assigned between any two-cycle processes. You are prompted to select the from

cycle process and the to cycle process from the list of processes associate with the machine, and assign a setup process between the two selected cycle processes. If the machine has only one cycle process, the from cycle process and to cycle process are selected by default. The setup process options are:

• None — sets no setup process to the machine

• Time only — prompts you to enter the time distribution of the setup process.

• New Process — defines and sets a new setup process to the machine.

Failures. This option allows you to model the machine ceasing to operate for a finite period of time, thus representing unscheduled down time such as breakdowns. They are covered in more detail in Chapter 4 of this manual.

Request Routing. This button allows you to set part request propagation routing, proportion, priority table that will be used while running the request logic. More details on requests may be found in Chapter 18 of this manual.

Page 24: 07_BasicElements

Machine Logics

The Logics button allows you to further influence the behavior of a machine by changing the rules by which the machine operates. This can involve selecting from one of the many available standard behaviors or specifying a use-defined function, written in SCL that performs the required operations.

Process Logic. This controls the behavior of a part inside the machine. Process logics are initiated for all the element classes at the start of simulation and run all the time unless terminated through an SCL statement. You are prompted to select from the following options:

• First Possible Process — This logic sets that process of a machine whose process requirements are met first, and is the first possible process among all the processes assigned to that machine.

• Percentage Process — This logic sets the process of a machine based on a percentage basis as defined in the Process Percentage button.

• Cyclic Process — This logic sets the process of a machine on a cyclic basis.

• Sequence Process — You can schedule the process to be set for the machine using this button.

• Precedence Process — Assigned cycle processes are completed only after the precedence processes for the cycle process is complete. If no precedence is set for any process, all cycle processes assigned to the machine are started simultaneously.

• User Func — This button allows you to define your own logic to govern the setting of process to a machine.

Request Input Logic. This is used to define the request input logic.

• Default Request Input — This option handles a request for a part. If a part is available to meet a request, it is provided. If no part is available to meet a request, the request is propagated.

• Least Pending Requests — This option assigns a request to the element that has the least number of pending requests.

• Cyclic — This option assigns a request to the next element in cyclic order.

• User Func — Allows you to select a custom SCL file to control the request input.

Request Logic. This logic is responsible for receiving, creating and dispatching requests upstream. Request logic decides the type of requests to create and send, the number of requests to be made and the destinations of the requests. You are offered the choice of either the default machine request logic or user-defined request logic. Request logics are initiated for all the element classes at the start of simulation, and run all the time unless terminated through an SCL statement.

Page 25: 07_BasicElements

Request Propagation. This allows you to set logic to govern the propagation and destination of the requests:

• Where Part Available — Sends the request to the upstream element which has the required part.

• Cyclic — Cycles the request through the pull slots available for the element.

• Minimum Room — Sends the request to the upstream element that has the minimum room left.

• Least Utilized Input — Sends the request to the upstream element that has been the least utilized so far.

• Maximum Parts — Sends the request to the upstream element that has the maximum parts of the required type.

• Maximum Waiting Time — Sends the request to the upstream element in which the parts have had the maximum waiting time.

• Min Request Fulfill Time — Sends the request to the upstream element where the time to fulfill a request has been the minimum.

• Percentage Request — Samples the pull-input slots based on user-specified percentages and sends the

request through the selected slot.

• Priority Request — Sends the request through the pull-input slots based on the priority. If the required part

is not available in the element connected to the highest priority slot, the next highest priority slot is Fixed Request.

• Fixed Request — Request is sent through the slot based on slots specified by you for each part class.

• User Func — Allows the use of user-defined logic for governing request propagation.

3.6 Basic Elements — Sinks

Sometimes the parts in a model represent entities that circulate through the system, such as palettes. For example, the number of available palettes may be a constraint in the system and the model may need to track the location of all palettes at all times. On the other hand, many of the parts that flow through QUEST models will eventually leave the model. Finished goods, for example, will eventually leave a factory model for the warehouse or be dispatched to the customer. We could model this by using a buffer to represent the final destination of parts but this would eventually slow the model down, as the number of parts present in the system continued to rise. Since we will generally have no further interest in a part that has left the system it is efficient if the part can be removed from the model entirely.

This is achieved in QUEST using a sink. The primary purpose of a sink is to destroy parts and therefore, inputs but no outputs. Thus, using a sink rather than a buffer to model a warehouse that is outside the scope of interest of the model frees up computer resources. Although the parts are destroyed in the sink, all the statistics relating to these parts are maintained by QUEST and may be accessed at any time during or after the simulation run.

You may modify the characteristics of a sink by selecting Model | Build | Element Class | Sink. When the Sink button is selected a dialog box appears that allows the selection of an existing sink class by name or new which allows the creation of a new sink class. If new is selected and the simulation has been run for any length of time, a dialog box will appear prompting for confirmation that the simulation run is to be terminated. After creating a new sink class it is necessary to start the simulation run from time zero.

Page 26: 07_BasicElements

Input Type. Using this button the input type of the sink can be toggled to either Push or Pull. Choosing Pull activates the IRT (Inter-Request Time) and Request Lotsize buttons, as in Pull mode a request has to propagate from the sink to the upstream elements. Pull logics are discussed in greater detail in Chapter 18 of this manual. In push mode, the upstream element pushes the parts into the sink. IRT and Request Lotsize buttons are deactivated when the input type is set to push.

Max. Request Count. This number sets the upper limit to the maximum number of requests a sink can make.

Start Offset. This offsets the first request creation time from the simulation start time by the specified amount.

IRT. This button is activated when the input type of the sink is set to PULL. Selection of the IRT (Inter-Request Time) button brings up the Distributions dialog box. This dialog box allows two distinct types of request patterns — deterministic, using the Constant or File Based options, or stochastic (random) using a probability distribution from the list. In addition, you can write an SCL routine that returns the IRT using the User Func option or a simple SCL expression using the SCL Expression option.

SCL routines are documented in Chapter 5 and the QUEST SCL Reference Manual.

When a file based inter-request time is chosen you will be prompted to supply the name of the file containing the inter-request time data that must be kept in the SCHEDULE$LIB directory. In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

Page 27: 07_BasicElements

Request Part Fractions. This button sets the proportions of each part class that the sink will request when in pull mode. When the sink requests a part it chooses the new part's class at random based on probabilities determined from the specified request part fractions, and independent of the proportions of any initial stock in the source. If a model with n different part classes has a sink with request part fractions F1, F2, F3, ...Fi...Fn then the expected proportion of parts of type j will be:

Fj

n

∑ Fi

i=1

Part classes with a proportion of zero will never be requested.

NOTE: Sampling random stream 1 generates request part fractions. You can change this default stream number by modifying the individual elements.

Failures. The failures makes it possible to model the source as ceasing to operate for a finite period of time thus representing unscheduled down time such as breakdowns and strikes. Failures are covered in more detail in Chapter 4, Logical Modelling Elements.

Request Lotsize. You can use this button to set the number of parts requested simultaneously. The default is one. Selecting this button displays the distributions. This dialog box allows two distinct types of lot size calculations:

• Deterministic — Using the constant or file based options, or

• Stochastic (random) — Using a probability distribution from the list. In addition, you can write an SCL routine that produces the lotsize using the user func option.

When a file based lot size is chosen you are prompted to supply the name of the file containing the lot size data that must be in a SCHEDULE$LIB directory. In this way a model can be run using data from the real world either to improve the accuracy of the simulation or perhaps as part of the model validation process.

Labor Controller. This button allows the selection of the labor controller element that will be used to satisfy any labor requirements that this sink may have during its operation. The topic of labor is covered in detail in Chapter 11, Labor.

Shifts. The Shifts button allows you to set the operating hours of the sink to follow a daily or weekly pattern. They are treated in detail in Chapter 4, Logical Modelling Elements.

Sink Logics

Clicking on the Logics button allows you to set the following logics for the sink.

Page 28: 07_BasicElements

Process Logic. You can either set the sink to its default process logic or to user func where user-written sink process logic is used. The default pull sink process logic is different from default process logic in that default pull sink process logic does not have many options.

Request Routing. This button allows you to set part request propagation routing, proportion, and priorities that will be used while running the request logic. This is discussed in more detail in Chapter 18, Pull Systems.