PESIGN OF AN INTERACTIVE SIMULATION TOOL FOR AUTOMATIC GENERATION AND EXECUTION OF A SIMULATION PROGRAM USING SIMAN/' ,,

A Thesis Presented to The Faculty of the College of Engineering and Technology Ohio University

In Partial Fulfillment of the Requirements for the Degree Master of Science

Iyer Krishnan Jyothi Lakshmi - / March 1993 LIST OF ILLUSTRATIONS

FIGURE PAGE 2.1 Expert System in Simulation Modeling 08 5.1 Block diagram of the conceptualized system 39 5.2 Building Blocks for typical manufacturing systems 41 5.3 Single server, single queue 44 5.4 Multiple servers, single queue per server 44 5.5 Single station with parallel servers,single queue 45 5.6 Multiple stations, parallel servers, single queue 45 5.7 Operation sequence for system with no inspection 46 5.8 Operation sequence for inherent inspection 47 5.9 Operation sequence for independent inspection 48 6.1 Structure Charts for SIMTRAN (a), (b), () 5 1 6.1 Structure Charts for SIMTRAN (d) (e) 52 6.2 General Flow Chart for program 53 6.3 Specific Flow Chart of developed software 57 6.4 Facility Layout for sample problem 62 7.1 Single server,single queue system for verification 66 8.1 Bar Chart the overall time taken per subject 76 8.2 Bar chart indicating the average time taken for 77 each task by all subjects 8.3 Bar Chart indicating the subject ratings for the software 78 ACKNOWLEDGMENTS

I wish to express my deepest appreciation and gratitude to Dr. H.T Zwahlen for willing to be my advisor and for the help and constructive criticisms provided by him towards its successful completion.

My sincere acknowledgements also go to Dr.Nur Ozdemirel who provided me with the opportunity to begin on this research with her and guided me through its conceptualization.

I also wish to thank Dr. C.M Parks and Dr. C. Vassiliadis for their co-operation and for having consented to be on the thesis committee. A special thanks to Dinesh Dhamija for promptly providing the computer and lab facilities.

I would like to express my heartfelt gratitude to Murlidar Ramakrishnan and my brother Venkatesh for the timely support and encouragement. A special thanks to all friends, especially Kay Reeves, and all faculty who have made these past three years so memorable.

Finally, I express my deepest gratitude to my parents whose patience and continuous support has been the cornerstone for all my achievements in academia or otherwise. ABSTRACT

Manufacturing simulation used in the modeling and experimentation of a prototype requires a high level of expertise to achieve the desired task. This research proposes a method of configuring existing generic simulation models in manufacturing through an user-friendly and interactive interface between the non-expert user and the simulation language. Such a system could be a powerful, cost effective tool that provides the non-specialist access to simulation and the specialist increased productivity. TABLE OF CONTENTS CHAPTER PAGE

Acknowledgments Abstract List of Illustrations List of Tables

1. INTRODUCTION

2. LITERATURE REVIEW 2.1 Simulation Software Development 2.2 Towards "Integrated Simulation Environments" 2.3 Various Approaches to K.B Simulation 2.4 Ergonomics of Interactive Interfaces 2.5 Summary

3. SYSTEM REQUIREMENTS AND ASSUMPTIONS 3.1 Simulation Model Assumptions 3.2 Hardware and Software Requirements 3.2.1 Requirements for a user 3.2.2 Requirements for developer 3.3 User Requirements 3.4 Input Requirements 3.5 Output Requirements 3.6 Other Requirements

4. DESIGN ALTERNATIVES 4.2 User Levels 4.4 Simulation Languages 4.4.2 Simscript 11.5 4.5 Programming Languages

5. SYSTEM APPROACH 5.1 Research Goal 5.2 Approach Outline 5.2.1 Environment for Simulation Model Generation 5.2.2 Conceptualized System for Model Generation 5.2.3 Deriving a Simple Manufacturing Subset 5.2.4 Implementing the System 5.3 System Configuration Approach 5.3.1 Station Configuration 5.3.2 Operation Sequence Configuration

6. 6.1 Software Design Criteria 6.2 Software Organization 6.2.1 Create Module 6.2.2 Edit Module 6.2.3 Generate Module 6.2.4 Simulate Module 6.3 Software Ergonomics Used in Design 6.3.1 Input Error Handling 6.3.2 Simulation Error Handling 6.3.3 Use of Color Codes in Input Screens 6.4 Sample Problem

7. TESTING AND EVALUATION 7.1 Verification of the software 7.1.1 Verification of generic model 7.1.2 Verification of the translator module 7.1.3 Verification of user interface 7.1.4 Verification of the integrated package 7.1.5 Verification of simulation results 7.2 Validation of the software

8. RESULTS AND DISCUSSION 8.1 Equivalence of Results 8.1.1 Results for single server problem 8.2 Analysis of Results

9. CONCLUSIONS AND RECOMMENDATIONS

BIBLIOGRAPHY ...... APPENDIX

A. User's Guide B. IS0 Recommendations for color codes in Displays C. Validation Data sheets, Instructions, Questionnaire D. Verification Data using SIMAN & SIMTRAN E. Program Source Code F. Raw Data Sheets from subject tests CHAPTER ONE

INTRODUCTION

Schriber defined computer simulation as the modeling of a process or a system that mimics the response of an actual system to events that take place over time. Since complex systems can be both objective and subjective, different analyses of the same process can conceptualize it into different systems and environment. It is therefore possible, for several models to exist simultaneously. However, this requires : definition of an explicit mathematical or logical model, an efficient and effective computer program, and, an experimental procedure to obtain results which can predict system behavior under various conditions. Thus, simulation modeling must be considered as both an experimental and applied methodolow.

Simulation plays an important role in the design and management of the manufacturing and/or service industry. It allows for visual modeling of a prototype on a computer, well before the implementation of an actual system. The modeler has to identify the simulation objects, the various entities, resources, and their data structures to form the conceptualized system. Although a demanding task, simulation has proven to be highly cost effective in industries.

However, in order to use simulation techniques correctly and proficiently, the user must have expertise in several fields viz., modeling, computer programming, probability, statistics and heuristic methods in addition to real world practical experience. Consequently, simulation has received low acceptance in industry.

Simulation models can be either symbolic or iconic. Symbolic models are represented by either higher level languages (viz., ,PASCAL, BASIC) or general purpose simulation languages (viz., GPSS, GASP, SIMAN, 2 SIMSCRIPT). Iconic models are represented by integrated packages called simulators (viz.,SIMFACTORY, PROMODEL, WITNESS, SLAM).

Although simulation has grown in popularity in manufacturing, it is still being under utilized to either modify existing facilities under extreme conditions of loss or emergency. Ideally it should be used in the design and planning of a new facility before its actual implementation in order to eliminate bottlenecks and to optimize the use of system resources. This would help in proofing out plans for long term profitability through simulation, for a very small percentage of the cost, as opposed to altering existing facilities. However, the fact that simulation has not yet been universally adopted is indicative of certain limitations that may be present in currently used simulation approaches.

Two primary reasons that have been attributed towards this lack of acceptability are: 1) the considerable level of expertise required for its use and, 2) the prohibitively long lead times where decisions have to be made promptly. Although simulators allow simulation models to be developed using only menus and graphs, with little or no programming, they are still application-specific due to constraints in their system configuration. Hence the need for a simulation approach which has the simplicity of a simulator and flexibility of a simulation language, allowing the design of reusable models instead of "throw away" ones.

With the advent of artificial intelligence(A1) in the 70's, research in this direction dramatically increased. A1 has in turn opened new disciplines of which expert systems (ES) is the most successful of them all. On examining the various taxonomy for combining ES and simulation (O'Keefe, 1986), three significant applications were recognized. These were, the development of: (1) simulation tools for combining existing simulation and knowledge-based methods. (2) systems for giving advice to inexperienced modelers in the area of experimentation and analysis. (3) intelligent user interfaces for existing simulation packages. 3 Recently, with the recognition of similarity between simulation and expert systems and the increasing ability of computers in symbolic processing, simulation languages and packages are being replaced with the concept of a "simulation environment". A "simulation environment" is a collection of tools, that are well- integrated and interacting synergistically in support of all phases of the modeling process (Reilly, Jones, Dey, 1989). Its original framework was introduced by Henrikson (1983) using distributed processing architecture and consisting of a: builder, record keeper, results analyzer and model executor. Attempts to apply A1 techniques to the complex area of simulation would provide both the non- specialist and the specialist with access to simulation.

The Intelligent Simulation Interface (ISI) software combines the concepts of a simulation environment with effective interactive graphics for the construction and running of discrete event simulation models. It currently provides user interface to SIMAN through a user-specified graphical model which is later used for model definition, code generation and post-processing of results. Yet another application is ISIM (Intelligent Simulation) developed by Bozenhardt, Eads and Etra in 1990. ISIM provides the ability for any process engineer to draw a process flow diagram and specify parameters to begin dynamic simulation without any knowledge of computer or programming skills.

However, a more practical approach towards building an interactive simulation front end would be to build a database of exisitng models of commonly encountered systems. These may be later accessed and configured by the modeler to meet specific requirements. The user specified model can then be automatically generated and executed using an appropriate simulation language. This would eliminate the need to build models from scratch for each application( i.e increase reuseability) and the user to have programming knowledge. Also, the user would need only a basic knowledge of simulation concepts. 4 PURPOSE AND OBJECTIVES;

The present research focuses on developing a front end interface for automatic simulation modeling in SIMAN. The goal is to provide the modeler with a tool to develop various simulation models by configuring an existing model frame through changes in its experimental frame alone. Although programming in a simulation language is eliminated, the research does not focus on output processing or statistical analysis.

This research expects to achieve the following objectives: to design and develop the menulscreen based, user friendly interface using C language to be used for simple manufacturing processes, to design a framework for automatic program generation of stochastic discrete-event simulations with SIMAN IV, an existing simulation language, to subsequently design and develop its interactive front-end interface, to design a "generic model frame" for a small subset of a manufacturing facility, to allow the non-expert user to specify the experimental parameters for the stored generic model and run the simulation without requiring any programming knowledge, to use ergonomic guidelines in the development of the software interface.

Further research in the fields of A1 and simulation aim at building greater intelligent systems that would be capable of self-modification through self- learning. Also, each block of the expert system and simulation environment is % being further improvised using state-of-the-art technology. CHAPTER TWO

LITERATURE REVIEW

2.0 DEFINITION

Simulation is defined as a procedure in which experiments are performed on a model of a system in order to determine how the system would respond to changes either in its structure or in its environment. (Mellichamp, 1984).

Simulation process has been found to involve several steps (Pegden, Shannon Shadowski 1990). However, the present research is concerned only with conceptual model formulation, model translation and execution of the defined experiment. It does not include data collection, preliminary experiment design, analysis or interpretation of the output.

2.1 SIMULATION SOFTWARE DEVELOPMENT Nance (1984) states that simulation software has been through five distinct phases of development: Until 1960 - general algorithmic languages viz., ALGOL, PASCAL & FORTRAN were used for simulation modelling. Many are still written that way. 1960-65 - special purpose simulation languages were developed. 1966-70 - revision and improvisation of the special purpose languages. 1971-80 - introduction of languages allowing combined discrete and continuous modeling. End of 1980 - methods for easier model development and execution. 1981 -Present - New simulation languages developed based on logical modeling framework. - simulators with graphical interface. - emphasis on providing ease of use and integrated simulation environment. 6 Although general purpose languages were used, they did not provide convenient data structures for event processing (Hoover, Perry, 1987). Also, the random number generation method was too tedious and not efficient.

The first special purpose language for simulation modeling, GPSS, was developed by Geoffrey Gordon in 1961. Studies indicate (Ira Kay, 1972) that between then and 1970, there was a stream of other digital-discrete simulation languages such as SIMSCFWT, GASP, SIMON, CSL, SIMULA, and PROSIM that were designed and implemented. These languages were either event oriented (viz. GASP, OPS-3, PROSIM) or process oriented (viz. BOSS, CSL, GPSS, SIMULA, SIMON). Their use was limited since at that time GPSS and SIMSCRIPT dominated the field in availability.

A review of operations research literature shows that many of these languages have been successfully used for modeling various manufacturing and servicing facilities, e.g. production scheduling, capacity planning and utilization(Mellichamp,1984), semiconductor manufacturing (Hood et.al, 1989) and material handling (Banks,1990). However, due to extensive programming requirements most languages have not been accepted as standard tools by industries at management level.

With the advent of personal computers, the widespread simulation languages have been improvised for execution on micro & mini computers along with animation. Simulation packages, Also known as simuliztors, were created to take advantage of current computer capabilities for database management, graphics, and program verification. Most of them (e.g. SIMFACTORY, PROMODEL, WITNESS, MIC-SIM) involve the input of the process facility model in the form of node-network diagrams with specifications or using model constructs(Law, Kelton,l991). Simulators like WITNESS & FACTOR have been found to incorporate the ability to call external routines in general purpose language viz., FORTRAN or C. However they allowed the simulation of only specific class of systems (thus having less flexibility) with little or no programming (Law A, 1990). 7 Several authors such as Heidorn (1974), Mathewson (1974) discussed easier programming methods. Zeigler (1976), Nance (1977) and others suggested more formal approaches to modeling. Oren and Zeigler(1979) pointed out several shortcomings in current languages. They proposed developing new languages based on the concept that, simulation languages should functionally separate the logically distinct stages of modeling, experiment specification and output analysis into separate activities.

The SIMAN modeling framework is based on the system theoretic concepts developed by Zeigler & Oren(Pegden 1987). SIMAN (SIMulation ANalysis) was developed in 1982 by Dennis Pegden and improvised later in 1989 to its present form as SIMAN W. It's world view combines both, event-oriented and process- interaction strategies.

The framework distinguishes between the system model and the experimental frame. The former defines the static and dynamic characteristics of the system. In comparison, the experimental frame defines the experimental conditions under which the model is run to generate specific output data.

By separating the model structure and the experiment frame into blocks and elements respectively different simulation experiments can be run by changing only the experimental frame. Thus the system model could remain the same. Attempt has been made to effectively use this feature of the language in the present research to conceptualize the design of a generic model database. This could later be linked and executed under various experimental conditions through a menu-driven user interface.

Also since the software structure has five independent processes separating each functional activity, the user can create and can save model files, experiment files, program files and output files independently. Data collection, experimental design and output analysis are not within the purview of this research. 8 2.2 TOWARDS "INTEGRATED SIMULATION ENVIRONMENTS"

Reilly et. a1 (1985) describe "simulationenvironment" as, "a collection of tools that are well integrated and interacting synergistically in support of all phases of the modeling process."

The original concept of a "simulator's workbench" was proposed by Henriksen (1983) and consisted of four major components, namely, builder, record-keeper, results analyzer and model executor.

Attempts to conceptualize such an environment led to the conclusion that such intelligent systems could only be developed when sophisticated AI technology and high resolution graphics were placed in the work design (Reilly, Jones, Dey, 1985). With recent developments in AI especially in the field of KBES (Knowledge Base Expert System), several studies have been conducted with an attempt to use KBES to achieve the objective of simulation modeling.

An investigative study conducted by Touran Ali(1990) shows the following general areas of integration of A1 and simulation: a) Knowledge based (K.B) simulation (wherein user can interrupt execution for interim results or to change output in real time) b) Using Expert System (ES) to analyze simulation results (e.g. Reddy, 1987) c) Using simulation to evaluate ES (e.g. Elmaghraby, et. al, 1990) d) Using ES for debugging simulation models (e.g. Mellichamp et.al, 1990) e) Using ES for simulation modeling (Refer figure 2.1)

Fig. 2.1. Expert System in Simulation modeling. 9 The last option is relevant to the objective of this research, namely, to design a user interface for easy model generation, without the user having to program in any simulation language.

2.3 VARIOUS APPROACHES TO AUTOMATIC SIMULATION

Earlier attempts in automating simulation programming led to the development of program generators. The first generator was developed at RAND (Oldfather, Ginsberg et.a1,1966). Program generators such as DRAFT (Mathewson 1975,1984) used structured programming principles to automate simulation code generation. This saved the user from spending time and effort to learn a specific simulation language. However, there was an assumption that the target code will be edited and that the input symbols are not sufficient. Very few generators executed or interpreted results. Also, these generators are concerned about code generation but not the conceptual model building process.

Although various approaches have been taken by different researchers, four main school of thought were identified with regard to model construction (Ozdemirel,1989) and are listed below: a) Hierarchical modular structure. b) Objected-oriented programming paradigms (in conjunction with production rules). c) Production rules only. d) Intelligent user interfaces or front ends upon conventional simulation languages or models written in high level programming languages.

The first three approaches have been addressed by several researchers (e.g. Oren & Zeigler (1979), Reddy (1984), Rothenberg (1986)). A major drawback from the users perspective is that they represent yet another language to be learned. They assume that the user has sufficient background to develop models from scratch for user-specific situations. Hence they do not exhibit user- friendliness for a casual user (i.e., one who uses the program repeatedly but irregularly and never really becomes an expert at it) (e.g. high level managers). A detailed discussion of these approaches has been done by Dr. Ozdemirel in her 10 doctoral dissertation. The fourth approach concerning the intelligent interface being relevant to the present research will be discussed further.

Model generation using expert system has been classified as Intelligent Front Ends(1FE) (O'Keefe,1986). An expert system framework based simulation generator for controlling flexible manufacturing systems(FMS) was developed by Haddock in 1987. It serves as a preprocessor to SIMAN , executes and interprets results of experimental runs and also makes statistical inferences about the performance measure. The generator is written in BASIC using a menu driven interface and requires that the user define models from scratch (i.e generates both the model and the experimental frame).

Cochran, Mackulak, Castillo and Du (1987) are of the opinion that some of the most important features for an ideal simulation environment related to model development are: (1) eliminating any form of user programming and (2) making modeling economic and easier by using existing generic models to modify rather than build from scratch.

Table 2.1 shows the number of implementations on microcomputers.

Two distinct techniques are seen among the softwares developed; one that uses high level languages viz., ADA, FORTRAN, Pascal or C in both simulation. packages and user interface; second that develops user interface upon any of the conventional special purpose simulation languages. 11 Table 2.1 Intelligent User Interfaces developed for simulation in manufacturing Simulation Computer Software Software Characteristics domain Language Hard ware Developers CLass Discrete FORTRAN Phillips - GEMS (Generalized Manufacturing Manufacturing et al. Simulator) , a simulation package to (1979) analyze complex discrete part manufacturing systems with problems formulated using nodes and arcs (network representation) General FORTRAN Mainframe Standridge - SDL: Simulation Data Language pwme (1981) - provides procedures to estimate model parameters, interface simulation program with database, analyze output and generate report - data organized into relations - separates data and model - ilf with SLAM, Q-GERT, & GASP I Manufacturing FORTRAN Microcomputer Hutchinson - system defined by activity cycle Cell & (1981) diagrams similar to Petri Nets ECSL - interactive program CAPS generates models in Extended Control Simulation Language Robotic Cell QGERT Medeiros - analyzes different cell configurations Configuration & at the design stage Sadowski - library contains 13 modules that are (1983) linked in various configurations FMS FORTRAN Lenz (1 985) - integrates 3 softwares developed, Simulation & and SPAR for capacity planning, MAST PROLOG Wichmann simulates hfw components, controls (1986) hierarchy, BEAM for animation - XMAS, is a KB user interface for MAST to simplify design process Manufacturing ADA Mainframe Antonelli - hierarchical decomposition of cell Cell (concurrent) et al. (1986) (diagrammatic and procedural) - system description language to describe the process oriented system at a desired level of detail Manufacturing FORTRAN, Microcomputer Miles - configures single general model to Cell Assembler & (1986) obtain the specific model SIMAN - menu driven to modify database, configure and generate model, and generate outputs - deterministic to predict the system status at any time Inventory FORTRAN Mainframe Bengu & - combines simulation with Control & Haddock optimization routine SIMAN (1986) - interactive simulation model generator (problem specific)

continued... 12

Table 2.1 (cont.)

Simulation Programming Computer Software Software Characteristics domain Language Hardware Developers Class Resource SIMAN Microcomputer Ingalls - FAST, consists of menu structure Planning in (1986) similar to Lotus 1-2-3 electronics - consists of 5 specific models for facilities detailed simulatioa of subsystems (entire facility, parts, processes, stock rooms and material handling) FMS C, Turbo Microcomputer Mackulak - MASCOT, chooses generic models, Simulation Prolog & et al. (1987) configures selected model by SIMAN consultation, runs and analyzes output - two generic models available, discrete manufacturing model and assembly model FMS BASIC Microcomputer Haddock - IFE generates simulation code for Simulation & (1987) part types and machining centers SIMAN & based on user information (1988) - executes model and generates output and summary report General OPS83 Minicomputer Murray - KBMC, knowledge based model Purp0~ & & construction system to build queueing SIMAN Sheppard systems in SIMAN (1988) - Rule base has of 2 types of rules: extraction rules for interactive model specification (model entities, entity interactions, statistics, termination condition), and construction rules for generating SIMAN models

( Adapted from: Generic manufacturing simulation model construction based on group technology classification of models, doctoral dissertation, Dr. Nur .E. Ozdemirel, 1990 ) 13 It is seen that SIMAN is frequently used for the latter technique, due to the separation of its model structure(i.e. logic) and experimental frame (i.e. data).

Among the model building techniques implemented, the most economical and practical one involves the design of generic models for typical manufacturing environments. These could be designed on a microcomputer such that the user accesses one of these models through an user-friendly and interactive interface and later modifies it to build an user-specific model. The software designed could further assist the user in model-editing, model-translation upon an existing simulation language, model-execution and the interpretation of its output results.

MASCOT is an IFE designed on a microcomputer using the above technique(Macku1a.k et.al, 1987). It provides two generic models, one for discrete manufacturing and the other for an assembly facility. It forms a preprocessor to SIMAN and uses a query-based interface through C and PROLOG.

A unique classification method for building "generic models" has been developed by Dr.Ozdemire1 (1989). Group Technology (GT) approach was used to develop 40 generic models representing the structural properties of models common to a wide range of simulation models that are built for manufacturing systems. Each generic model can be used to simulate many manufacturing systems that are similar in nature. These generic models developed in SIMAN are stored in a knowledge base (capable of simulating nearly 70% of the manufacturing facilities).

The GUIDES (Generic User-friendly Intelligent Design System for Simulation) software developed using Turbo PROLOG allows the user to configure a model to fit specific requirements. The program automatically selects the appropriate generic model frame in SIMAN which closely represents the defined system. The software is query and menu-based, not very interactive, and written in Turbo Prolog. It does not translate or simulate the system defined. It neither addresses statistical inferences nor interpretation of results. Hence it is not a complete modeling tool for a non-expert user. 14 The present research effectively utilizes this concept of building specific models from existing generic model bases to build an interactive tool for simulation modeling. Various features from the 40 models developed are combined to define a manufacturing subset for implementing a more complete software for simulation modeling.

2.4 ERGONOMICS OF INTERACTIVE INTERFACES

In all the above reviewed literature for a "cognizant interface" between the user and the simulation software, much emphasis has been placed on encompassing the state-of-the-art in technology and effectively utilizing the techniques in the areas of A1 and software ergonomics (Treu,1988). In most simulation modeling the human interaction at the input end is predominantly visuallgraphical and is used for information input or retrieval. The applications of ergonomics in software development is loosely termed as "user-friendliness" in computer software jargon.

Graphical programming approaches can be classified into three groups: 1. Network and block diagrams (as used in conventional simulation languages for modeling and communication); 2. Icons, menus, forms and windows; 3. Dialogs and tree structured menus.

The first approach is language-dependent and hence restrictive. The second approach originated from the field of A1 wherein complex application areas demanded the need for friendlier environments. The last approach is relatively new and has not been availed for simulation. The present research utilizes menus and windows in the design of its user-friendly and interactive input interface for specifying the model's experimental parameters.

Mufit Ozden(1991) in his research paper discusses the design of a prototype graphical programming methodology for modeling and interpretation of simulation problems using Smalltalk-80 language. The visual interface using icons for building activity-cycle diagrams, he believes, will be appreciated by both modelers and people who are involved in development and management of systems. It 15 would also form friendly means of communication between the modeler and the computer for automatic programming.

IS1 (Intelligent Simulation Interface) is yet another graphical interactive environment for using simulation languages (Nolan, Lane et.a1,1991). Icons representing model blocks of a simulation language are interconnected to form base macros which may be stored into a macro library. These macros are selectively imported into ISI, thus customizing it to a particular application. The user can then graphically represent the overall system by drawing a flow diagram and specifying its model data and experimental information.

Once completed, the simulation code is automatically generated through IS1 and the animated model is run. It also includes output processing. Its current interface is to the SIMAN language and the software itself is implemented in mulisp-87 using frame-based knowledge representation.

One of the major requirements of a graphical input of data through node networks, icons or activity-flow diagrams is that the user should have knowledge of such representation. Although on-line help may be provided to guide the user, it is likely to be error prone, in that the actual model might be misrepresented by a non-expert user.

An easier method for the user would be to define the specific model through numeric or text inputs, which may later be interpreted by the program generator and translated into any existing simulation language. The present research attempts to implement the above mentioned technique for building a truly interactive interface and thereby providing a simulation tool for a non-expert modeler in simulation modeling.

Studies conducted in the field of software ergonomics show that fill-in forms and menu screens are most appropriate for input handling(Shneiderman et.al, 1982, Vassiliou, 1982, Kearsley,Hally, 1986, Bullinger et.al, 1988, Mayhew, 1992) for users with: low motivation and negative attitude moderate typing skills and system experience 16 irregular software usage requirements little or no training i.e. the non-expert and casual user population for whom the interactive interface needs to be developed.

Deborah Mayhew's book "Principles and Guidelines in Software User Interface Design" is a comprehensive collection of the extensive research done in the past ten years on user interface design from the ergonomics point of view. In addition to providing guidelines it also includes research data and the theory drawn from it. The following is a brief review of the relevant design guidelines and standards set with regards to fill-in forms, menu screens and the use of color.

Experimental results on design issues of menu-based system suggest the following guidelines for better performance: menu structures should have 2 levels with 8 choices per screen (Miller, 1981) menu choice ordering should use category-category grouping (i.e logical semantic groups instead of alphabetical ordering)(McDonald et.al, 1983) menu choice selection should be done using arrow keys only for small number of selections. For most applications compatible letter (first letter of label) or numbers may be used (Shinar et.a1,1985) menu navigation (searching for appropriate options) requires consistency in screen design and formats. Extent of backward navigation may be chosen suitably.

Experiments conducted in fill-form layout indicate the following results: It is faster and easier to estimate the field length, find the cursor and read data in the fields when a broken line was used a field indicator. The cursor should be preferably blocked and blinking. Non-expert users prefer to complete the entry by pressing a terminator key (e.g , (Tab>) (Galitz,1972). Vertical cursor movements within a field group are preferred whenever possible. Provide default inputs or allow simple (single key) acceptance of defaults. Provide for data editing either between fields or between multiple forms. The layout of the screens should be symmetrical, include complete information for decision making, start at the upper left corner (to follow natural eye scanning movement), have consistent formats and be grouped logically. Prompts and error messages should be concise but informative and understandable to the user. Borders may be used for creating a sense of closure and focusing the attention on important data.

Careful use of colors could further enhance the layout. Studies in proper usage of colors for designing fill-in forms1 screens provide the following guidelines (Silverstein, 1987, Smith, 1987, ISO, 1988): 1. Display screens should be black or cyan in color. 2. The maximum of four colors per screen should be used to maintain efficient identification. 3. Color codes should be consistent with regard to the culture of the user population. 4. Be sure foreground colors contrast in both brightness and hue with background colors. (Refer Appendix B 1 and B2). 5. Choose a bright foreground color for text(e.g. white or bold green).

2.5 SUMMARY

The above literature shows that the present trend in simulation modeling is to develop an interface that would make a modeler's task much easier by eliminating the need for programming in a simulation language. The inherent task of model building could be simplified by using generic models to build specific models, rather than building them from scratch. Thus the user input would be limited to providing only the experimental parameters required for its execution. Further, with the appropriate use of ergonomic guidelines for software design the interactive interface could be made more "user-friendly". CHAPTER THIREE

SYSTEM REQUIREMENTS AND ASSUMPTIONS

The goal of this research is to develop the user-friendly interface and provide a simulation tool that would eliminate the programming requirement for the non-expert modeler in simulation. It aims at developing an interface that will automatically translate the experimental parameters defined for simple manufacturing systems into a simulation program in SIMAN. Output analysis or experimental design considerations for the simulated system are beyond the scope of this research.

The design requirements for the development of this software and the manufacturing system assumptions are classified as follows:

Simulation Model Assumptions Hardware and Software Requirements User Requirements Statistical Requirements Input Requirements Output Requirements Others

Each of the above categories are discussed in detail during the course of this chapter. 19 3.1 SIMULATION MODEL ASSUMPTIONS

The manufacturing systems being modeled are assumed to have the following characteristics: All parallel servers are to have identical characteristics (including processing times). Hence a single queue is defined for all parallel servers.

Inspector detection rate for scrap or rework can be defined. Inspection is defined as a separate station with its own waiting queue.

Rework and Scrap probability matrices are specified for each machining operation for every jobtype. The rework sequence is more or less fixed and cannot be randomly defined in terms of percentages after each inspection.

The rework time required may either be uniquely specified or defined to be the same as the normal machining time. Rework jobs wait in the same queue as normally processed jobs.

Work in process (WIP) queues are defined for only incoming jobs at each workstation and not for out going jobs.

Queue ranking rule chosen could be either FIFO (First In First Out) or LIFO (Last In First Out)

The model presently allows a maximum of: 10 jobtypes, 20 primary workstations, 20 secondary resources (i.e. operators 1 workers), 40 pdf s and 25 operations for each job.

Four station types are defined, namely loading, machining, inspection and unloading. Loading stations are assumed to use fixtures for loading with lotsizes specified for each job type.

The probability distribution functions are defined for the following: EXPONENTIAL, NORMAL, TRIANGULAR, LOGNORMAL, ERLANG, 20 UNIFORM, CONSTANT and POISSON(discrete). Empirical distributions are not defined or fitted using data points.

Only the machining station may be allotted secondary resources in the form of operators or workers.

Setup times may be defined only for machining stations. It could either be a constant, zero or any probability distribution function. Setup times for all other stations default to zero.

Process times can be defined for all workstations as either a constant, zero or a probability distribution function.

The interarrival times are defined as probability distribution functions for each jobtype. Only single entities are considered to be created by the infinite source (i.e. batchsize = 1).

The time taken for any job to be transported from one station to another is considered to be negligible.

Breakdown maintenance andlor repair characteristics is not be defined by the model characteristics.

The model has no provisions for defining transporters, AGVs or conveyors. It assumes manual transportation.

3.2 HARDWARE AND SOFTWARE REQUIREMENTS

The software is designed to operate on a system with the following general requirements: i) The software operates on any IBM PC compatible computers (viz., 286/386/486 systems). ii) The graphics adapter card for the color monitor must have a resolution capability of atleast 640 X 480, i.e. using an Enhanced Graphics 21 Adapter(EGA), Graphics Adapter(VGA) or a CGA (Color Graphics Adapter) card. iii) The hardware should be running the DOS and have at least 640 KB RAM.

The specific requirements for its operation are discussed with respect to both, the non-expert user and the developers standpoint.

3.2.1 Reauirements for a user:

For the user to load and execute the software the following hardware and software requirements have to be satisfied: i) The software requires approximately 4.5 MB of hard disk space for it to be loaded, i.e. approximately 4 MB for SIMAN software and 200 KB for the interactive software developed. ii) The SIMAN IV simulation language has to be installed, suitably configured and added to the DOS path in the system being used. iii) The SIMTRAN program developed (SIMTRAN.EXE file) along with additional files (viz., SIMTRAN.HLP, SIMTRAN.INI, SIMTRAN.NDX, GENERATE.BAT etc.)that are required for its execution. iv) The generic model frame in SIMAN (i.e.GENER1C.M) is essential for running the simulation as it constitutes one half of the SIMAN language worldview. It defines the static and dynamic characteristics of the process- oriented and non-terminating manufacturing system being modeled. 3.2.2 Reauirements for develo~ingthe ~ackafze;

The following are the specific requirements for developing it: i) The IBM PC compatible system should have at least 40 MB of hard disk space to load all the required softwares and additional room for swapping operations during compilation. ii) The SIMAN IV simulation language, properly configured, has to be installed and added to the DOS path. The software developed is interfaced to SIMAN for simulating the various manufacturing system models. iii) The Borland C++(ver 2.0) large model is used to develop the input interface and program translator in C and to later integrate it to the SIMAN language for overall completion of the software. iv) The Windows Boss (ver 7.01) is used for designing the user-friendly and interactive data entry forms 1 screens for obtaining the experimental parameters for the system defined.

V) The' large model Window Boss library is required for defining the large number of array and pointer variables. This is a software available through the network and PSL (Public Software Library). It is a powerful utility program for windowing text based graphics in C.

Other requirements include: a word processing software to create the users manual for the non-expert user. a Microsoft Mouse which can be used with most softwares a FORTRAN compiler, if the developer later chooses to add user subroutines to be linked in SIMAN (e.g. for queue priorities, event scheduling, analyzing output etc.). 23 3.3 USER REQUIREMENTS

The user is assumed to be familiar with the basic operations of a computer. In order to use the software the user must have:

a basic knowledge of the underlying concepts of simulation.

fundamental knowledge of probability and statistics in terms of independent outcomes, averages, variances, and various probability function characteristics for discrete and continuous variables.

a knowledge of data collection methods and experimental design techniques OR have access to historical data of system parameters.

The user should be able to provide information regarding the number of resources, type of resources, queue ranking for waiting parts, interarrival times for each jobtype, setup times for machining operations, processing times, and operation sequences with rework probabilities for each jobtype.

The user should be able to interpret the SIMAN summary output on his own and determine either graphically or empirically the transient bias for the non- terminating system under consideration.

The user should design his own pilot runs in terms of number of replications and duration of run, test the results for steady state and later specify the warm up time in the input. The program will automatically eliminate the initial transient data from the system output characteristics. (Hints provided in the user's guide, Appendix A).

The other requirements of the user are: 1. users do not need much softwarefhardware knowledge 2. users ( i.e: a modeler) need not have any programming skills , especially no programming in SIMAN. 3. they need not determine the time unit for simulation. 24 4. they don't have to worry about obtaining randomizing and/or obtaining independent samples during replication. 5. users need not reinitialize the system counters and statistics for each replication.

3.4 INPUT REQUIREMENTS

All input data are extensively checked for any form of errors and the user is prevented from entering incorrect values. Meaningful error messages and hints are provided for assisting the user through the creation of a new specific model.

The following experimental parameters must be provided by the user while creating a model:

1. Number of jobtypes produced, Number of independent workstations defined (e.g., drilling, milling, inspection, loading etc.).

2. Number of parallel servers at each of these stations, waiting rule for jobs in queue before each station, the maximum capacity of the queues at each station.

3. Definition of all the probability distributions used within the model for interarrival times, setup times, inspection times and process times.

4. Detailed definition of operation sequences (i.e. the route taken by each job through the system) that each jobtype has to undergo in order to be completed.

5. The detection probability, rework and scrap rates at each station after every inspection routine and the process times thereafter.

6. The setup times for each machining operation and process times for all other operations.

7. The simulation run parameters for length of replication, number of replications, beginning time for the first replication and the warm up time for eliminating initial transient data. In addition the following inputs are to be specified for meeting machining and loading stations respectively:

Number of secondary resources in the form of operators for machining stations alone.

Capacity of fixture resources and lotsizes for each jobtype defined by the model.

3.5 OUTPUT REQUIREMENTS

The system is designed to provide the following statistical output through the SIMAN output summary for any non-terminating simple manufacturing system being modeled :

1. The average cycletimes (i.e. the time taken for the entity to enter the system, complete processing and exit) for each jobtype produced.

2. The mean of the overall cycletime for all the jobs produced within the specified duration of simulation.

3. The total number of observations (or sample size) obtained for each jobtype during each simulation run.

4. The average utilization of all resources and queues defined along with its coefficient of variation, minimum and maximum values attained. Note: Coefficient of variation closer to one or greater than one indicates very low mean values and should be ignored during analysis.

5. Total number of jobs reworked, scrapped, faulty and balked for each jobtype is outputted as counter variables. 26 The user is also provided with the option of obtaining a hardcopy of the input at the end of the create and edit sessions. The printout of the input obtained is formatted to give only the salient features of the experimental frame defined.

The software automatically generates the experimental model in SIMAN with the data provided and stores is as an .EXP file. On completing the simulation run, SIMAN automatically generates the summary output and saves it as an .OUT file.

Note: Output analysis is beyond the scope of this research. The user can however use the output processor available in SIMAN for analyzing or formatting the data contained in the output file.

3.6 OTHER REQUIREMENTS

The SIMTRAN software requires the development of a model frame which is to be both, generic and modular. It should define the static and dynamic characteristics of the subset of simple manufacturing systems considered. This generic model frame has to be programmed in SIMAN, compiled and stored for user configuration.

The design of the model frame defines the input requirements for the experimental frame. This in turn determines the data type and the size of the array variables that have to be declared within the software. They are also utilized automatically by the software in designing the input screens. CHAPTER FOUR

DESIGN ALTERNATIVES

This section discusses the various design alternatives that were reviewed for the development of this research. The following categories were reviewed for the designing of the interactive interface for automatic model generation in SIMAN :

+ Operating Systems + User Level + Interface Dialog + Simulation Language + Programming Language

OPERATING SYSTEMS

The input interface by itself could be designed to operate on any one of the following: + Disk Operating System (DOS) + UMX Operating System + Mac Operating System The DOS system is used by IBM PCs and IBM compatible personal computers, the UNIX is widely used on workstations and the Apple Machintosh System.

Most simulation languages that are currently available, run only on personal and micro computers which use DOS and UNIX operating systems respectively. Also, since the aim of this research is to develop a user-friendly interface for an existing simulation language, the Mac Operating System is not a suitable choice.

Both DOS and UNIX have the advantage of being powerful in terms of speed of execution, availability, peripheral usage and high resolution graphics capability. The UNIX system also has the advantage of being timeshared by a large number of users over the network. 28 The DOS operating system was ultimately preferred over UNIX for the following reasons:

1. Personal computers are powerful, inexpensive, portable systems that are easily available and more popular among software users.

2. At the time of development, the author had access to only the student PC version of the simulation language and the availability of an IBM PC compatible computer.

3. The author also had better working knowledge and programming expertise with softwares available on personal computers.

4.2 USER LEVELS

In any interactive user interface, it is important to define the level of user during its designing process. The user level of interaction is either novice, intermediate or advanced. The level here is determined by the extent of knowledge the user has in simulation modeling. Ideally, the software should cater to each level of the user, implying the design of a complex and extensive software, which is beyond the scope of this research.

The system modeled cannot be over simplified and made less practical or the input interface made less flexible to suit a novice user. It is not intended to be a learning tool in simulation for a user at beginner level. The software is also not intended to model all possible manufacturing environments and have decision making capabilities, as would be expected by an advanced user. Also, since the resources available to develop are limited for handling and storing large data, it is infeasible to design a detailed and complete package.

Designing for an non-expert (intermediate) user, therefore, seems more appropriate in keeping with the design specifications for the prototype system. The interface is made fairly flexible and guides the user through the input process. 29 The user is : assumed to have conceptual knowledge of simulation. assisted wherever deemed necessary and programming is completely eliminated. assumed to be familiar with experimental design methods and output analysis techniques.

4.3 MTERFACE DIALOGS

In designing a user interface, the type of input dialog has to be carefully chosen since this is the part which interacts directly with the user. The following options were considered: + Graphical + Menu based + Form Fill dialog + Query based + Pull-Down Menu

The graphical dialog would involve the drawing of iconic or symbolic figures in the form of a network 1 flow diagram. The user would then have to specify parameters at each node. However, this option was easily refuted since it would imply building models from scratch, which would be contradictory to the basic objective of this research.

A menu based dialog provides a list of options from which the user selects the desired choice. The advantages are: they are self-explainatory, they require recognition memory rather than recall memory, they require fewer keystrokes for input, easy error checking is possible due to limited set of inputs, any enhancements made are visible. The disadvantages are: tedious and inefficient to navigate for a complex menu system, inflexible in that they force the user to follow a set sequence of steps, impractical for numerous input choices, take up screen space competing with other displays if any.

The main input dialog for the software was chosen to be menu based. It was suitable since the choice of inputs were limited and the program logic could be easily transferred to the appropriate module for execution. Also, error checking became easy since the user was forced to select only one of the given alternatives in order to proceed with the software.

The actual user inputs for the model parameters were designed using fill-in form dialogs due to the following advantages offered: they made efficient use of the space and could ask for several inputs within each fill-in form, they could accommodate parameters with all possible input values, the user had more context information since he could see all the inputs required by the form, enhancements were visible. The disadvantages however were: it assumed knowledge of valid input which necessitated extensive error checking, assumed user to have typing skill, was inflexible with respect to the order in which the data fields are filled.

However in this design the sequential input made it easier to update the dependent array variables. The user is not provided with too much information at one point in time, but sequentially guided through each input. They allow for context of inputs of to be perceived by the user at any point in time. Also, form fill-ins dialogs are recommended for users who have low motivation and are discretionary in their use (i.e. the casual user). 3 1 The query based dialog is a combination of the former two. This mode is used in the design for obtaining typical 'y' or 'n' inputs (e.g. save a file? ). It accommodates complete and clear prompting, accommodates tasks with hierarchical structure. However, the user is not provided with context information regarding the sequence of inputs. The design does not use any form of query based dialog.

Pull down menu was found unsuitable for the present design, since extensive data entry is necessary. Providing all possible input options using pull- down menus would only confuse a non-expert user in terms of where to begin and which order to follow. Also, dependency checks will become difficult to incorporate, making the software less robust.

4.4 SIMULATION LANGUAGES The feasibility of developing the user interface for automatic program generation are reviewed with respect to: a. designing an interface for an existing simulation language. b. building specific models by configuring generic models instead of building it from scratch.

The simulation languages GPSS, SIMSCRIPT and SIMAN IV are reviewed. All of them are special purpose languages and provide a natural framework for simulation modeling (i.e. have features for generating random numbers, advancing simulated time, defining event or process lists etc.).

4.4.1 GPSS

The General Purpose Simulation Language (GPSS) is a process-oriented simulation language which is better suited for queuing systems. The entities (i.e. transactions), servers (i.e. facilities) and their attributes (i.e. parameters) are all defined within the model program. It is better suited for building models from scratch rather than from existing generic models. It has no mechanism for automatic randomization of seed values for multiple runs. It directly supports only the UNIFORM probability function. However, other functions may be modeled using the appropriate probability function equations. Also, there is no single 32 command for multiple replications and no confidence interval procedures for analyzing the output. Further, it does not have any special modules for modeling manufacturing systems, (viz., material handling, workstations and transporters).

Simscript supports both event-oriented and process-oriented approaches. It is the only language which is a general programming language with built-in constructs for simulation modeling. It is used for simulating complex models, especially when the system is not queueing-oriented. Every program consists of three primary elements: preamble - provides static description of each modeling element; contains no executable statements. main program - passive elements are created and initialized (e.g. resources); where execution begins. process routine - contains logical description of each process declared in the preamble. As a result, the program code is nearly thrice that of SIMAN and takes relatively longer time to simulate (Chikala, 1989).

It is not possible to define a generic structure for any of the primary elements, but instead each model would have to be built from scratch. Hence, it is not a feasible choice. Other disadvantages are: the timing routine and time unit have to be specified, the basic statistics in the output report and have to be described in a process routine. it has no special constructs for manufacturing processes. . no single command for automatic multiple replications; it is provided as optional software. it cannot be linked with subroutines in other higher level languages (viz., C, FORTRAN). The simulation language chosen is SIMAN IV of Systems Modeling Corporation. It is one of the most powerful general purpose languages currently available with simplified but enhanced capabilities (viz., workstations, modeling material handling components) in a manufacturing environment. It can be linked to higher level languages like FORTRAN and C making it more flexible to model system features from outside the simulation language.

It supports both event and process oriented approach. It provides several probability distribution functions, a single command for automatic multiple replications. The time unit and timing schhedule for arrival of entities for processing are automatically computed. The user can specify a warm-up period (at the end of which statistical counters are reset to zero) to omit the biased observations during transient phase and re-run the replication. It also allows the construct of confidence intervals for desired measures of performance.

One of its unique feature that is being effectively used by this research is the separation of three distinct phases of simulation analysis: model definition (model frame), model experimentation (experiment frame), and output analysis. Several alternative systems can thus be evaluated for one definition of a generic model frame by just specifying a new set of parameters in the experimental frame. Hence, the user can build specific models by merely re-configuring the generic model stored and thereby, avoid generating the model from scratch.

Table 4.1 gives a comparison of the simulation languages based on nine quantitative features (courtesy: Law,Kelton,l991).

4.5 PROGRAMMING LANGUAGES

Based upon the goals and design criteria discussed earlier, the selection of the programming language for writing the software was an important issue. The following computer programming languages were considered for development of this package : + Assembly Language + FORTRAN + LEVEL 5 OBJECT c

The requirement that the programs be structured and modular for future modifications rendered assembly language as an inappropriate.

Although, user-written codes in FORTRAN can be interfaced with SIMAN, it was found unsuitable for current development. FORTRAN is not classified as a structured language and is better utilized for mathematical computations. It is very difficult to exercise complete control over hardware and peripherals. Also graphics development is extremely difficult in FORTRAN and the program codes will be extremely huge.

Initially, LEVEL 5 OBJECT, which is an object-oriented programming language, seemed a feasible choice for developing a highly graphical and interactive user interface. Although, the graphics were easily developed, the software lacked the inherent capability of performing data checks, dependency checks and string handling. It generated an excessive volume of program code. It also imposes constraints on the hardware and software requirements for the system, namely, - IBM 3861486 Compatible PC - 4 MB RAM for its loading and operation - environment to run Hence it was not considered an acceptable choice. 36 Finally, C language proved to be more advantageous over other languages. It was unique among programming languages in that it provided the convenience of higher level language and the close control of an assembly language. It was structured, had a faster speed of execution and better overall control over hardware and peripherals. It is readily available and the programs written are portable to any platform. Also, complete graphics development is possible in C. User subroutines and codes can be interfaced with SIMAN when required. In addition, several utility programs and graphics application libraries written in C were readily available.

One such application software called WINDOW BOSS and Data Clerk (version 7.01) was used in the design of pop-up windows, fill-in forms for data entry and menu-based inputs. The software was acquired through the Shareware Network. It is a powerful and cost effective application program written in C and efficiently performs text handling in windows. It allows the specification of upper and lower limits for each input, the checking for errors, displaying simple error messages, and the definition of function keys (e.g. F1 for help, F2 to exit etc.). It made the user interface very modular and user-friendly.

However, large data handling and storage of variables in the form of pointer variables, character and numeric arrays, necessitated the purchase of a large model library for compilation. CHAPTER J?WE

SYSTEM APPROACH

Stochastic approaches to discrete event simulation that are widely used can be classified as using either general purpose simulation languages or special purpose simulation systems. The disadvantages of these standard methods include: complex, time consuming and demanding task. expertise in various fields required viz: programming, modeling, probability, statistics and heuristics methods. lack of reusability, i.e. individual models had to be created from scratch for each user-specific application. lack of user-friendliness, user-interaction and modifying capabilities.

5.1 RESEARCH GOAL The goal of this research was to design an interactive tool that would enhance simulation modeling of simple manufacturing systems by eliminating the programming requirements for a non-expert user.

5.2 APPROACH OUTLINE The following is an outline of the approach used to achieve this goal : Establish the environment for model generation Conceptualize the overall system for model generation Derive suitable subset for simple manufacturing systems Implement the system through software design Each of these steps are discussed below.

5.2.1 Environment for Simulation model generation

The simulation environment for model generation has two main features. 1) The interactive tool developed was integrated to an existing simulation language, thereby capturing the knowledge of an expert and the built-in features of the simulation language. 2) The simulation models were built using existing generic models rather than building them from scratch. This made modeling more economic and model 3 8 building easier for a casual user who does not have sufficient background to develop models from scratch.

The design also eliminates any form of user programming and exhibits user- friendliness towards the user.

5.2.2 Conce~tualizedsvstem for model generation

The general block diagram of the conceptualized simulation system environment for interactive model generation is shown below in figure 5.1. The system consists of a preprocessor, postprocessor, generic model base, user dialog interface, simulation language and the output database. The following is a brief description of each of these blocks:

User dial- - this is the block that actually interacts with the non-expert user. It allows the user to create new models, edit old models, generate the specific model or run the simulation for model generated.

Pre~rocessor- this consists of experimental database, and the specific model generator. The experimental parameters entered by the user are stored in the experiment database. The data is later used to generate the user-specified simulation model in the simulation language chosen.

Post~rocessor- this consists of the model executor which integrates and links the specific model generated to the simulation language for running the model.

Generic Model Base - this consists of program models that define the static and dynamic characteristics for the small subset of manufacturing systems being modeled. Only one model has been developed to implement this research.

Out~utdatabase - this consists of all the statistical outputs automatically generated due to the observed and time based variables during execution of simulation. These may be accessed later by the user for further analysis or formatted. Based on the results the user could modify the run parameters and rerun the simulation. Non-Expert User

- - 1------r------1 I I I I I I ( I Experiment I Database IC _Z I I Repma~w L ------&Generic Model

Figure 5.1 Block Diagram of the conceptualized system. 40 5.2.3 Derivinp a sim~lemanufacturin~ subset

Defining the requirements for a manufacturing subset helps in determining the static and dynamic characteristics for that system. These characteristics are in turn translated into a generic model program in the simulation language chosen, namely SIMAN IV.

Several generic models for manufacturing operations were generated as part of the doctoral dissertation by Dr. Ozdemirel (1990) while implementing the GUIDES software for an intelligent simulation system using Turbo Prolog. Group Technology was used to classify the models according to the processes involved. In order to determine the typical blocks needed for building a manufacturing model, the menu based input of the GUIDES software was broken down in the form of a tree structure and further simplified into the form shown in Figure 5.2.

This hierarchical tree structure was used to define the required manufacturing subset. A modular generic model was then developed for that subset. The various experimental parameters needed, determined the configuration requirements for building a specific model.

A manufacturing subset thus defined is assumed to have the following features: b Models discrete-event simulations of process-oriented type for non-. terminating systems. b Workstations may be configured to have primary and secondary resources. @ Manual material handling is assumed and hence no provision is made for special material handling equipments (viz., transporters, conveyors). • Provisions for interbreakdown time or maintenance operations are not included. Fixtures are the only special resource considered. Model does not provide the use of pallets. b The jobs defined are assumed to arrive as single entities following an interarrival time.

42 The detection rate at any inspection station may be defined. The inspection sequence could be either inherent after each operation or defined after a sequence of operations. Both setup times and process times may be defined for machining operations alone. Other station have only process times. The p.d.f s considered are limited and does not include empirical distributions. The time taken for traveling from one station to another is considered to be negligible.

5.2.4 Im~lementingthe Svstem

The SIMTRAN software implemented interfaces with SIMAN which is an existing higher level simulation language. The static and dynamic characteristics of the system (i.e. the manufacturing subset) is defined by the generic model developed in SIMAN. The model frame has been designed in a highly modular fashion. It consists of the :

creation module which defines the arrival of entities for each jobtype specified in the experimental frame. workstation module which is further divided into loading, machining, inspection and unloading. The routing sequence defined for each jobtype transfers the entity to the appropriate station module. the rework module for jobs undergoing inspection the statistical module for updating the counters and time dependent variables before exiting the system. All of the variables used in the model frame are defined in using its experimental parameters. (Refer Appendix E for the program listing and the specific flowchart of the generic model frame developed in SIMAN IV).

Only the experimental parameters required for the execution of the model, are specified by the user through an interactive user dialog. The interactive tool is further designed to automatically generate the experimental model frame using SIMAN language syntax, and to integrate with the simulation software for linking and running the simulation. The output obtained is the standard summary report generated by SIMAN for each replication. 5.3 SYSTEM CONFIGURATION APPROACH

The generic model is designed such that it configures serial, and parallel systems having both single and multiple servers or combinations of both. The system currently allows the user to define up to 10 job typesand 20 independent workstations.

5.3.1 Station Confiwatio~

Figures 5.3 - 5.6 represent some of station configurations modeled by the program. Groups of different servers or stations in series are referred to as "independent" servers and groups of identical stations are referred to as "parallel" servers. Work in Process Storage can be specified for each independent station or for a group of parallel servers. In addition, secondary servers or operators may be defined (optiona1)for machining stations. Infinite source WIP

I \ s 1 / exit I I I In teranival FIFO /LIFO I I time (p.d.0 Capacity: FiniteAnfinite operator I I LI

Setup time = 0.0 or p.d.f Process time = p.d.f

Figure 5.3. Single server, single queue

Independent vers

lntinite 7' Wid2)

IAT

No.of independent stations = n Figure 5.4. Multiple servers ,single queue per server Infinite Single station with parallel servers Source Wip . \ sl sl sl sk y (ooo...0) I ..... FIFO No. of independent workstations = 1 Parallel capacity of server = k

Figure 55. Single station with parallel servers, single queue

Multiple stations with parallel servers

Source \ IAT pdf \c&9-ml

No. of independent workstations = n Parallel capacity of servers: s 1= 3 s2= 2 sn= 4 Figure 5.6. Multiple stations with parallel servers, single queue 46 5.3.2 O~erationSequence Configuration

The operation sequence or routing sequence of processing each job type has to be clearly specified to insure the simulation of the desired model. The routing sequence is specified as the ordered set of station numbers which the job takes as it flows through the system.

If the system has no inspection station defined, then the sequence is directly the set of station numbers. Subsequently the rework and scrap probabilities are set to zero. Figure 5.7 is representative of such a system.

Machine Machine Machine enter \ I \ . . r exit I S 1 S2 S3 I

Rework Steps at each station = 0 Probability of Scrap and Rework for: sl4.0

Operation Sequence is: 1,2,3 Sequence Length = 3

Figure 5.7 Operation sequence for system with no inspection

If an inspection process is to be specified, it could be done:

a) either inherently within a workstation or b) separately by defining an inspection station.

In either case the operation sequences have to be defined rather carefully. In either cases the probability for detection of faults can be specified. Inspection Inspec tion Inspection ;?:! g ;?:! Machine ;Tn;y ; fMyF exit

Rework Step =1 Prob. of rework : O<=xc=l Prob. of scrap : O<=xc=l

Operation Sequence is: 1,2,1, 3,4,3, 5,6,5 Sequence Length = 9 No. of independent stations = 6 (3: machining, 3: inspection) Note: Rework operations are specified immediately after inspection.

Figure 5.8 Operation sequence for inherent inspection

In the former case it is assumed that the job goes back to into the queue at the same station. Hence, rework step will be unity (i.e. 1). Rework and scrap probabilities may be defined. However, the program logic requires the definition of an inspection station with the rework sequence being the current station itself. Such a system is more clearly represented using figure 5.8.

In the latter case, an independent inspection station is defined, which could have rework steps greater than unity. Again, the rework routing sequence is provided right after the inspection station. The rework routing sequence may follow a random pattern of stations for each job type. Figure 5.9 represents one such simple example. Machine Machine Machine Inspection Machine enter ' \ \ \ \ I I =' S1 S2 I S3 I S4 S5 exit Rework / I Rework Step at station S4 = S2 & S3 = 2 Rework steps at other station = 0 Prob. of scrap at S4 : O<=x<=l Prob. of rework at S4 :O<=xc=l

Operation Sequence is: 1,2,3,4,2,3,5 Sequence Length = 7 Note: Rework operations are specifred immediately after inspection. No. of independent workstations = 5 (4: machining, 1 inspection)

Figure 5.9 Operation sequence for independent inspection station

Configuring the operation sequences is probably the only input that is unique and requires additional help in understanding the design of the model base. All the other inputs are very direct and easy to comprehend.

The output processing of the results is beyond the scope of this research. However since, the system modeled is non-terminating, the user is provided with the option of entering the transient time (or warm-up time) so that the initial biased values will be omitted in the output. The detailed software design is discussed in the next chapter. CHAPTER SIX

SOFTWARE DESIGN

The goal of this effort is to provide the non-expert simulation modeler with an interactive tool to model simple manufacturing processes. The program will provide a user-friendly environment, in which helshe can configure a generic model by defining various experimental parameters and have it translated into the SIMAN language automatically without having to program.

6.1 SOFTWARE DESIGN CRITERIA

The design criteria for the software package are as follows: a) The computer software is to be modular and structured to facilitate future enhancements and modifications. b) The computer software is to be robust so that incorrect user inputs are trapped and the user is instructed to correct the input through meaningful error messages. c) On-line help information is to be included as part of the software program. d) The manufacturing system modeled is to allow a maximum of 10 job types (with interarrival distributions), 20 workstations, 20 parallel servers, 10 operators, and 25 operations for processing each job type. This is because the student version of SIMAN is being currently used. Excessive definitions of stations or jobs may cause possible simulation errors. e) The software package is to obtain data through fill-in forms which is to be the user dialog interface. f) The software provides the user with the ability to define new parameters OR edit old parameters, to create a specific model. g) The software is to generate the experimental model frame in SIMAN either when the user creates a new model or edits an old one. This is to insure that the user does not attempt to generate the SIMAN program by using incomplete data. This is a prevention step to avoid future errors in its compilation and execution. 50 h) The software is to give the user enough flexibility to edit every input, skip forward in the display hierarchy when required, and exit from input mode to main menu when desired. Hence the user has fair control over the execution of the software. i) The software is to be developed for an IBM PC compatible computer with EGANGAICGA color monitor (25 rows X 80 columns) and having 640 KB of random access memory (RAM).

6.2 SOFTWARE ORGANIZATION

The interactive software package can be partitioned into four basic functional modules. The functional modules are : 1) Create OR define new model. 2) Edit OR modify old model. 3) Generate the experimental model in SIMAN. 4) Simulate the model using SIMAN.

Each of the modules are summarized below. The structure charts for the software is shown in Figure 6.1. The general flow chart for the software is shown in Figure 6.2. More detailed information about the modules and software operation is provided in the SIMTRAN User's Guide (Appendix A). The complete source code is provided in Appendix E. run generate.bat display logo I run simtran.exe initialize I set flags I main( ) -main menu I I I I I create edit generate simulate exit .EXP

edit -readdfile() create - screens( ) I 1 screens( ) 1 -write-file( ) set flags 1 write-fde( ) -set flags main menu main menu

fig (b) fig (4

Figure 6.1 (a) (b) (c) Structure charts for SIMTRAN continued... generate .EXP siman-file( ) t--main menu fig (a) simulate read-file( ) I exit to generatebat I

compile I link generic.m I execute siman.exe I save summary o/p I back to main menu I

fig (4

Figure 6.1 (d) (e) Structure charts for SIMTRAN

(concluded) A Start

v User input

Update Ex rimental ~atacse

v Generate S ific model K SIMAN

Link to Generic Model in SIMAN

v Run Simulation in SIMAN 1 SIM%!knary Report

w STOP

Fig 6.2 General Flow chart for program 6.2.1 Create module

This module is an input mode and allows the user: a) to configure the basic manufacturing system (i.e. specify number of workstations, type of workstations, number of parallel servers, number of jobs to be produced, and queuing rule for waiting jobs). b) to define other related parameters (viz., operation sequences for each job, arrival times for job entities, setup and process times, detection probability,rework rates). c) to define the simulation run parameters of his choice (i.e. time of creation for first entity, duration of run, number of replications, warm-up time to overcome initial bias).

The user dialog used during the input mode consists of fill-in forms. Each form is displayed as a pop-up window, with the input fields highlighted. A blinking cursor indicates the field in which data is to be input. Each fill-in form also displays context information using titles and text windows about input options allowed.

Each data entry is completed by pressing the key. While in the create module the fields display either the default values or the maximum value allowed for that variable. The user can overwrite it with new data. All succeeding forms that are dependent on the this value are automatically updated to display in real time.

After the completion of each fill-in form, the user is given the option to go back and edit or modify any input field. The raw data is saved in the experimental database under a user specified filename before returning to the main menu. 6.2.2 Edit module

This module too is an input mode and allows the user: a) to edit any old model which may be recalled by its filename. b) to adddeletelmodify the previously inputted data and re-configure the manufacturing model defined by specifying new experimental parameters.

During the edit sessions the previous data is displayed within the form fields. The user can modify any input field he chooses. Again, all dependent values are updated real time (i.e. update dependency check). (e.g. if number of jobs is modified from five to three, the display for sequence length of each job would show only three input fields ).

The user has all the features of the create module and also the additional option to skip any input form he does not wish to modify and to move onto the next input display. In order to do so the user may press the key at any point in the edit session. The software, automatically saves the skipped data. The raw data is again saved at the end of the input session.

Note: During input sessions, additional function keys are provided. These are: The key , which displays the help screen for that particular fill-in form and the input therein. The key, which allows the user to completely exit the input session and returns control back to the main menu.

6.2.3 Generate module

This module is executed only after the user has either completely created a new model or edited an old model, without aborting from the input session. This restriction is imposed on the user, so as to avoid the generation of incomplete and incorrect models in SIMAN. Hence any form of compilation or linking error due to incorrect data is prevented.

This module operates as a background process and there is no user interaction. The file created or edited is translated into the experimental model 56 frame in SIMAN language. It is then automatically stored in SIMAN format as an .EXP file.

6.2.4 Simulate module

This again is a background process which requires hardly any user interaction. The module exits temporarily to the child process (i. e the DOS system) and accesses the SIMAN processors for: compiling the experimental frame linking it to the generic model in SIMAN (. file). running the simulation in SIMAN for the number of replications specified and for the duration specified. At the end of the simulation run, the SIMAN processor automatically outputs the summary report giving the statistical output for the system modeled. This is saved as the .OUT file. The control then returns to the parent processor (i.e. the main menu of the software). The user may either run more simulations or exit from the main menu by choosing the EXIT option. 7INITIALIZE VARIABLES * 1 1 Edit Create Generate Option Option Option

Displa default or olivalues

CREATE FLAG=TRUE

Fig 6.3 Specific Flow Chart for developed software continued... INPUT FILENAME CREATE FLAG TRUE? w

r Invoke EXMPT I for SIMAN

-(~f-lWarning

Experimental Frame

c error 1 Invoke SIMAN ~a%%ile 1 RUN SIMULATION in - SIMAN -C--- error * RETURN TO MAIN MENU

Fig 6.3 Specific Flow Chart for developed software (Concluded) 59 The specific flow chart of the functional modules is given in Figure 6.3. The software does not perform any analysis of the output or process it any way. Only the standard SIMAN summary output is automatically generated. However, the user is provided with useful hints regarding output processing options in SIMAN in the User's Manual that may be availed, for acquiring steady state results.

6.3 SOFTWARE ERGONOMICS USED IN DESIGN

The user interface developed is C language based. It also avails the WINDOWS BOSS software, for designing the pop-up windows and defining the fill-in forms for data input.

6.3.1 Jn~ut Error Handling:

All data entered during the create or edit sessions are extensively checked for errors in: 1. data type (viz., integer, float, character, string etc.) 2. exceeding upper and lower limits for the designed system in terms of model capacity 3. data entered using options provided in some input screens 4. probability values entered for rework operations

In addition, data dependency checks are performed to insure that the values obtained are for the appropriate general configuration of the model in terms of number of resources, resource types and job types. e.g. if eight stations are defined, the program makes sure thut later on while specifying operation sequences, the stations defined are within the eight chosen.

Appropriate error messages and warning messages are displayed, thereby occluding the user from entering incorrect values. Text windows are provided whenever required, briefly informing the user about the input or giving useful hints and warnings. 60 NOTE: The program does not account for logical errors committed by the user. It also, does not check the accuracy and range of the parametric values entered for the various probability distribution functions for arrival, setup and processing times. The user is assumed to have sufficient knowledge in probability, statistics and experimentit1 design. However, information on the parameter set for each p.d.f is provided as on-line help.

6.3.2 Simulation Error handling;

The errors occurring during execution of simulation run are generated by the SIMAN simulation processors and are not controlled by this software. Some of the most common errors encountered could be due to: 1) incorrect parameters specified for the probability functions. 2) incorrect sequence of operations (e.g., inputting a zero for station numbers). 3) inappropriate arrival times with respect to job completion times, resulting in a pile up of excessive number of jobs being present within the system being simulated. 4) insufficient allocation of waiting queue capacity, thereby increasing the cycle time of jobs and causing a pile-up or causing jobs to be disposed. 5) insufficient allocation of parallel servers for the resources defined.

In general, these are more related to errors in experimental design, errors in data collection or logical errors in defining the system to be modeled. They are therefore not related to the software directly, since the program assumes the non- expert user to have access to sound data and only helps in eliminating the requirement of programming in a simulation language.

6.3.3 Use of Color Codes in In~utScreens:

The colors used in defining the input screens are chosen in keeping with the IS0 recommendations towards foreground and background combinations and high and low contrast colors. Not more than 4 four colors are used in any window. The following color code is used by the software: 61 The text boxes giving the various input options (when required) are displayed in black background with yellow letters. Most of the input values being numeric help reduce variability and thus the error caused in string handling.

The text windows and pop-up windows that provide useful hints are displayed in black background with green letters. To obtain more detailed hints the user can press the ESC key.

Text windows that provide information from previous inputs are displayed at the top in black background with cyan letters. Sometimes this information is provided within the input form in white letters (e.g., Input form for Operation Sequences for each jobtype).

Pop-up windows that display warning messages of any kind are in red letters on a black background. (e.g., specifying incorrect filenames ).

The windows displaying the help pages are made more noticeable by using cyan background and having yellow letters.

The displays concerning station configurations have blue background with magenta border and having yellow letters.

The displays concerning job configurations have blue background with green border and yellow letters.

The displays attributed by both job and station configurations have blue background with cyan border and yellow letters.

The main menu is designed to be different too. It is the only white screen with black letters on it and having a magenta border.

The software is therefore found to implement several of the ergonomic guidelines provided for software development, thus making it a truly user-friendly interface far a non-expert in simulation modeling. 6.4 SAMPLE PROBLEM

Consider the following manufacturing system to be modeled. The layout of the manufacturing facility is as shown below in figure 6.4.

infinite source 2 iob arrivals

inspection job2 Station Sequence: ml ,m2,m4 EXPO(60.0) Station Sequence: m3,m2,m4 Rework sequence: m 1 ,m2 Rework sequence: m3,m2

machining (two parallel)

machining (3 parallel)

Figure 6.4. Workstation Layout for sample problem The process timings at each station are as follows: Station Setup Ties Process times M1 NORM(10.1,3.2) 23 .O M2 (for jobl) NORM(8.6,2.5) 18.0 M2 (for job2) NORM(12.7,2.2) 20.0 M3 NORM(5.3,1.4) 11.0 M4 zero TRIA(2.5,4.0,5.5)

The above example has been stored as sample2 in the software diskette provided for SIMTRAN. The user could get familiar with the design of the user dialog and input requirements by browsing the sample problem in edit mode. Yet another example consisting of a single job, multiple server system, has been input and stored as sample2 on the diskette. In addition, a user's guide is provided for the user, giving instructions for installing and executing the software.

The SIMTRAN software was further verified and validated using various simple manufacturing problems for correct output. This is discussed in the following chapter. CHAPTER SEVEN

TESTING AND EVALUATION

7.1 VERIFICATION OF THE SOFTWARE

This is to ensure that the software program performs as expected and intended, thus providing a correct logical representation of the system being simulated. Verification is also intended to: debug and model development errors examine whether the code reflects the description given in conceptual model. insure all parts of the model work, both independently and together using the right data. Hence in order to verify, extensive testing has to be performed during each stage of the design.

7.1.1 Verification of the generic model base

A single generic model frame was the first to be developed in SIMAN. It provides for the logic for simulating the processes in a manufacturing system. It was tested by configuring it for several known experimental frames. The model was then linked and executed in SIMAN using the TRACE command to assist in debugging any errors. The logic and timing was carefully traced and verified for: proper creation of new entities for the simulation period specified. routing of jobs through the system and its subsequent exit on completion for all combinations of operation sequences. the resetting and updating of appropriate statistical variables and counters.

7.1.2 Verification of the translator module

The translator program for generating the experimental frame in SIMAN was developed using C language. It was tested extensively using typical data files that would be generated through user input. The experimental frames were further tested for: syntax errors during translation and compilation. errors in linking to the generic model previously tested.

7.1.3 Verification of the user interface

The interactive user interface for defining experimental parameters for typical manufacturing systems was checked at each stage to insure the proper formatting of the data file. This would in turn insure the correct interpretation of the data by the translator module.

7.1.4 Verification of the inte~rated~ackage

The package was again tested on completion of its final integration. It was verified for: proper transfer of program control for each option in the main menu. proper execution of the function keys provided during the input mode the user-friendliness of the help screen and error messages provided. proper functioning of data checks and update dependencies designed into the program for the input fields and displays respectively.

7.1.5 Verification of simulation results

The results obtained from the simulation output were tested to ensure accuracy, correctness and agreement between specific models in SIMAN and those generated using the SIMTRAN package.

A simple manufacturing system consisting of a single server and single queue and producing a single job was modeled using both methods. The simulation was run 10 times. (Refer Appendix D for program listing). The graphical description of the system being modeled is given below in Figure 7.1. The ten replication outputs obtained in either cases was analyzed for equivalence using student t-tests at 90% confidence intervals. 66 The results were also compared against outputs obtained for the same example using GPSSM, SIMSCRIPT 11.5 and SLAM II for a single simulation run (Refer Appendix D).

Infinite Source Machinelserver FIFO

S 1 exit

Interarrival WIP infinite Time IOperatorI EXPO(1 .O)

Setup time =0.0 Process time= EXPO(0.5)

Run Parameters: Length of run = 980 hours Number of runs = 10

Figure 7.1 Single server, single queue system. 7.2 VALIDATION OF THE SOFTWARE

This is done to establish that the software fulfills its objectives with respect to the real world system, through people not involved in its development.

The package was tested for "ease of use", "user-friendliness", and time taken to learn its operations using 5 non-expert subjects. Each student was given a user's guide, a SIMTRAN diskette, an instruction sheet and two sample problems to solve. They were required to read the user's guide, install the software and configure the two examples all by themselves using SIMTRAN. All the subjects were able to perform the tasks specified without any difficulty. Determining the steady state output condition was left to the user to judge from the output results obtained. (Refer Appendix C for subject data sheets).

The software was further tested to work on various IBM Compatible computers and using various graphics selection.

Although, verification and validation are on-going processes that spread over a long period of time, for practical purposes the SIMTRAN software has been tested to give accurate results in simulating specific manufacturing models from a single generic model base. CHAPTER EIGHT

RESULTS AND DISCUSSION

This chapter contains the analyses of the tests conducted during the verification and validation stages. The results are discussed at the end of each section.

8.1 EQ WALENCE OF RESULTS

The sample problem defined earlier was solved using two techniques:

1) building model program from scratch using SIMAN. 2) using SIMTRAN to configure an existing model frame and simulating in SIMAN.

The quantitative results obtained from both were compared using t-tests for accuracy and agreement. The results were analyzed at 90% confidence interval with 18 degrees of freedom (i.e. nl+n2-2= 10+10-2=18). The test results are shown in Tables 8.1 - 8.4.

The results for the above example with respect to average utilization time the queue and server using GPSSM, SIMSCRIPT 11.5, SLAM 11 are listed in Table 8.5. These results were obtained from a single simulation run for the above problem from the book, Simulation Modeling and Analysis by Law and Kelton(l991). 8.1.1 Results for single aueue sin~leserver ~roblem

Table 8.1. Hypothesis Test for Parts Produced

Length of time simulated: 980 minutes Number of Simulation runs: 10

Results of t-Test: X1 = 984.6 X2 = 979.3

Since, @ < t.025,18, the hypothesis that the two methods have the same mean number of parts produced cannot be rejected. Table 8.2. Hypothesis Test for Time Spent in System

Length of time simulated: 980 minutes Number of Simulation runs: 10

Results of t-Test:

Since, to c t.025,18, the hypothesis that the two methods have the same average for the time spent in the system cannot be rejected. Table 8.3. Hypothesis Test for Utilization of Server

Length of time simulated: 980 minutes Number of Simulation runs: 10

Results of t-Test: XI= ,4985 X2 = SO23

Since, to < t.025,18, the hypothesis that the two methods have the same average for the utilization of the server and cannot be rejected. Table 8.4. Hypothesis Test for Utilization of Queue

Length of time simulated: 980 minutes Number of Simulation runs: 10

Results of t-Test: X1 = .494 X2 = SO89

Since, to < t.025,18, the hypothesis that the two methods have the same average for the utilization of the queue cannot be rejected. Table 8.5.

Comparison of the SIMTRAN output for the single server problem with output from other simulation languages

Simulation Average Average Languages Utilization of Utilization of machine Queue GPSS/H .523 .614 SIMSCRIFT 11.5 .50 .430 SLAM I1 .55 - SIMAN IV .507 .5 187 SIMTRAN .502 .546

Mean Value .5164 .5272

(Courtesy: Simulation modeling and Analysis, Law and Kelton, 1991.)

Hence all the outputs obtained using the SIMTRAN model are accurate at 90% confidence interval and are accepted to be true. 8.2 ANALYSIS OF SUBJECT TEST RESULTS

The subjects used for validating the software were: all non-expert users (i.e. they had conceptual idea of manufacturing simulation). having working knowledge of and IBM PC Computer. All of them were familiar with either GPSS/PC, SIMAN or SIMFACTORY. Each user was timed in performing the following six distinct tasks:

1. reading the user's guide 2. installing the software 3. becoming familiar with the software 4. inputting data for each example problem 5. generating and simulating models 6. determining steady state outputs (Refer Appendix C&F for subject data sheets, instruction sheet, example problems and raw data sheets).

The time taken for each task by each subject is summarized in Table 8.6. Figure 8.1 is plot indicating the overall time taken by each subject. Table 8.6. Summary of Results Time taken (in minutes) for each task by each subject

Task Description Sub 1 Sub 2 Sub 3 Sub 4 Sub 5 Avg. Time

Reading the user's guide 7 10 10 3 4 6.8

Installing the software 3 4 2 2 2.5 2.7

Getting familiarized with sc 6 7 11 10 15 9.8

Data Input - Problem 1 10 18 15 10 6 11.8 Data Input - Problem 2 7 10 11 7.5 4 7.9

Simulating Problem 1 3 4 3 2.5 1.5 2.8 Simulating Problem 2 10 8 10 8 8.5 8.9

Determine Steady State Probl 1 3 2 2 1.5 1.9 Determine Steady State Probl 2 1 1 2 1 1.4

Total time 49 65 65 47 44 54 Determine Steady State Problem 2

flm Determine Steady State Problem 1

sirmlat- Problem 2

sirmlating prob1a-n 1

El Data ~nplt- ~roblfm2

H mta ~nplt- m~oblem1

ES ~ettiqfaniliarizd with software

O~nstalling~softtzare Sub Sub Sub Sub Sub 1 2 3 4 5 Readirgtheuser's Subject Number guide

Figure 8.1 : Bar Chart Indicating the overall time taken for a subject for each task Task Description

Figure 8.2 : Bar Chart Indicating the Average Time Taken for Each Task by all Subjects Completeness

Number of Subjects Interactive

Ease of generation & execution

, J Poor Fair Good Es@ellent Evaluation ratings

Figure 8.3 : Bar Chart Indicating the Subject ratings for the Software The results clearly indicate that: the average overall time taken to learn, configure and simulate a simple manufacturing system is less than an hour. In comparison programming from scratch using SIMAN could take several hours or even several days. the software is user-friendly and can be learnt in a few minutes and requires no programming knowledge. it has excellent interactive capabilities, robust error checking routines, thus making simulation modeling an easier task.

In addition, it was seen that the software can be easily run on a wide range of IBM PC compatibles having 640 KB RAM with a color monitor. The graphics specified should be of a standard 22 rows X 80 column format. Defining more than 80 columns will distort the input windows and the fields therein. CHAPTER NINE

CONCLUSIONS AND RECOMMENDATIONS

As stated in the earlier chapter the purpose of this research was to develop an interactive tool for automatic program generation by interfacing it to an existing simulation language. In order to achieve this purpose, the SIMTRAN software was developed using C language serving as a front-end to the SIMAN simulation language. The software builds simulation models for manufacturing systems from existing generic model frames.

The following conclusions were drawn: 1. The software completely eliminates any form of programming requirement by the modeler. 2. Building from exisiting generic models greatly reduces the time taken in defining and executing simulation models for manufactuirng environments. 3. The SIMAN simulation language's world view is conducive for configuring existing generic models. 4. Only simple non-terminating manufacturing systems may be easily configured and modeled using SIMTRAN. 5. It is suitable for defining upto 20 workstations/machines and to produce upto 10 jobs. 6. The only discrete probability distribution considered by the model is POISSON. No empirical distributions are fit by the model. 7. The model does not presently simulate breakdown conditions or transporter routings. 8. The format of the summary obtained is fixed in SIMAN. 9. The software is truly user-friendly and assists the user through each input screen. 10.The software is easy to install and can be learnt in a short period of time. 11 .It automatically generates the experimental frame in SIMAN simulation language. 12.It automatically compiles, links and runs the model in SIMAN and saves the summary report to a file. 13.Presently the software does not perform any form of output analysis. Pecommendations for further research

The following recommendations are made for further research: 1. Develop additional models for the generic model base. 2. Expand the generic model to include transporters and machine breakdown conditions. 3. Develop an output database for analyzing and formatting results. 4. Develop user subroutines to perform output analysis for steady state analysis. 5. Develop the input interface using object oriented framework for greater modularity. 6. Build a similar interface to another existing simulation language (or to SIMANICINEMA using animation) following the DEVS formalism. BIBLIOGRAPHY

Adelsberger, H.H and P. A. Luker (Eds.), Intelligent Simulation Environments, Simulation Series, Publ: Society of Computer Simulation, U(l), 1986.

Banks, Jerry, (1990, November), "The simulation of material handling systems," Simulation, 55, pp. 26 1-270.

Bozenhardt, H., D. K. Eads and S. Etra, "Intelligent Simulation (ISM): The new generation of expert systems," Proceedings of advances in instrumentation, Part 1, Publ by ISA Services, North Carolina, 6,1990, pp. 9-16.

Blair, G., J. Gallagher, D. Hutchison and D. Shepherd, (Eds.), Object-Oriented languages, systems and applications, Halsted Press: New York, 1990.

Bullinger, H. J. and R. Gunzenhauser (Eds.), "Sojiware Ergonomics - Advances and applications(D. Lewis, Trans.)," John Wiley & Sons: New York, 1988.

Carroll, J.M., Simulation using personal computers, Prentice-Hall: New Jersey, 1987.

Chikala, R., " A comparison of two simulation languages for microcomputer based discrete event modeling," Masters thesis, Ohio University, Athens, November 1989.

Cochran, J., G. Mackulak, D. Castillo and E. Du, "Configuring available software into an AUES environment for manufacturing simulation design on the PC," Proceedings of the Conference on Simulation of Computer Integrated Manufacturing Systems and Robotics, 1987, pp. 1-7.

Cooley, R. E. and K. El-Hadad, (1991, August), "Dragoman: an expert system to aid users of a simulation model," Simulation, 57, pp. 111-1 13.

Crookes, J. G., (1987), "Generators, generic models and methodology," Jourml of the Operational Research Society, 38,pp. 765-768.

Deslandres, V. and H. Pierreval, (199 1, February), "An expert system prototype assisting the statistical validation of simulation models," Simulation, 56, pp. 79-89. 83 Elmaghraby, A. S., R. S. Demeo and J. Berry, "Testing an expert system for manufacturing," AI and Simulation, Willard Holmes(Ed.), Publ. by Society for Computer Simulation, San Deigo, Calif., 1985.

Funka-Lea, C. A, T. D. Kontogiorgos, R. J. T. Moms and L. D. Rubin, (1991, September), "Interactive visual modeling for performance," IEEE Sofhvare, 8, pp. 58-68.

Gohring, K. W., D. S. Newton and R. L. Sander (Eds.), Progress in Simulation(Vol2), Fifth Annual Simulation Symposium, Gordon & Breach Science Publishers: NY, 1972.

Gross, D and C. M. Harris, Fundamentals of queuing theory (2nd. ed.), John Wiley & Co: New York, 1985.

Henriksen, J.O., (1983), "The integrated simulation environment(Simu1ation software of the 1990s)," Operations Research, 31(6), pp. 1053-1073.

Hood, S. J., A. E. B. Amarnoto and A. T. Vandenberge, "A modular structure for a highly detailed model of semiconductor manufacturing," 1989 Winter Simulation Conference Proceedings, Publ by IEEE: New Jersey, 1989, pp. 81 1-817.

Hoover, S. V. and R. F. Perry, Simulation: A problem solving approach, Addison- Wesley Publishing Co.: New York, 1989.

Kearsley G. and R. Halley, Designing Interactive Sojiware,Park Row Press: California, 1986.

Law, A. M, "Simulation Software for manufacturing applications: The next few years," Industrial Engineering, 22, June 1990(a), pp. 14-15.

"Simulation Software for manufacturing applications (Part 2)," Industrial Engineering, 22, July 1990(b), pp. 18-20,74.

Law, A. M. and W. D. Kelton, Simulation modeling and analysis, 2nd ed. ,McGraw-Hill: New York, 1991.

Mackulak, G.T., J.K. Cochran and D.L Shunk, "Generic System Simulation Development on the PC(Phases I-111)," CIM Research Center, Arizona State University, 1987. 84 Medeiros, D. J., and R. P. Sadowski, (1983), "Simulation of robotic manufacturing cells: A modular approach," SCS Simulation, &(I), pp. 3-12.

Marmon,Craig, "Teledyne applies simulation to the design and justification of a new facility," Industrial Engineering, a,March 1991, pp. 29-32,75.

Mathew son, S.C., (1973, "Simulation Program Generators," SCS Simulation, a(6), pp. 181-189.

(1984), "The application of program generator software and its extensions to discrete event simulation," IEEE Transactions, &(I), pp. 3- 18.

Mayhew, D.J., Principles and Guidelines in Sofrware User Inter3CQce Design, Prentice Hall: New Jersey, 1992.

"Cincinnati Milacron benchmarks flexible manufacturing systems via computer modeling," Industrial Engineering, 2,March 1991, pp. 24-25,75.

Mellichamp J. M., "Simulation models are efficient aid to productivity improvement efforts," Industrial Engineering, 16, August 1984, pp. 78-89.

Mellichamp, J. M. and A. R. Venkatachalam, (December 1990), "An interactive debugging expert system for GPSS/H simulation models," SCS Simulation, 55, pp. 337-343.

Nance, R.E., "Model development revisited," Proceedings of the 1984 Winter Simulation Conference, 1984, pp. 75-80.

Nolan, P. J., G. M. Lane and J. M. Fegan, (January 1991), "ISI- An environment for the engineering use of general purpose simulation languages," Simulation, 56, pp. 41 -47.

"Computer simulation tool aiding variety of manufacturing decisions," Industrial Engineering, 18, August 1986, pp. 4.

Oldfather, P. M, A. S. Ginsberg and H. M. Markowitz, "Programming by Questionnaire: How to construct a program generator," Rand report RM- 51 29-PR, Santa Monica, Calif., November 1966.

O'Keefe, R. M., (January 1986), "Simulation and expert systems - a taxonomy and some examples," SCS Simulation, %(I), pp. 10-16. Oren, T. I and B. P. Zeigler, (1979), "Concepts for advanced simulation methodologies," SCS Simulation, 32(3), pp. 69-82.

Ozdemirel, N.E., "General Manufacturing Simulation Model Construction based on Group Technology classification of models," PhD dissertation, Arizona State University, May 1990.

Ozden, M. H., (February 1991), "Graphical programming of simulation models in an object-oriented environment," Simulation, 56, pp. 104-116.

Pegden, C. D., R. E. Shannon and R. P. Sadowski, Introduction to simulation using SIMAN, McGraw Hill: New Jersey, 1990.

Pegden, C. D., Introduction to SIMAN, System Modeling Corp., State College, PA, November 1987.

Phillips, C., "Simple-1: The language and modeling environment," Winter Simulation Conference Proceedings, Publ. by IEEE: New Jersey, 1989, pp. 28 1-290.

Reddy, Y. V. R. and V. Baskaran, "An introspective environment for knowledge- based simulation," Proceedings of the 1984 Winter Simulation Conference, 1984, pp. 645-65 1.

Reddy, Y. V. R., (1987), "Epistemology of knowledge based simulation," SCS Simulation, &(4), pp. 162-166.

Reilly, K. D., W. T. Jones and P. Dey, "The simulation environment concept AT perspectives," A I and Simulation Conference Proceedings, W. H. Holmes(ed.), 1985, pp. 29-34.

Rothenberg, J., "Object-oriented simulation: Where do we go from here," Proceedings of the 1986 Winter Simulation Conference, 1986, pp. 464-469.

Shneiderman, B. and A. Badre (Eds.), Directions in HurnadComputer Interaction, Ablex Publ. Corporation: New Jersey, 1982.

Solomon, Susan. L, Simulation of waiting-line systems, Prentice Hall Inc.: New Jersey, 1983. 86 Soloway E., D. Frye, S. B. Sheppard (Eds.), Human Factors in Computing Systems, Conference Proceedings, Sp. issue of the SIGCHI bulletin, Publ.:Association for Computing Machinery, 1988.

Sztrimbely, W. M. and P. J. Weymouth, (March 1991), "Dynamic process plant simulation and scheduling: and expert system approach," Simulation, 56, pp. 175-178.

Touran Ali, (September 1990), " Integration of simulation with expert systems," Journal of Construction Engineering and Management, m, pp. 480-493. Treu, S., (December 1988), "Designing a cognizant interface between user and the simulation software," Simulation, a,pp 227-234.

Yannis Vassiliou (Ed.), "Humn Factors and Interactive Computer Systems," Proceedings of the NYU Symposium on User Interfaces, Ablex Publishing Corporation: New Jersey, 1982.

Zeigler, B. P., (1986), "Hierarchical modular modeling/knowledge representation," Proceedings of the 1986 Winter Simulation Conference, pp 129- 137.

Zeigler, B. P., (November 1987), "Hierarchical, modular discrete-event modeling in an object-oriented environment," SCS Simulation, @, pp. 291-230. APPENDIX A

SIMTRAN The SIMan TRANslator

USERS GUlDE USERS GUIDE

About the SIMTRAN software: In brief:

SIMTRAN (Sirnan Translator) is designed to accept the experimental parameters for any typical small manufacturing system in a sequential manner, generate an experimental frame in SIMAN, link it to the generic model in SIMAN, and execute the simulation according to the run parameters defined. The user interface developed is C language based. It also avails the WINDOWS BOSS software, which is a powerful utility software for text based windows in C, distributed by Shareware. It was used for designing the input screens and defining the fill-in forms for data input.

The software does not perform any analysis of the output or process it any way. Only the standard SIMAN summary output is automatically generated. However, the output processing options in SIMAN may be availed, for acquiring output performance or to perform any statistical analysis.

The software is ergonomically designed to handle data entry, perform dependency checks and detect errors. It also provides meaningful error messages and on line help during each step of the input. 89 Installation:

The software operates on any IBM PC compatible computer with a color monitor, operating under DOS and having 640K RAM. Using a state-of-of-the-art IBM 3861486 PC with a video graphics adapter would definitely enhance its execution in terms of speed and resolution. A compatible graphics printer may be used for obtaining text or graphical output.

To install the software:

1) The SIMAN simulation software is assumed to be installed on the hard disk, suitably configured and added to the PATH in the system being used.

2) Insert the 3 112" program diskette in the proper drive and type in:

dNSTALLxSource Drive:> astination Drive :>

at the DOS prompt. (e.g. b: Install b: c: when installing the SIMTRAN software from the B drive)

3) All the files required to execute the software are copied into the current directory SIMTRAN, which is automatically created. These include, SIMTRAN.EXE, SIMTRAN.HLP, SIMTRAN.IN1, SIMTRAN.NDX, TITLE.EXE, GENERATE.BAT, SAMPLEl.INP, SAMPLEZINP, GENER1C.M alongwith the .BGI and TRIP.CHR files.

Note: The SIMTRANJNI fde is essential for the program to run since it allocates appropriate memory for all the indexed array inputs and storage buffers. us in^ the software:

To run the software type in: c GENERATE > at the DOS prompt. The main menu shows five options from which to select, namely, 1) to create a new model 2) to edit any old model 3) to generate the experimental frame in SIMAN 4) to run the simulation in SIMAN 5) to exit into DOS

Both create and edit options allow the user to sequentially enter or change data on each input screen. While creating new models, the default values or the maximum allowed values will appear at the input field which may be overwritten. While editing, the previously stored values will appear which may be modified.

The third option automatically translates the data inputted into a suitable program in SIMAN simulation language, constituting the experimental frame. The filename is the same as the saved model name for the data but with an .EXPextension. Note: The generation of the experimental frame in SIMAN can be done only after first either creating or editing a model and subsequently saving it. The .EXP file that is stored as a result, can however be used later for compiling, linking and running the simulation.

The fourth option, executes the simulation run for the model name specified. It compiles the .EXPfile in SIMAN, links it to the model program (i.e .MOD fde), and runs the simulation for as many replications and for duration specified by the user earlier. In~utErrors: All data entered during the create or edit sessions are extensively checked for errors in: 1. data type (viz., integer, float, character, string etc.) 2. exceeding upper and lower limits for the designed system in terms of model capacity 3. data entered through options provided in some input screens 4. probability values entered for rework operations 91 Appropriate error messages and warning messages are displayed, thereby occluding the user from entering incorrect values. Text windows are provided whenever required, briefly informing the user about the input or giving useful hints and warnings.

NOTE: The program does not account for logical errors committed by the user. It also, does not check the accuracy and range of the parametric values entered for the various probability distribution functions for arrival, setup and processing times. The user is assumed to have sufficient knowledge in probability, statistics and experimental design. However, some information is provided for user reference in its help page.

Simulation Errors: The errors occurring during execution of simulation run are generated by the SIMAN simulation processors and are not controlled by this software. Some of the most common errors encountered could be due to: 1) incorrect parameters specified for the probability functions. 2) incorrect sequence of operations (e.g., inputting a zero for station numbers). 3) inappropriate arrival times with respect to job completion times, resulting in a pile up of excessive number of jobs being present within the system being simulated. 4) insufficient allocation of waiting queue capacity, thereby increasing the cycle time of jobs and causing a pile-up. 5) insufficient allocation of parallel servers for the resources defined.

In general, these are more related to errors in experimental design, errors in data collection or logical errors in defining the system to be modeled. They are therefore not related to the software directly, since the program assumes the non-expert user to have access to sound data and only helps in eliminating the requirement of programming in a simulation language. Function Kevs: The following function keys are provided to further assist the non-expert user through the execution of this software: ESC - this allows the user to skip any screen (escape from it) and move onto the next input screen. The data is automatically saved while escaping from the current screen. F1 - this displays the help page for each input screen. Examples are given wherever necessary. It can be pressed at any point during the input mode. F2 - this exits the input screens without saving, and transfers control back to the main menu. This key may be pressed at the end of each screen when the message in reverse video mode appears at the bottom of the screen. Note: At that point, pressing will indicate acceptance of data to go on to the next input screen, pressing F2 would mean exit to main menu and pressing any other key would indicate editing of that screen.

The input module only moves forward sequentially. There is no provision provided to randomly go back and forth between screens. The ESC key acts like the PageUp key but no PageDown key is provided.

Color Codes in In~utScreens: The colors used in defining the input screens are chosen in keeping with the IS0 recommendations towards foreground and background combinations and high and low contrast colors. The following color code is used by the software: The text boxes giving the various input options (when required) are displayed in black background with yellow letters. Most of the input values being numeric help reduce variability and thus the error caused in string handling.

The text windows and pop-up windows that provide useful hints are displayed in black background with green letters. To obtain more detailed hints the user can press the ESC key.

Text windows that provide information from previous inputs are displayed at the top in black background with cyan letters. Sometimes this information is provided within the input form in white letters (e.g., Input form for Operation Sequences for each jobtype). Pop-up windows that display warning messages of any kind are in red letters on a black background. (e.g, specifying incorrect filenames ).

The windows displaying the help pages are made more noticeable by using cyan background and having yellow or black letters.

The displays concerning station configurations have blue background with magenta border and having yellow letters.

The displays concerning job configurations have magenta background with green border and yellow letters.

The displays attributed by both job and station configurations have blue background with cyan border and yellow letters.

The main menu is designed to be different too. It is the only white screen with black letters on it and having a magenta border.

Model kissum~tionsand Limitations; The manufacturing system being modeled is assumed to have the following characteristics: Parallel servers are assumed to have identical characteristics. Hence a single queue is defined for all parallel servers. Inspector detection rate for scrap or rework can be defined. Inspection is defined as a separate station with its own waiting queue. Rework and Scrap probabilities matrices are specified for each machining operation for each jobtype. The rework sequence is more or less fixed and cannot be randomly defined in terms of percentages after each inspection. The rework time required may either be uniquely specified or defined to be the same as the nodmachining time. Rework jobs wait in the same queue as normally processed jobs. Work in process (WIP) Queues are defined for only incoming jobs at each workstation and not for out going jobs. 94 Queue ranking rule chosen could be either FIFO (First In First Out) or LIFO (Last In First Out) The model defined could have a maximum of: 10 jobtypes, 20 primary workstations, 20 secondary resources (i.e. operators 1 workers), 40 pdf s and 25 operations for each job. Four station types are defined, namely, loading, machining, inspection and unloading. Loading stations are assumed to use fixtures for loading the lotsizes specified for each job. The probability distribution functions are defined for the following: EXPONENTIAL, NORMAL, TRIANGULAR, LOGNORMAL, ERLANG, UNIFORM, CONSTANT and POISSON. No ernipirical distributions defined. Only the machining station may be allotted secondary resources in the form of operators or workers. Setup times may be defined only for machining stations either as a constant or zero or as any probability distribution function. Setup times for other stations are defaulted to zero. Process times can be defined for all workstations as either a constant or zero or as a probability distribution function. The interanival times is defined as a probability distribution function for each jobtype. Only single entities are considered to be created (i.e. batchsize = 1) by the infinite source. The time taken for any job to be transported from one station to another is considered to be negligible. Breakdown maintenance andlor repair characteristics will not be considered by the generic model. The model has no provisions for defining transporters, AGVs or conveyors. It assumes manual transportation.

Model Exarn~les: Two examples are provided to assist the user in understanding the design concept of this software. (1) Single job multiple server (2) Multiple jobs multiple server 95 The first example is saved as SAMPLE1 and the second as SAMPLE2. The user may edit these models OR ESC through it, save it and simulate it to get familiar with the working of this software. The diagrammatic representation of sample2 is given below in figure (a).

Hint: To determine steadv state conditions: a) Check the summary report provided by SIMAN, which is saved as .OUT file at the end of a successful simulation. Compare the average and coefficient of variance for the time spent in the system, displayed in the TALLY table for multiple replications. If there is no significant difference indicated in the output, one could assume the system to have reached steady state for all practical purposes. Else either specify a warmup time for the model and rerun the simulation or increase the duration of simulation. 96

infinite source 2 job arrivals63 jobl EXPO(20.0) inspection job2 Station Sequence: m 1,m2,m4 EXPO(60.0) Station Sequence: m3,m2,m4 Rework sequence: m 1,m2 Q Rework sequence: m3,m2 G==G=>

El . . -g

machiig (two parallel) (cz7mT5') machining (3 parallel)

Figure a :Diagrammatic representation of sample2

The process timings at each station are as follows: Station Setup Times I ~roeesstimes I

M2 (for jobl) NORM(8.6,2.5) 18.0 M2 (for job2) NORM(12.7,2.2) 20.0 M3 NORM(5.3,1.4) 11.0 1 M4 zero I TRIA(2.5,4.0,5.5) I The SIMTRAN field inputs are attached to the guide for reference alongwith its input and output summary. SIMTRAN INPUTS FOR SAMPLE PROBLEM

Choose a number for Station Type Number of Stations selected : 4 i ++++ Workstation TYPE Definition ++++ Machining # Name TYPe Inspection Unloading

1 MStat(1) 2

2 MStat(2) 2

3 MStat(3) 2

4 MStat(4) 3

[Press ENTER to Accept, any other key to Edit, F2 to exit]

A A A rl z 0 * H !3 3 h C3 H C4 z 8 f3 I ki 0 z 4 0 E-1 I E 2 0 U I 22 PJ 0 5 5 I p: 0 v v v I ; 0 I .. m PC Q) C, C VJ 0 -4 X C, k rd 0 C, 3 rn al 9 Wrd 0. aJ 0 C, z a c<<< INSPECTION CONFIGURATION >>> REWORK DATA FOR: JOB # 1

No.of Rework Steps: -0 -0 -2 -0 -0 at each station

** Probability of REWORK for station sequences for this job ** 0. - 0. - 0.2 - 0. - 0.-

-

Operation sequence for each job JOB#s Station Sequences for operation (Valid stations include: 1 - 4) JOB#1 1- S .L=5 Rew=O

:ARRIVAL & OPERATION TIME, +++> P.D.F LOOK-UP TABLE <+++ JOBTYPE #:1 InterArrival Time : 1 0 None Setup process 1 EXP 20.00 0.00 0.00 2 EXP 60.00 0.00 0.00 QMachine -3 -4 3 NOR 10.10 3.20 0.00 4 CON 23.00 0.00 0.00 QMachine -5 -6 5 NOR 8.60 2.50 0.00 6 CON 18.00 0.00 0.00 QInspect 00 11 7 NOR 5.30 1.40 0.00 8 CON 11.00 0.00 0.00 QMachine -3 -4 9 NOR 12.70 2.20 0.00 10 CON 20.00 0.00 0.00 QMachine -5 -6 11 TRI 2.50 4.00 5.50

Press ENTER to Accept, any other key to Edit, F2 to exit]

~enerating sample1 .EXP.... Please Wait Generation of experimental frame in SIMAN completed ......

>>>>>> MAIN MENU <<<<<<

1 Create New Model 2 Edit Old Model J 3 Generate SIMAN Experimental Frame 4 Simulate Model 5 EXIT Program

Position cursor then press Input Summary Report generated by SIMTRAN

>>> INPUT SUMMARY: MANUFACTURING SYSTEM CONFIGURED cc<

Model Name: sampletwo Created by: jbrown

No. of jobdparts: 2 No. of stations in series: 4 Station Type: M M M I Parallel Servers:2,3,1,1 Queue Capacity: 99,99,99,99 Queue Selection Rule for processing jobs: FIFO No. of operaters 1 workers: 2 Interarrival times for jobdparts: EXPO(20.00) EXPO(60.00) Detection Probability for faulty parts : 1.00, 1.00 SIMULATION RUN PARAMETERS: No. of rundreplications : 1 Duration of each run : 6000 Begin Time for first run : 0.00 Transient 1 warm up time : 0.00

>>> Press [SHIFT]+[PrintScreen] to print OR any key to continue <<< APPENDIX B

IS0 RECOMMENDATIONS FOR COLOR CODES IN DISPLAYS APPENDIX B1

Table showing foreground-background color combinations recommended by IS0 for text displays

Background 1

Foreground Black Blue Green Cyan Red Magenta White

Black x x x

Blue x

Green x x x

Qan X White x Bold green x Bold cyan x x x x x Bold magenta x x

Yellow x x x x

Bold white x x x

Courtesy: Experimental results of tests conducted by Lalomia and Happ, 1987. 121 APPENDIX B2

IS0 recommendations of some color combinations that provide high and low contrast

High Contrast I Symbol Background I White Black Green Black cyan Black Yellow Black

I 1 Blue White I Black White Yellow Blue

111Magenta

Low Contrast Symbol Background

1 Blue Black L Blue Yellow I Red I Black I I Yellow I Red I I White I Cyan I Green I Cyan I I I Magenta I Red I

Courtesy: Principles and Guidelines in Software User Interface Design, Deborah J. Mayhew, 1992. APPENDIX C

VALIDATION INSTRUCTIONS, DATA SHEETS, QUESTIONNAIRE 123 INSTRUCTIONS FOR VALIDATION OF THE SIMTRAN SOJ?l'WARE

The following exercise is to be conducted towards the validation of the SIMTRAN software that was developed as part of a masters thesis objective. The purpose of this validation is to determine the ease of use of this software and to monitor the extent to which the simulation modeling time is enhanced. The various tasks involved in utilizing this software are timed and noted on the data sheet for later analysis.

Please complete the tasks in the order suggested below:

Read or browse through the user's guide. Install the software on the hard disk of the computer Run sample programs to increase familiarity with the package (Optional) Enter data for the given problem Run pilot simulation Check for steady state and either rerun or exit Fill out the evaluation questionnaire Provide suggestions for improvement

Your co-operation is greatly appreciated. SOFTWARE EVALUATION WORKSHEET

Name of the subject : Subject #:

Evaluation Start Time : Date : I / Evaluation End Time :

JotdTask Description Time Taken ( In Minutes)

Reading the User's Guide

Installing the Software

Getting familiarized

Data Input for the Given Model Problem

Simulating the Model

Determining Steady State Output SOFTWARE RATING OUESTIONNAIRE

Question Poor Fair Good Excellent Completeness of the User's Guide

Ease in Installation of Software

Interactiveness of the Software during Input

Ease of Generation and Execution of the Simulation Model Defined

"User friendliness" of the Software

Did you encounter any problems while running the Software ? Yes No ( Circle One)

If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

Thank you for your cooperation and time! I) Single sewer system :

Machining Run hnlRleters: length of = 720 hrs wmup =loo hrs no. of runs = 10 -[00 - server exit ow I start of simulation = 0.0 FIFO Interanival Time WP=m workers =1 Poisson: Mean4 /hr Setup time =O Process time: Exponential Mean = 1.2 /hr

II) Single entity multiple server system :

workers = 3

~~~~~d~al~i~ WIP = infinite Setup times a.0 Exponential: FIFO Rule Process time: sl= s2= uniform (lO,l3) Mean = 2.0 ] s3=

Run Parameters: length of run = 5000 min warmup = 0.0 no. of runs = 10 start of simulation = 0.0 APPENDIX D

VERIFICATION DATA 128 Model Frame Listin? for the MIMI1 Oueue model in SIMAN

BEGIN; CREATE : EXPO(1 ,lo): MARK(1); creating entity anivals using random stream 10 QUEUE, 1; entities enter queue SEIZE: SERVER: ! select station Worker; select worker COUNT: 1,l; increment counter DELAY : EXPO(2,lO); processing time taken given by parameter 2 RELEASE : SERVER: ! free station for next entity Worker; free worker TALLY: 1, INT(1): DISPOSE; compute time spent in system END;

BEGIN; PROJECT, M M 1 QUEUE, JIYER; define summary report title DISCRETE,,1,l; define maximum stations RESOURCES: 1, SERVER: ! single station defined 2, WORKER; one worker in system PARAMETERS: 1, 1.O: ! parameter 1 for arrival pdf 2, 0.5; parameter 2 in process time TALLIES: 1, TIME IN SYSTEM; tally variable to be displayed COUNTERS: 1, CUSTOMER DELAYS; counter variable to be displayed DSTATS: 1, NQ(l), NUMBER IN QUEUE: ! specify statistics to be computed 2, NR(l), SERVER UTILZ. ; REPLICATE, 10,0,980; run simulation 10 time for 980 min END; Out~utSummary Re-port for MIMI1 Oueue model us in^ SIMAN

SIMAN IV - License #go50353 Ohio University

Summary for Replication 1 of 10

Project: M M 1 QUEUE Run execution date : 2/28/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM .94000 1.0123 .00140 6.5115 960

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .43346 2.3414 .00000 8.0000 .00000 SERVER UTILZ. .48905 1.0221 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 961 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 2 of 10

Project: M M 1 QUEUE Run execution date : 2/28/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM 1.0475 .98 176 .33569E-03 6.208 1 944

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .49469 2.1405 .00000 7.0000 .00000 SERVER UTILZ. 271497 .97049 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 945 Infinite SIMAN N - License #I9050353 Ohio University

Summary for Replication 3 of 10

Project: M M 1 QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM .83715 .96311 .00348 4.9921 957

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .36480 2.471 1 .00000 9.0000 7.0000 SERVER UTILZ. .46893 1.0642 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 958 Infinite SIM AN IV - License #9050353 Ohio University

Summary for Replication 4 of 10

Project: M M 1 QUEUE Run execution date : u2911980 Analyst: JIYER Model revision date: 212811 980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM 1.0161 1.0198 .32043E-03 5.7247 998

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBERINQUEUE .53175 2.1619 .00000 8.0000 .00000 SERVER UTILZ. SO306 .99389 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 999 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 5 of 10

Project: M M 1 QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

-

TIME IN SYSTEM 1.0123 .87567 .42725E-03 4.9946 1031

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .53333 1.8655 .00000 6.0000 2.0000 SERVER UTILZ. .53525 .93181 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 1032 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 6 of 10

Project: M M 1 QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM 1.0004 .98237 .00464 6.2826 951

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE -48568 2.2140 .00000 9.0000 .00000 SERVER UTILZ. .48634 1.0277 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 952 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 7 of 10

Project: M M I QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time :980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM 1.1 180 .99546 .00232 7.6782 998

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .62656 2.3079 .00000 14.000 1.0000 SERVER UTILZ. .51286 .97460 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 999 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 8 of 10

Project: M M I QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM .97 133 .93601 .60940E-035.2470 101 8

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE SO047 2.0090 .00000 8.0000 .00000 SERVER UTILZ. .SO856 .98302 .00000 1.0000 1.0000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 1019 InF~nite SIMAN IV - License #I9050353 Ohio University

Summary for Replication 9 of 10

Project: M M 1 QUEUE Run execution date : 212911 980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

------

TIME IN SYSTEM .93337 .95 156 .76294E-03 4.95 13 952

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER INQUEUE .43060 2.2122 .00000 7.0000 .00000 SERVER UTILZ. .47609 1.0490 .00000 1.0000 .00000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 952 Infinite SIMAN IV - License #go50353 Ohio University

Summary for Replication 10 of 10

Project: M M 1 QUEUE Run execution date : 2/29/1980 Analyst: JIYER Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

TIME IN SYSTEM 1.0230 1.05 10 .79346E-03 5.9364 984

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

NUMBER IN QUEUE .53739 2.2123 .00000 10.000 .00000 SERVER UTILZ. .48978 1.0207 .00000 1.0000 .00000

COUNTERS

Identifier Count Limit

CUSTOMER DELAYS 984 Infinite

Run Time: 1 min(s) 45 sec(s) Simulation run complete. 139

Experimental Frame listing for single server problem using SIMTRAN

BEGIN;

7 PROJECT, singleserver jiyer ; DISCRETE, , 3,20,21; A'ITRIBUTES : 1, TimeIn: 2, Priority: 3, Flag;

9 VARIABLES : l,NSta, 1: ! number of stations defined 2, Nopr, 1: ! max. number of operations 3, Njob, 1: ! max. number of jobs 4 - 4, StaType (1) ,2: ! one machining station 5 - 5, QCapacity (1) ,99: ! infinite queue capacity 6 - 6, ArrDNo (1), 1: !job 1 arrives with pdf #1 7 - 7, Lotsize (1) , 1: !jobs processed in batches of one 8 - 8, PRework (1,l) ,0.00 : ! no rework probability 9 - 9, PScrap(1,l) ,O.OO : ! no scrap probability 10 - 10, Step(1,l) ,O : ! no inspection hence no rework steps 11 - ll,SetDNo(l,l) ,41 : ! setup time at station 1 is zero (pdfMl) 12 - 12, ProDNo(l.1) ,2 : ! process time given by pdf # 2 13 - 13, PInspect(1) , 1.00: ! detection probability &faults to 1.0 14, TempNjob, 1; define temporary variable for # of jobs

1 STATIONS : 1, MStal: ! single station &fined 26, Finish; dummy station to detect process completion

9 QUEUES : 1, QMStal, FIFO; queue selection rule: first in first out , RESOURCES : 1-l,Server(l),l: ! single primary resource 2. Operator, 1: ! single worker in system 3, Fixture(1); no fixtures defined

9 DISTRIBUTIONS: 1, EXPO( 1.00): ! pdf and their parameters 2, EXPO( 0.50): 41, 0.0; zero time unit

9 SEQUENCES : 1, 1 &26; station routing for job 1

9 COUNTERS : 1, Rework1 : !counter variables 2, Scrap1 : 3, Balkjobl : 4, Faulty ; TALLIES : 1, TimeInSys; tally variable DSTATS : 1, (NR(l)/l)*100, Station1 Utilz.: ! statistical variables 2, NQ(l), Stat1 Queue Util;

9 REPLICATE ,lo, 0.00,980 , , , 0.00; run model 10 times for 980 minutes END; 140

Out~utSummary Re~ortfor sin~leserver model us in^ SIMTRAN

SIMAN IV - License #EN50353 Ohio University

Summary for Replication 1 of 10

Project: single server Run execution date : 2/28/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejob 1 1.0524 1.0113 .00232 5.9325 976

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. .50198 ,99605 .00000 1.0000 ,00000 Stat1 Queue Util .54616 2.1914 ,00000 9.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 2 of 10

Project: single server Run execution date : 22811980 Analyst: jyothi Model revision date: 22811980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

- ----

Cyclejob1 1.0955 -99103 .33569E-03 6.208 1 948

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. .51913 .96244 .00000 1.0000 1.0000 Stat1 Queue Util .54131 2.1503 .00000 9.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #I9050353 Ohio University

Summary for Replication 3 of 10

Project: single server Run execution date : 2/28/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejobl .93427 1.0161 .49782E-037.8502 989

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station 1 Utilz. SO133 .99734 .00000 1.0000 1.0000 Stat 1 Queue Util A4591 2.3710 .00W 10.000 2.0000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #go50353 Ohio University

Summary for Replication 4 of 10

Project: single server Run execution date : 2/28/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejob 1 1.0499 1.0117 .MI65 5.7536 987

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. .49271 1.0147 ,00000 1.0000 .00000 Stat 1 Queue Util .56468 2.1706 .00000 8.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 5 of 10

Project: single server Run execution date : 2128/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejob1 1.0410 .89558 .42725E-03 5.3637 1041

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. 253881 .92516 .00000 1.0000 .00000 Stat 1 Queue Util .56699 1.9210 .00000 9.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN N - License #go50353 Ohio University

Summary for Replication 6 of 10

Project: single server Run execution date : u2811980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejob 1 .88080 .92763 .12207E-03 4.5 166 948

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. .47764 1.0458 .00000 1.0000 .00000 Stat1 Queue Util .37440 2.2807 .00000 8.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap1 0 Infinite Balkjob1 0 Infinite Faulty 0 Infinite SIMAN IV - License #go50353 Ohio University

Summary for Replication 7 of 10

Project: single server Run execution date : u2811980 Analyst: jyothi Model revision date: 2l2811980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

------

Cyclejob 1 1.0846 1.0018 .00232 7.6781 983

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. SO282 .99438 .00000 1.0000 1.0000 Stat1 QueueUtil .58540 2.3609 .00000 14.000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Iniinite SIMAN IV - License #go50353 Ohio University

Summary for Replication 8 of 10

Project: single server Run execution date : 2/28/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time :980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejobl .97184 .94491 .00134 5.2470 1012

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrapl 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 9 of 10

Project: single server Run execution date : Y2811980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

------

Cyclejob 1 .92367 1.0164 .27466E-03 5.8930 969

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. ;49257 1.0150 .00000 1.0000 .00000 Stat1 QueueUtil .42074 2.2475 .00000 7.0000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite SIMAN IV - License #9050353 Ohio University

Summary for Replication 10 of 10

Project: single server Run execution date : 2/28/1980 Analyst: jyothi Model revision date: 2/28/1980

Replication ended at time : 980.0

TALLY VARIABLES

Identifier Average Variation Minimum Maximum Observations

Cyclejob 1 1.0222 1.0565 .76294E-035.9364 993

DISCRETE-CHANGE VARIABLES

Identifier Average Variation Minimum Maximum Final Value

Station1 Utilz. .49253 1.0151 .00000 1.0000 .00000 Stat1 Queue Util .54325 2.1984 .00000 10.000 .00000

COUNTERS

Identifier Count Limit

Rework1 0 Infinite Scrap 1 0 Infinite Balkjobl 0 Infinite Faulty 0 Infinite

Run Time: 3 min(s) 27 sec(s) Simulation run complete. APPENDIX E

PROGRAM SOURCE CODES FOR SIMTRAN SOFTWARE Program LLFting for INSTALL batch file for SIMTRAN @echooff cls ECHO +------+ ECHO I This program installs SIMTRAN ECHO I I an interactive software for I ECHO I Manufacturing Simulation t ECHO +------+ pause if "81" --"" goto error if "%2" -""- goto error echo The program will be installed as follows: echo Source is 81 Destination is 82UIMTRAN echo If you wish to exit installation press [Cntrl-C]. pause mkdir 82UIMTRAN CIS goto install :error echo Usage: Install [Source Drive:] [Destination Drive:] echo eg: INSTALL b: c: goto exit :install ECHO ECHO +------+ ECHO : INSTALLING SIMTRAN.... I ECHO +------+ ECHO copy % 1SIMTRAN.* %2UIMTRAN copy % lgeneratebat %2\SIMTRAN copy % 1generic.m %2UIMTRAN copy % 1sample1 .inp %2UIMTRAN copy % 1sample2.inp %2UIMTRAN copy % 1title.exe %2UIMTRAN copy %1 *.bgi %2UIMTRAN copy %l trip.chr 82UIMTRAN cd UIMTRAN CLS ECHO ECHO +------+ ECHO t INSTALLATION COMPLETE I ECHO +------+ ECHO Note: SIMAN IV should be installed and be in path to run SIMTRAN ECHO To run SIMTRAN, at DOS prompt type : ECHO generate [ENTER] ECHO :exit Program Listing of the SIMTRAN batch file

@echooff TITLE :MAIN SIMTRAN IF ERRORLEVEL 3 goto run IF ERRORLEVEL 0 goto end :run REM SIMULATE MODULE IF ERRORLEVEL IS 1 call temp del temphat cls ECHO +------+ ECHO I COMPILING EXPERIMENTAL FRAME ...... I ECHO +------+ expmt %SIMTRAN% %SIMTRAN% IF ERRORLEVEL 2 goto error1 goto cont 1 :error 1 cls ECHO ECHO +------+ ECHO I COMPILATION ERROR ! I ECHO +------+ ECHO Error Code:2 ECHO Compilation Error or Warning in Experimental Frame !! ECHO Possible causes: ECHO 1. Syntax error while generating frame ECHO 2. Insufficient memory on hard disk ECHO pause got0 MAIN :cont 1 ECHO +------+ ECHO I LINKING GENERIC MODEL..... t ECHO +------+ echo ""llinker generic BSIMTRANB %SIMTRANB IF ERRORLEVEL 2 goto error2 goto cont;! :error2 cls ECHO ECHO +------+ ECHO I SIMAN LINKER ERROR ! f ECHO +------+ ECHO Error Code:2 ECHO Linker failure on cross referencing madd arrel:exwframes! 153 ECHO Possible causes: ECHO 1. Incorrect station sequence number. ECHO pause got0 MAIN :cont2 ECHO +------+ ECHO I RUNNING SIMULATION ...... I ECHO +------+ echo qulsiman %SIMTRAN%>SIMTRAN.RUN IF ERRORLEVEL 2 goto error3 ECHO ECHO +------+ ECHO I SIMULATION COMPLETED I ECHO +------+ ECHO Summary report is saved in %SIMTRAN%.OUT ECHO pause echo RETURNING TO SIMTRAN!!!! goto MAIN :error3 CIS ECHO ECHO + ECHO I SIMAN RUNTIME ERROR I ECHO +------+ ECHO Error Code:2 ECHO SIMULATION FAILED! !! ! ! ! ECHO Cause of enor saved in SIMTRAN.RUN ECHO Possible causes: ECHO 1. Entity limits exhausted. ECHO 2. Unable to execute SlMAN.EXE ECHO 3. Incorrect parameters for p.d.fs ECHO pause echo RETURNING TO SIMTRAN!!!! goto MAIN :end SET SIMTRAN= The listing of the GENERIC MODEL FRAME in SIMAN

BEGIN;

9 ; Creating the entities for each job type.

9 Newjobs CREATE; dummy entity created CREATE : ED(AnDNo(TempNj0b)): ! arrive with pdf defined MARK(Time1n); ASSIGN : NS= TempNjob; BRANCH, 2: ALWAYS, NxtSta: IF, NS< Njob, Jobs: ELSE, Nomore;

9

9 Jobs ASSIGN : TempNjob=TempNjob+1 : NEXT(Newjobs);

t Nomore ASSIGN : TempNjob=l ; ASSIGN : NSd : DISPOSE;

9 ; Generic Station Submodels.

9 STATION , 1-20; define a maximum of 20 stations

BRANCH ,1: IF, (StaType(M) == l), FLoading: IF, (StaType(M) = 2), Machining: IF, (StaType(M) == 3), Inspection: IF, (StaType(M) == 4), Funloading;

9 ; Fixture loading station submodel.

9 FLoading EVENT : 1; QUEUE , M, QCapacity(M), BalkJob; SEIZE : Fixture(NS), LotSize(NS): Server(M); DELAY : LotSize(NS) * ED(ProDNo(NS,IS)); ASSIGN : Flag = 1; RELEASE : Server(M): NEXT (NxtSta);

9 ; Machining station submodel.

9 Machining EVENT : 1; QUEUE , M, QCapacity(M), BalkJob; SEIZE : Server(M): Operator; DELAY : ED(SetDNo(NS,IS)); RELEASE : Operator; DELAY : LotSize(NS) * ED(ProDNo(NS,IS)); RELEASE : Server(M): NEXT (NxtSta);

9 ; Inspection station submodel.

7 Inspection EVENT : 1; QUEUE , M, QCapacity(M), BakJob; SEIZE : Server(M); DELAY : LotSize(NS) * ED(ProDNo(NS,IS)); RELEASE : Server(M);

9 BRANCH , 1: WITH, PInspect(NS), Fault: WITH, 1-PInspect(NS), GBad;

GBad ASSIGN : IS=IS+Step(NS,IS); COUNT : NS+(3* Njob): NEXT (NxtSta);

Fault BRANCH , 1: WITH, PRework(NS,IS), Rework: WITH, PScrap(NS,IS), Scrap: WITH, 1 - PRework(NS,IS) - PScrap(NS,IS), Good;

9 Good ASSIGN : IS = IS + Step(NS,IS): NEXT (NxtSta); Rework COUNT : NS: NEXT (NxtSta); Scrap BRANCH , 1: IF, (Flag == I), SRelFix: ELSE, SNoFix; SRelFix RELEASE : Fixture(NS), LotSize(NS); SNoFix COUNT : NS + Njob: DISPOSE;

9 ; Fixture unloading station submadel.

9 Funloading EVENT : 1; QUEUE , M, QCapacity(M), BalkJob; SEIZE : Server(M); DELAY : LotSize(NS) * ED(ProDNo(NS,IS)); ASSIGN : Flag =O; RELEASE : Fixture(NS), LotSize(NS); RELEASE : Server(M): NEXT (NxtSta);

9 ; Count and dispose balking jobs.

7 Balkjob BRANCH , 1: IF, (Flag = I), BRelFix: ELSE, BNoFix; BRelFix RELEASE : Fixture(NS), LotSize(NS); BNoFix COUNT : NS + (2*Njob): DISPOSE; , ; End of station submodels, send to next station.

9 NxtSta ROUTE : 0.0, SEQ;

I ; End of processing, collect statistics and dispose.

7 STATION , Finish; TALLY : NS, INT(Time1n): DISPOSE;

9 END; SPECIFIC FLOW CHART FOR THE GENERIC MODEL FRAME 1 ; Creating the entities for each job type 1 Newjobs CREATE

1 ASSIGN I NS= TernpNj o b

BRANCH, 2 ALWAYS FNXt S t a

ELSE LNo~or e

5 Jobs I ASSIGN I

I ASSIGN 1 TernpNj ob=l

I ASSIGN I

; Generic Station Subrnodels. BRANCH, 1 IF,(StaType(M)1 == 1) FLoading

IF,(StaType(M) == 3) nspect ion

IF, (StaType(!vl) == 4)LFunloading

; Fixture loading station submodel. 10 FLoading

I Server (M)

J. DELAY LotSize NS * ED( I ProDNo (NS,IS) SIASSIGN

I RELEASE 1 ; Machining station submodel. 16 Machining vEVENT

I SEIZE Server (M) Operator

I DELAY

t RELEASE

I DELAY I

RELEASE I I Server (M)

; Inspection station submodel. 23 Inspection L~alk~ob I SEIZE I Server (M) I

DELAY LotSize ProDNo(NS,

i RELEASE I Server (M)

( BRANCH, 1 WITH,PRework(NS,IS) k~ework WITH,PScrap(NS,IS) Scrap

29 Good

30 Rework COUNT NS

I~xt~ta 31 Scrap ( BRANCH, 1 162 REL L1.: 5 Z I

33 SNoFix COUNT

-- NS + Njob I

; Fixture unloading station submodel.

34 Funloading vEVENT

L~alk~ob SEIZE Server (M)

DELAY

ASSIGN 0Flag = 0 RELEASE I RELEASE

I Server (M) I

; Count and dispose balking jobs. 41 B2lkjob BRANCH,1

IF, (Flag == 1) BRelFix ELSE BNoFix 42 BRelFix RELEASE Fixture(NS),LotSize(NS 1 I 43 BNoFix I COUNT I

I

; End of station subrnodels, send to next station. 44 NxtSta I ROUTE I

; End of processing, collect statistics and dispose

I TALLY 1 C PROGRAM LISTING /* ** Automatic Simulation generator program ** */ #include "winboss.h" I* ALWAYS */ #include cmath.h> #include #include #define jobidx 12 #define statidx 22 #define lenidx 27 #define pdfidx 42 void siman-file(char *sl ); void write-file(char *sl); void read-file(char *sl); char *addblank(float fl, int n); I* n <-no. of spaces before decimal -> 2 or 3*/ screens(void); firstscr(void); /* ***************a** External Variables ******************* */ int nopr,exp-flag,f-splres; char filename[ 121,filename1 [lb],sysfile[40]; struct db { I* input record layout */ int qcapaci ty [statidx], server[statidx], fixtureljobidx],lotsizeljobidx]; float begintime, pinspectljobidx],warmup; int seqlengthljobidx],setdno[lenidx]ljobidx],prno[lenidxIjobidx], numrep; int sequenceIjobidx][lenidx],stepljobidx][lenidx],nstation,arrdnoljobidx]; long length; float preworkljobidx][lenidx], pgoodljobidx], pscrapuobidx][lenidx]; char model_name[32],uname[32]; int statype[statidx], restype,~esource,ndistrib,njob,nsecres,npority; } rec; I* structure referred as */ struct edit ( I* display buffer layout */ char *preworkljobidx][lenidx], *pscrapljobidx][lenidx], *pgoodljobidx]; char *qcapacity[statidx], *warmup, *nsecres, *numrep,*length; char *sequenceljobidx]Ilenidx], *pinspectljobidx]; char *lotsizeljobidx], *seqlengthljobidx],*setdno[lenidx]ljobidx]; char *begintime, *server[statidx], *fixtureljobidx],*arrdnoljobidx]; char *nstation,*restype,*nresource,*ndistrib,*njob,*npriority; char *statype[statidx],*prodno[lenidx]ljobidx],*stepljobidx][lenidx]; 1 rep; I* structure referred as */ float rec 1jaram-1 [pdfidx], rec 1-param_2[pdfidxI,rec 1-param-3 [pdfidxl; int recl-function[pdfidx]; char *repl-function[pdfidx], *rep 1-param-1 [pdfidx]; char *rep ljaram_2[pdfidx], *rep lqaramam3[pdfidx]; /* +++++++++++++++++++ Main Menu Window ...... */ void main() I* function main */ {intjv,retry; char ch,outfile[l5],*infile,cmd[l2]; FILE *fp; WINDomww; static struct pmenu intelc s { I* define structure */ 00, FALSE, 00, 01,05, I 01,02, " >>>>>> MAIN MENU <<<<<<", 0, 04,05, " 1 Create New Model ",1. 05,05,"2EditOldModel ",2, 06,05, " 3 Generate SIMAN Experimental Frame ", 3, 07.05, " 4 Simulate Model ", 4, 8.05, " 5 EXIT Program ",5, 10,02, "Position cursor then press ", 0, 99, 99, 1,",99) 1; clrscr0; I* clear background screen */ firstscr(); strcpy(fi1enarne." "); I* initialize filename *I exp-flag=O; I* set flag *I wn-init(); if(access("simtran.iniW,O)==(- 1)) { ww = ~~-O~~~(~~~,~,~~,~~,~,(BLACK<<~~REDIBOLD),(BLACK<<~~~DIBOLD)); wn-title(ww," <> "); wn-printf(ww," File SIMTRAN.IN1 does not exist in current directory !!\nu); wn_putsa(ww,4,10,"Press any key to continue ...... ",(NVIDE0<<4) IBLUEI BOLD); v-getcho; wn-clr(ww); wn-close(ww); exit(1); 1 read-file("simtran.ini"); I* Initializing arrays for editlrep structure *I do { jv = wngopup(0,4,23,44,14, WHITE<<41BLACK, MAGENTA<<41WHITE, &intelc,TRUE); switch (jv) { I* dispatch to proper module *I case 1: if (screens()=2222) exp-flag=& break; case 2: retry=3; ww = ~~-O~~~(~O~,~,~O,~~,~,(BLACK<<~~CYAN),(BLACK<<~~WHITEIBOLD)); wn-title(ww," <> "); do{ wn-gtext(XEQ,NFRM,NFLD, ww,l,l, "Enter file name (with no extension):",(BLACK<<4IWMTEIBOLD),'',I 1,filename,NSTR,NSTR); strcpy(fi1ename1 ,filename); strcat(filename1,".INP); if(access(fi1ename 1.0)) { wn-putsa(ww,4,10,"ENTER VALID .....",(NVIDE0<<4) IBLUEI BOLD); sound(1500); delay(600);nosound();wn~clr(ww);) )while (access(filename1,O)&& (retry-->O)); wn-clr(ww); wn-close(ww); if(!access(filenamel,O)) I read-file(filename1); if(screens()==2222) exp-flag=O; 1 break; case 3: clrscr(); if (exp-flag==l) {strcpy(filenamel,filename);;strcat(filenamel,".EXP);sim~file(filenamel);} else { ww = ~~-O~~~(~~~,~,~~,~~,~,(BLACK<<~~REDIBOLD),(BLACK<<~IREDIBOLD)); wn-title(ww," <> "); wn-printf(ww,"h CREATE /EDIT and SAVE a model for"); wn-printf(ww,"\n generating the EXPERIMENTAL FRAME.."); wn-printf(ww," Press any key to continue... "); vjetch(); wn-clr(ww); wn-close(ww); 1 clrscr(); break; case 4: ww = ~~-O~~~(~~~,~,~~,~~,~,(BLACK<<~!CYAN),(BLACK<<~~WHITEIBOLD)); wn-title(ww," << Filename to Simulate >> "); retry=3; /* give three try */ do{ wn_gtext(XEQ,NFRM,NFLD, ww, 1.1, "Enter file name (with no extension):",(BLACK<<4IWHITEIBOLD),'',I 1,filename,NSTR,NSTR); strcpy(fi1ename 1,filename); strcat(filename1,".EXP); if(access(fi1ename1,O)) { wn_putsa(ww74,10,"ENTERVALID .....",(NVIDE0<<4) IBLUEI BOLD); sound(1500); delay(600);nosound();wn~clr(ww);) )while (access(fi1ename1,O) && (retry-- >O)); wn-clr(ww); wn-close(ww);

if (!access(filenamel,O)) {strcpy(sysfile,"echoSET SIMTRAN="); strcat(sysfile, filename); strcat(sysfile,">temp.batW); system(sysfi1e); exit(3); 1 clrscr(); break; case 5: jv=100; exit(0); break; case 99: default: break; 1 ) while(jv !=100); wn-exit(); /* ++++++++++++++++++ User Input: Screens ++++++++++++++++++ */ screenso { /* declaring pointer variables to windows boss */ WINDOWPTR wn,wnl ,wn2,wns,wnd; /* window pointer */ WIFORM frm 1,frm2,frm3,frm4; /* form pointer */ char fchar; I* fill character for form-fields */ unsigned atrib; I* data entry field atribute */ char *emsgl .*emsg2,*emsg3, *emsg4,*hmsg; I* error message pointer */ char bool[2],num-str[3]; I* declaring local variables within this module */ int njob0,njobl ,njob2,njob3,njob4,ij,k,m,p,f-load,f-inspect; int ndistrib-id1 ,ndistrib-id2,ndistribl ,ndistrib2; int interrjobflagl, jobflag2 jobfla~3,lenseq l,lenseq2,lenseq3; char ch, pdfname[l0][6], stat-name[5][11];

I* ** User dialog begins ** */ clrscr() ; /* clear background screen*/ I* trying (may be) will lead to luck in some other avenues too */ if(!wn-hlinit(0,0,78,23,CYAN<<4I YELLOWIBOLD, CYANc<4 IRED,"SIMTRANW)) { v-locate(0.0,O); I* if no help file */ printf("wn-hlinit failed!\nW); /* tell of woe...*/ exit(0); I* and die..*/ 1 /* user information for summary output*/ wn = wn_open(800,3,3,48.1 l,(CYAN<<41WHITEIBOLD),(BLuE~<4lYELLOWIBOLD)); if(!(wn)) { I* errors ?? */ printf("wn-open failed!!\nl'); /* tell of woe... */ exit(1); } I* and die */

wn-title(wn,"ccc USER INFORMATION >>>"); wn-putsa(wn. l0,7," ESC (Save & Skip) F1 (Help) ",(NVIDEOc<4) IBLUEI BOLD); frml = wn-frmopn(7); /* form 1 open for 7 fields */ if(!frml) { I* errors ?? */ printf("wn-frmopn failed!!\nW); I* tell of woe.. . */ exit(1); } I* and die */

atrib = @LUE<<4) WHITE1 BOLD; I* field amibute */ emsg2 = "Enter text for USER and MODEL NAME: press any key to continue..."; hmsg="%user information%"; fchar = '- '; I* redefine fill character */ /* &fine forml for text input */ wnjtext(SET,frml,O, wn,3,1, "User Name : ",atrib,fchar,15,re~.uname,hmsg,ernsg2); wnjtext (SET,frml,l, wn,6,1,"Model Name:",atrib,fchar,15,rec.model-name,hmsg,emsg2);

/* read forml and store in buffer */ if(!(interr=wn-frmget(frm1))) { I* get (read) form */ v-cls( 7 ); I* die if errors !! */ v-locate(60,60,60); printf("Memory Corruption Error!\nU); /* telling woes...*/ exit(1); 1 wn-frmcls(frm1); /* close form */ wn-clr(wn); /* clear window & display data */ wn-close(wn); I* close field window *I if(interr==llll) return(2222); /* scanning for F2 key to exit */

/* window I1 &fined for system configuration */ wn2 = wn-open(800,1,3,50,11 ,(CYAN<<41WHITEIBOLD),(BLUE<<4lYELLOWIBOLD)); wn-title(wn2," >> MANUFACTURING SYSTEM CONFIGURATION << 'I); if(!(wn2)) ( I* errors ??..improper window */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); /* and die */ 1 emsg4 = "Invalid input (allowed range :(0-20)...p ress any key.."; emsg3 = "Invalid input (allowed range :(]-lo) ....p ress any key.."; emsg2 = "Invalid input (allowed range :(I-20)... press any key.."; emsgl = "Select any option provided for queue priority ru1e:jl or 2) ....."; wngutsa(wn2,10,10," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEl BOLD); hmsg="%system configuration%";

/* prompt window wnl for queue rule */ wn 1 = ~~-O~~~(~~~,~~,~~,~O,~,(BLACK<<~~GREENIBOLD),(BLACK<<~~WHITEIBOLD)); if(!(wnl)) ( I* errors ?? */ printf("wn-open failed!!\nU); /* tell of woe... */ exit(1); ) /* and die *I wn-title (wn1,"Select a number for Queue Selection Rule");

wn-printf(wn1,'b I First In First Out [FIFO] 'I); wn-printf(wn 1,"\n 2 Last In First Out [LIFO] "); frml= wn-frmopn(6); if(!frml) { /* errors ?? */ printf("wn-frmopn failed!!\nW); I* tell of woe... *I exit(l);} /* and die */ wn-gint (SET,frml,O,wn2,2,2, "Total number of JobIParts Produced : ",atrib,fchar,&rec.njob,2,l,l0,rep.njob,hmsg,emsg3); wn-gint (SET,frml ,l,wn2,4,2, "Independent Work Stations in series : ",atrib,fchar,&rec.nstation,2,1,20,rep.nstation,hmsg,emsg2); wn-gint (SET,frml,2,wn2,6,2, "Number of OperatorsIWorkers [if any] : ",atrib,fchar,&rec.nsecres,2,0,20,rep.nsecres,hmsg,emsg4); wn-gint (SET,frm1,3,wn2,8,2, "Queue Selection Rule for WIP Area : ",atrib,fchar,&rec.npriority,2,1,2,rep.npriority,hmsg,emsg1); if(! (interr=wn-frmget(frm1))) { I* get (read) from frm3 */ v-cls(7); /* die if errors !! */ v-locate(60,60,60); printf("Memory Corruption Error!\nU); exit(1); 1 if (wns-escape) ( rec.nstation =atoi(rep.nstation); /* save and skip screen */ rec.npriority = atoi(rep.npriority); rec.njob=atoi(rep.njob);) wn-frmcls(frm1); I* close form 1 */ wn-clr(wn 1); /* clear contents of prompt window wnl */ wn-close(wn1); I* close window wnl */ wn-clr(wn2); I* clear contents of window wn2 */ wn-close(wn2); I* close window wn2 */ if(interr=l111) return(2222); /* scanning for F2 key to exit */

I* Window opened for obtaining each work-station type */ I* defining top text window */ wn2 = wn_open(800,1,1,35,1,(BLACK<<41CYANIBOLD),(BLACK<<4IWHITEIBOLD)); wnqrintf(wn2," Number of stations in series : %dW,rec.nstation);

I* defining right prompt text window */ wn1 = ~~-O~~~(~~~,~,~~,~~,~,(BLACK<<~~YELLOWIBOLD),(BLACK<<~~WHITEIBOLD)); if(!(wnl)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe.. . */ exit(1); /* and die */ 1 wn-title(wn1 ,"Choose a number for Station Type"); wn-printf(wn 1,"\n 1 Loading"); wn-printf(wn1 ,'%I 2 Machining"); wn_printf(wnl ,'%I 3 Inspection"); wn-printf(wn1 ,"\n 4 Unloading");

I* defining input window for rnax. of 20 stations */ atrib = (WHITE<<4) IBLACKI BOLD; /* field attribute for input window */ wns = wn-open(800,4,1 ,~~,~~,(BLUE<<~~YELLOWIBOLD),(MAGENTAC<~IYELLOWIBOLD)); if(!(wns)) ( /* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); } I* and die */ wn-title(wns,"++++ Workstation TYPE Definition ++++"); frm3=wn_frmopn(21); I* from 3 open for 21 fields */ if(!frm3) { I* errors ?? */ printf("wn-frmopn failed!!\nW); I* tell of woe... */ exit(1);) /* and die */ wnqrintf(wns,"# Name Type \n\n\nW); emsg2="Enter a value corresponding to station-type(1-4) ....."; hrnsg="%station configuration%"; /* help index */ for(i= 1;i<=rec.nstation;i++) { j=i-1;

if (i>14) ( I* the last five stations */ wn-locate(wns,i+3+j-28.41); wnsint (SET,frm3,i- 1,wns,i+3+j-28,56, "",atrib,fchar,&rec.statype[i], 1,1,4,rep.~tatype[i],hmg,emg2); wngrintf(wns,"%d MStat(%d)",i,i); 1 if (i>7&&i<15) ( I* the next seven stations */ wn_locate(wns,i+3+j- 14,19); wn-printf(wns,"%dl',i); wn-locate(wns,i+3+j-l4,23); wn_gint (SET.frm3,i- 1,wns,i+3+j-14.35, "",atrib,fchar,&rec.statypeIi], l,l,4,rg,emsg2); wn-printf(wns,"MStat(%d)",i,i); 1 if (ic8) { I* the first seven stations */ wn_gint (SET,frm3,i- 1,wns,i+3+j, 15, "",atrib,fchar,&rec.statype[i], 1,1,4.rep.statype[i],hmsg,emsg2); wn-printf(wns,'b %d MStat(%d)\nm,i,i); 1 1 I* prompt window */ wnd = wn~open(800,16,30,40,6,(BLACKcc4lG~ENIBOLD),(BLACKcc4l~~lB0LD)); if(!(wnd)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); ) I* and die */ wn-title (wnd," >>>> NOTE cccc ");

wn_printf(wnd,'ln For loading stations specify 'I); wnqrintf(wnd,'ln atleast one unloading station "); wn-printf(wnd,"\n and vice versa !!!\n "); wn_printf(wnd," Press any key ... "); v_getch(); wn-clr(wnd); wn-close(wnd); I* clear all windows ...*/ wn-putsa(wns,l8,12," ESC (Save & Skip) F1 (Help) ",(NVIDEOcc4) IBLUEl BOLD); if(!(inte=wn_frmget(frm3))) { I* get (read) from frm3 */ v-cls(7); I* die if errors !! */ v-locate(60,60,60); printf("Memory Corruption Error!\nW); exit(1); 1 for (i=l;ic=rec.nstation;iu) {if (rec.statype[i]==l) f-load=l; if (rec.statype[i]=3) f-inspect=l; ) if (wns-escape) for(i=l;ic=rec.nstation;i++) I* save and skip *I rec.statype[i]=atoi(rep.statype[i]); wn-frmcls(frm3); I* close form 3 */ wn-clr(wns); wn-close(wns); I* clear all windows ...* / wn-clr(wn2); wn-close(wn2); I* and close all windows...*/ wn-clr(wn 1); wn-close(wn 1); if(interr==l111) return(2222); I* scan F2 for exit condition */

I* Window defined for queue (WIP) capacity at each station */ strcpy(staLname[O],"Un&fined"); strcpy(stat-nme[l ],"Loadingw); strcpy(stat-nme[2],"Machine"); strcpy(stat-name[3],"Inspect"); strcpy(stat-name[4],"Unload"); I* defining top text box */ wn2 = wn-open(800,1,1,40,1 ,(BLACK<<~ICYANIBOLD),(BLACKCC~WHITEIBOLD)); if(!(wn2)) ( I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); } I* and die */ wngrintf(wn2," WIP Storage for the %d worlcstations",rec.nstation); I* defining input window for queue capacity *I atrib = (WHITE<<4) IBLACKI BOLD; I* field attribute for input window *I wns = wn~open(800,4,1,60,19,(BLUE<<4IYEUOWIBOLD),(MAGENTA<<41YELLOWIBOLD)); if(!(wns)) { I* errors ?? *I printfrwn-open failed!!\nW); I* tell of woe... *I exit(1); ) I* and die *I wn-title(wns,"++++ Work In Process (UrIP) Storage Capacity ++++"); wn-printf(wns,"# Station QCapacity\n\nb"); emsg2="Enter WIP storage capacity (1-99): Press any key to continue..."; hmsg="%queue capacity%"; I* help index *I frm4=wn-frmopn(2 1); I* form4 opened for max 21 input fields *I if(!frm4) ( I* ems?? *I printf("wn-frmopn failed!!\nW); I* tell of woe... *I exit(1);) I* and die *I

if (i>14) { I* last 5 stations *I wn-locate(wns,i+3+j-28.41); wn-printf(wns,"%d %s ",i,stat-name[rec.statype[i]]); wn-gint (SET,frm4,i-l,wns,i+3+j-2836, "",atrib,fchar,&rec.qcapacity[i],2,1,99,rep.qcapacity[i],hmsg,emsg2); 1 if (i>7&&i<15) { I* next seven stations *I wnJocate(wns,i+3+j-l4,19); wn_printf(wns,"%d",i); wn-locate(wns,i+3+j-14,23); wn_printf(wns,"%s",stat_name[rec.statype[i]]); wn-gint (SET,frm4,i-l,wns,i+3+j-14.35, "",atrib,fchar,&rec.qcapacity[ij,2,1,99,rep.qcapacity[i],hmsg,emsg2); 1 if (k8) { I* first 7 stations *I wngrintf(wns,'ln %d %s\n",i,stat-name[rec.statype[i]]); wn-gint (SET.fm4,i- 1,wns,i+3+j, 15, "",atrib,fchar,&rec.qcapacity[i],2,1,99,rep.qcapacity[i],hmsg,emsg2); 1 1

I* Popup a prompt window *I wn 1 = wn~open(800,11,30,40,6,(BLACK<<41GREENIBOLD),(BLACK<<4W~lBOLD)); if(!(wnl)) ( I* errors ?? *I printf("wn-open failed!!\nW); I* tell of woe... *I exit(1); } I* and die *I wn-title(wnl,">>> NOTE <<<"); wn-printf(wn 1,'ln If you do not want jobs "); I* print message *I wn-printf(wn1,'ln to be balked at any WIP storage"); wn-printf(wn 1,'ln area, enter a large value. "); wn_printf(wnl,'ln Eg: QUEUE CAPACITY=99\n "); wn-printf(wn1," Press any key ... "); v-getcho; wn-clr(wn 1); I* clear contents of prompt window wnl *I wn-close(wn1); I* close prompt window wnl */

wn-putsa(wns,l8,12," ESC (Save & Skip) F1 (Help) ",(NVIDEOcc4) IBLUEI BOLD); if(!(interr=wn-frmget(frm4))) { /* get (read) form4 */ v-cls(7); /* die if errors !! *I v-locate(60,60,60); printf("Memory Corruption Error!bW); exit(1); } if (wns-escape) for(i=l;ic=rec.nstation;i++) I* save and skip *I rec.qcapacity[i]=atoi(rep.qcapacity[i]); wn-frmcls(frm4); I* close form 4 */ wn-clr(wn2); wn-close(wn2); I* clear all windows *I wn-clr(wns); wn-close(wns); I* and close windows *I if(interr==l 1 11) return(2222); I* scan F2 key for exit condition *I

I* defining the default primary resource configuration */ atrib = (WHITEcc4) IBLACKI BOLD; I* field attribute */ I* opening top window wn2 */ wn2 = wn-open(800,1,6,50,1 ,(BLACK<<~ICYANIBOLD),(BLACKCC~IWHITEIBOLD)); if(!(wn2)) { /* errors ?? */ printf("wn-open failed!!\nM); I* tell of woe... */ exit(1); ) /* and die */ wn~title(wn2,"ccccccPRIMARY RESOURCES >>>>>>>"); wn_printf(wn2," Number of stations in series : %d",rec.nstation); I* opening the input form as window wns */ wns = wn-open(800.4,l ,66,19,(BLUE~~41YELLOWIBOLD),(MAGENTA~~4IYELLOWlBOLD)); if(!(wns)) { I* errors ?? */ printf("wn-open failed!!bW); I* tell of woe... */ exit(1); ) I* and die *I wn-title(wns,">> PARALLEL CAPACITIES OF STATION SERVERS cc"); wn_printf(wns,"# Primary Server Parallel \nu); wn_printf(wns," (stations) capacity b\nN); emsg2= "Enter parallel server capacity at each work station(1-10):"; hmsg="%primary capacity%"; I* help index *I frm2=wn_frmopn(21); I* form 2 open for 21 fields *I if(!frm2) { I* errors ?? */ printf("wn-frmopn failed!!\nm); I* tell of woe... */ exit(1); ) I* and die */

for(i=l ;ic=rec.nstation;i++) { j=i-1; I* column locater for fields */ 1 if (i<8) { wngrintf(wns,"h %d %s\n ",i,stat-name[rec.statype[i]]); wnjint (SET,frm2,i-1,wns,i+3+j, 17, "",atrib,fchar,&rec.server[i],2,1,lO,rep.server[i],hmsg,emsg2); 1 1 wn-putsa(wns, 18 ,12," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); if(!(interr=wn_frmget(frm2))){ I* get (read) form */ v-cls(7); I* die if errors !! */ v-locate(60,60,60); printf("Memory Corruption Error!\nV); exit(1); 1

if (wns-escape) for(i=l;i<=rec.nstation;i++) I* for ESC save and skip */ rec.server[i]=atoi(rep.server[i]); wn-frmcls(frm2); I* close form 2 */ wn-clr(wns); wn-close(wns); I* clear all windows */ wn-clr(wn2); wn-close(wn2); /* close all windows */ if(inten==llll) return(2222); /* scan for F2 to exit */

I* Window defined for special resource configuration */ if (f-load!=l ) f-splred- ; else ( /* input for fixture capacity */ wn2 = wn-open(800,1,6,50,1 ,(BLACK<<41CYANIBOLD),(BLACK<<4lWHITEIBOLD)); if(!(wn2)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); I* and die */ 1 wn_title(wn2,"<<<<<<< SPECIAL RESOURCE (FIXTURES) >>>>>>>"); wn-printf(wn2," Number of Fixtures: %dW,rec.njob); atrib = (WHITEe4) IBLACKJ BOLD; I* input field attribute */ wns = wn_open(800,4,1,66, 19,(BI4UE<<41YELLOWIBOLD),(GREEN<<41BLACKIBOLD)); if(!(wns)) { I* errors ?? */ printf("wn-open failed!!\nU); /* tell of woe... */ exit(1); I* and die */ 1 wn-title(wns," >>> Fixture Resource Capacity <<<");

frm4=wn_frmopn(l2); /* from 3 open for 21 fields */ if(!frm4) { /* errors ?? */ printf("wn-frmopn failed!!\nU); I* tell of woe.. . */ exit(1); /* and die */ 1 emsg2="Enter fixture capacity for each job(1-999): Press any key ..."; hmsg="%fixture capacity%"; wn-printf(wns,"# Name Capacity b"); wn-printf(wns,"\n\nW);

for(i=l ;i<=rec.njob;i++) { /* for max. of 10 fixture definitions */ j=i-1; if (i>5&&i

f-splres=rec.njob; I* set flag for fixtures resources */ wn-frmcls(frm4); I* close form */ wn-clr(wns); wn-close(wns); /* clear window */ wn-clr(wn2); wn-close(wn2); I* close window */ if(inter-=l 11 1) return(2222); ) I* ending if loop for flag*/ I* @ @ @ @ Display for lotsizes @ @ @ */ wn2 = wn-open(800,1,1,35,1 ,(BLACK<<~~CYANIBOLD),(BLACKCC~IWHITEIBOLD)); if(!(wn2)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); j /* and die */

wn-printf(wn2," Number of jobs specified : %dW,rec.njob);

wn1 = wn~open(800,16,$0,38,5,(BLACKcc41GREENIBOLD),(BLACKcc41WHITEIBOLD)); if(!(wnl)) ( I* errors ?? */ printf("wn-open failed!!bM); I* tell of woe... */ exit(1); } I* and die */ wn-title(wn1, " cccc NOTE >>>> "); wnqrintf(wn1,"b Lotsizes (i.e batch sizes) are "); wn-printf(wn1,'b optional and may be specified "); wn-printf(wn1 ,"\n for jobs undergoing batch processes "); wn-printf(wn1,'b Otherwise enter default value of 1.b"); aaib = (WHlTEcc4) IBLACKl BOLD; I* field attribute */ wns = wn-open(800,6,1,34,15,(BLUEcc4IYELLOWIBOLD),(GREENcc41BLACK)); if(!(wns)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); ) I* and die */ wn-title(wns," >>> LOTSIZES FOR JOBS ccc "); wn_printf(wns,'b Job# LotSizes(optional) b\n\nU); emsg2="Enter lotsize for batch processes (1-999): Press key to continue..."; hmsg="%lotsizes%"; frm l=wn_frmopn(17); I* from 1 open for 17 fields */ if(!frml) { I* errors ?? */ printf("wn-frmopn failed!!\nW); I* tell of woe. .. */ exit(1);) /* and die */

I wn_putsa(wns, 14,2," ESC (Save & Skip) F1 (Help)",(NVIDEOcc4) IBLUEI BOLD); if(!(interr=wn-frmget(frm1 ))) { I* get (read) form4 */ v-cls(7); I* die if errors !! */ v~locate(60,60,60); printf("Memory Corruption Error!\nV); exit(1); if(wns-escape) for(i=l;ic=rec.njob;i++) I* scan for ESC,save,skip */ rec.lotsize[i]=atoi(rep.lotsize[i]);

wn-frmcls(frm1); /* close form 1 */ wn-clr(wns); wn-close(wns); wn_clr(wnl ); wn-close(wn 1); I* clear window */ wn-clr(wn2); wn-close(wn2); I* close window */ if(interr==l 11 1) retum(2222); I* scan for F2 to exit */

/* ############HI ##HI########### ########## -### */ /** Window for probability density functions used in system model **/ atrib = (WHITEcc4) IBLACKI BOLD; I* field attribute */ wn2 = wn-open(800,l. 1,42,1,(BLACKcc4ICYANIBOLD),(BLACKcc4lWHITElBOLD)); if(!(wn2)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe ... */ exit(1); ) I* and die */ wn-title(wn2,">"); /* top text box */ fchar="; I* define fill char */ ernsg2="Enter total no. of pdfs to be defined(1-40) ....any key to continue.."; hmsg="Wistributions%"; frml=wn_frmopn(2); I* from 1 open for 2 fields */ if(!frml) { /* errors ?? */ printf("wn-frmopn failed!!\nW); /* tell of woe... */ exit(1);) I* and die *I wn~int(SET,frml,O,wn2,0,1, "Total density functions defined: ",atrib,fchar,&rec.ndistrib,2,1,40,rep.ndistrib,hmsg,emsg2); if(! (interr=wn-frmget(frm1 ))) { I* get (read) form *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!W); exit(1); 1

I* Opening fill-in form for function input *I ndistribl=rec.ndistrib; ndistrib_id2=0; I* set all flags *I if (rec.ndistrib > 20) { ndistrib_id2=1; ndistribl=20; ndistrib2=rec.ndistrib-20; )

wn1 = wn~open(800,2,45,32,1O,(BLACK<<41YELLOWIBOLD),(BLACK<<4WHITEIBOLD)); if(!(wnl)) { I* errors ?? *I printf("wn-open failed!!\nW); I* tell of woe... *I exit(1); ) I* and die *I wn-title(wn1,"Choose a number for Distribution"); I* prompt text box *I wn-printf(wn 1,"\n 1 EXPO"); wngrintf(wn 1,'7n 2 NORM"); wnqrintf(wn1 ,"\n 3 LOGN"); wn-printf(wn 1,"\n 4 TRIA"); wn-printf(wn 1,'7n 5 ERLA"); wn-printf(wn 1,'%I 6 UNIF"); wn-printf(wn1 ,"\n 7 CONST"); wn-printf(wn 1,"\n 8 POIS"); wns = wn~open(800,4,1,65,19,(BLUE<<41YELLOWIBOLD),(MAGENTA<<41YELLOWIBOLD)); if(!(wns)) { I* errors ?? *I printf("wn-open failed!!\,"); I* tell of woe... *I exit(1); } I* and die *I wn-title(wns,">> PROBABILITY DENSITY FUNCTION (P.D.F)CONFIGURATION <<"); emsgl="Choose a number from text box for defining prob. function name(1-8): ..."; emsg2=11Enterappropriate parameter values for fuction chosen: ..."; hmsg="%pdf parameters%"; frm2=wn-frmopn(100); I* from 2 open for 100 fields *I

if(!frm2) { I* errors ?? *I printf("wn-frmopn failed!!\nW); I* tell of woe... *I exit(1); } I* and die *I wn-printf(wns,"# Function Parameters \n\n\nW); I* Loop for displaying the first 20 distribution fields */ k=O; I* initialize field index */ for(i=l ;i<=ndistribl ;i++) { j=i-I;

if (i>14) { wndint (SET,frm2,lc,wns,i+3+j-28,45, "",atrib,fchar,&recl-function[i], l,l,8,repl~function[i],hmsg,emsgl); wn-gfloat (SET,frm2,k+l ,wns,i+3+j-28,47, "",atrib,fchar,&recl-param-1 [i],5,1,0,999.99,repl-param-1[i],hmsg,emsg2); wn-gfloat (SET,frm2,k+2,wns,i+3+j-28,53, "",atrib,fchar,&recl-paramam2[i],5,1 ,0,999.99,replqaramam2[i],hmsg,emsg2); wn-gfloat (SET,frm2,k+3,wns,i+3+j-28,59, "",atrib,fchar,&recl-paramam3[i],5, 1,0,999.99,repl-paramam3[i],hmsg,emsg2); k=k+4; 1 if (i>7&&i<15) { wn-gint (SET,frm2,k,wns,i+3+j-14,23, "",atrib,fchar,&recl-function[i], l,l,8,repl~function[i],hmsg,emsgl); wn-gfloat (SET,frmZ,k+l ,wns,i+3+j-14,25, "",atrib,fchar,&recl-param-1 [i],5,1 ,0,999.99,repI-param-1 [i],hmsg,emsg2); wn-gfloat (SET,frm2,k+2,wns,i+3+j-14,31, "",atrib,fchar,&rec1-paramam2[i],5, 1,0,999.99,rep 1-paramam2[i],hmsg,emsg2); wnsfloat (SET,frm2,k+3,wns,i+3+j-14,37, "",atrib,fchar,&recl-paramam3[i],5,1,0,999.99,repl-paramam3[i],hmsg,emsg2); k=k+4; 1 if (id) { wn-gint (SET,frm2,k,wns,i+3+j,l, "",atrib,fchar,&recl~function[i],l, 1,8,repl-function[i],hmsg,emsgl); wn-gfloat (SET,frm2,k+l ,wns,i+3+j,3, "",atrib,fchar,&rec1-param-1 [i],5,1,0,9999,repI,paramaml [i],hmsg,emsg2); wnsfloat (SET,frm2,k+2,wns,i+3+j,9, "",atrib,fchar,&rec1-paramam2[i],5,1 ,0,9999,replqaram_2[i],hmsg,emsg2); wn-gfloat (SET,frm2,k+3,wns,i+3+j,15, "",atrib,fchar,&recl-paramam3[i],5,1 ,O,9999,replgaram_3[i],hmsg,emsg2); k=k+4; 1 1 wn_putsa(wns,l8,12," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEl BOLD); if(!(inte~wn_frmget(b2))){ I* get (read) form */ v-cls(7); I* die if errors !! *I v-locate(60,60,60); printf("Memory Corruption Emor!\nW); exit(1); 1 if(wns-escape) for(i=l;i<=ndistribl;i++) I* scan for ESC,save,skip */ { recl,function[i]=atoi(repl~function[i]); recl-param-1 [i]=atof(repl_param_l [i]); rec l jaram-2[i]=atof(repl-paramam2[i]); recl_param-3 [i]=atof(replqaram_3[i]); 1 wn-frmcls(frm2); I* close form */ wn-clr(wns); wn-close(wns); I* clear and close window */ if(interr==llll) { wn-clr(wn2); wn-close(wn2); /* clear text boxes */ wn-clr(wn1); wn-close(wn1); /* close text boxes *I return(2222);) I* scan for F2 key to exit */ I* Distribution Configuration display beyond 20 pdfs.. */

if (ndistribjd2zl) I* check flag */ ( atrib=(WHITE<<4)1BLACK; wns = wn~open(800,4,1,65,19,(BLUE<<41YELLOWIBOLD),(MAGENTA~<4l~LLOWlBOLD)); wn-title(wns,">> DISTRIBUTION CONFIGURATION (P.D.F) CONTINUED....<<");

if(!(wns)) { I* errors ?? */ printf("wn-open failed!!\nW); /* tell of woe ... */ exit(1); ) /* and die */ wn_printf(wns," Function Parameters\n "); wn-printf(wns," Name \n ");

ffm3=wn-frmopn(100); I* from 3 open for 100 fields *I if(!frm3) { /* errors ?? */ printf("wn-fimopn failed!!\nW); I* tell of woe ... */ exit(1); ] /* and die */

k4; /* initialize field index */ for(i=l ;i<=ndisuib2;i++) ( j=i-1; /* column index */ if (i>14) { wnsint (SET,frm3,k,wns,i+3+j-28.45, "",atrib,fchar.&recl~~nction[i+20],1,l,8,repl~function[i+2O],hmsg,emsgl); wnsfloat (SET,frm3,k+l ,wns,i+3+j-28,47, "",atrib,fchar,&recl-param-1 [i+20],5,1,0,999.99,repl-param-1[i+20],hmsg,emsg2); wnsfloat (SET,frm3,k+2,wns,i+3+j-28,53, "",atrib,fchar,&recl-param_2[i+20],5,1 ,0,999.99,repl-param-2[i+20],hmsg,emsg2); wnsfloat (SET,frm3,k+3,wns,i+3+j-28,59, "" ,atrib,fchar,&rec1-paramam3[i+20],5,1 ,0,999.99,replqaramaram3[i+20],hmsg,emsg2); k=k+4; 1 if (i>7&&i<15) {wnsint (SET,frm3,k,wns,i+3+j-14,23, "",atrib,fchar,&recl~function[i+20],1,1,8,repl~function[i+20],hmsg,emsgl); wnsfloat (SET,frm3,k+l ,wns,i+3+j-14,25, "",atrib,fchar,&recl-param-1 [i+20],5,1,0, 1000,replamparamaml[i+20],hmsg,emsg2); wnzfloat (SET,fnn3,k+2,wns,i+3+j-14,3 1, "",atrib,fchar,&rec1-paramam2[i+20],5, 1,0,1 000,repl-paramam2[i+20],hmsg,emsg2); wnsfloat (SET,fd,k+3,wns,i+3+j-14.37, "",atrib,fchar,&rec l-paramam3[i+20],5.1.0, 1000,repl~paramam3[i+20],hmsg,emsg2); k=k+4; 1 wnsfloat (SET,frm3,k+3,wns,i+3+j,15, "",atrib,fchar,&recl-param-3[i+20],5,1 ,0,1000,repl-param-3[i+2O],hmsg,emsg2); k=k+4; 1 ] I* end for loop */

wn-putsa(wns,l8,12," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); if(!(interr=wn_hget(h3))) { I* get (read) form */ v-cls(7); I* die if errors ! ! */ v-locate(60,60,60); printf("Memory Corruption Error!bW); exit(1); 1

if(wns-escape) for(i=l;i<=ndistrib2;i++) { rec 1-function[i+20]=atoi(rep l_function[i+20]); rec l-param-1 [i+20]=atof(replqaraml [i+20]); recl_param-2[i+20]=atof(repl-param-2[i+20]); recl-paramaram3[i+20]=atof(repl-param-3[i+20]); 1

wn_bcls(h3); I* close form */ wn-clr(wns); I* clear form */ wn-close(wns); I* close window */ I wn-clr(wn2); wn-close(wn2); I* clear text boxes */ wn-clr(wn1); wn-close(wn1); I* close text boxes */ if(interr== 111 1) return(2222); I* scan for F2 to exit */

I* Window for Uo says) sequence length (no. of operations) for each job*/ I* top text box */ wn2 = wn-open(800,1,1,35,1 ,(BLACK<<41CYANIBOLD),(BLACK<<4IWHITEIBOLD)); if(!(wn2)) { I* errors ?? */ printf("wn-open failed!!bW); I* tell of woe... */ exit(1); ] I* and die */ wn-printf(wn2," Number of jobtypes specified : %dU,rec.njob); I* prompt box */ wn1 = ~~-~~~~(~~~,~~,~~,~O,~,(BLACK<<~~GREENIBOLD),(BLACKCC~~WHITEIBOLD)); if(!(wnl)) { /* errors ?? */ printf("wn-open failed!!bM); I* tell of woe. .. *I exit(1); } I* and die */ wn-title(wnl,"<>>"); wngrintf(wn1,'b Specify total number of operations"); wn-printf(wnl,'b for each job type."); wn-printf(wn 1,'ln Include rework operations too!!bn); I* open fill-in form */ fchar= I-'; I* redefine field fill attibute */ atrib = (WHITE<<4) IBLACKI BOLD; I* input field attribute *I wns = ~~-O~~~(~~~,~,~,~~,~~,(BLUE<<~~YELLOWIBOLD),(GREEN<<~~BLACKIBOLD)); if(!(wns)) { I* errors ?? *I printf("wn-open failed!!\nU); I* tell of woe ... */ exit(1); ] I* and die */ wn-title(wns,">> JOB OPERATION SEQUENCE LENGTH <<"); wn-printf(wns,"b Job# Total Operations bb\nW); emsg2="Valid no.of operations for each jobtype(1-25): Press any key to continue..."; hmsg="%sequencelength%"; I* help index */

frm2=wn-frmopn(l1); /* from 2 open for 11 fields */ if(!frm2) { I* errors ?? */ printf("wn-frmopn failed!!\nW); I* tell of woe... */ exit(1); ) I* and die */ for(i= 1;ic=rec.njob;i++) { j=i-1 ; if (i>5&&icll) { wn-locate(wns,i+3+j-10,15); wn-printf(wns,"%dU,i); wnjint (SET,frm2,i-1 ,wns,i+3+j- 10,20, "",atrib,fchar,&rec.seqlength[i],2,1,25,rep.seqlength[i],hmsg,emsg2); 1 if (ic6) { wnjint (SET,frm2,i-l,wns,i+3+j,9, "",atrib,fchar,&rec.seqlength[i],2,1,25,rep.seqlength[i],hmsg,emsg2); wn-printf(wns," %d\n\nV,i); 1 1 wngutsa(wns,14,2," ESC (Save & Skip) F1 (Help)",(NVIDEOcc4) IBLUEI BOLD); if(!(interr=wn-frmget(frm2))) { /* get (read) form4 */ v-cls(7); /* die if errors !! */ v-locate(60,60,60); printf("Memory Corruption Error!\nU); exit(1); } if( wns-escape) for (i=l;ic=rec.njob;i++) I* save and skip */ rec.seqlength[i]= atoi(rep.seqlength[i]);

wn-frmcls(frm2); /* close form */ wn-clr(wns); wn-close(wns); I* clear window */ wn-clr(wn1); wn-close(wn1); I* close window */ wn-clr(wn2); wn-close(wn2); if(interr==llll) return(2222); /* scan for F2 to exit *I

I* detection probability*/ if(f-inspect!=l) { for (i=l;ic=rec.njob;i++) { rec.pinspect[i]=O.O; for (j=l;jc=rec.nstation;j++) { rec.step[i]u]=O; rec.prework[i]lj]=O.O; rec.pscrap[i]~]=O.O;) } I else { I* start else loop for inspect flag to be true */ wn2 = wn-open(800,1,1,35,1 ,(BLACKcc4ICYANIBOLD),(BLACKcc4lWHITElBOLD)); if(!(wn2)) { I* errors ?? */ printf(" wn-open failed!!\nU); I* tell of woe.. . */ exit(1); ) I* and die */ wn-printf(wn2," Number of jobtypes specified : O/dt,rec.njob); /* prompt box */ wn 1 = wn-open(800, 14,38,40,5,(BLACK>>"); wngrintf(wn1,'%I Specify the probability of'); wngrintf(wn1,'b detecting a fault on inspectionh");

I* open fill-in form */ fcharz '-'; I* redefine field fill attibute */ atrib = (WHITE<<4) IBLACKl BOLD; I* input field attribute *I wns = wn~open(800,6,1,34,15,(BLUE<<41YELLOWIBOLD),(GREEN~<41BLACKlBOLD)); if(!(wns)) { I* errors ?? *I printf("wn-open failed!!\nl'); I* tell of woe... *I exit(1); ) I* and die */ wn-title(wns,ll>> DETECTION PROBABILTY <<"); wngrintf(wns,"b Job# Probability of detection hhh"); emsg2="Valid range for probabilities: (0.1 - 1.0) !! Press any key ..."; hmsg="%pdetection%"; I* help index */

frm2=wn-frmopn(l1); I* from 2 open for 11 fields */ if(!frm2) ( I* errors ?? */ printfrwn-frmopn failed!!hN); I* tell of woe... */ exit(1); ) I* and die */ for(i=l;i<=rec.njob;i++) { j=i-I; if (i>5&&i

wn-frmcls(h2); I* close form *I wn-clr(wns); wn-close(wns); I* clear window *I wn-clr(wn1); wn-close(wn1); /* close window */ wn-clr(wn2); wn-close(wn2); if(interr==l 11 1) retum(2222); I* scan for F2 to exit */

I* window for Inspection Configuration and for rework steps ... *I

wns = wn~open(800,1,1,77,22,(BLUE<<41YELLOWIBOLD),(CYAN~~4lYELLOWlBOLD));

wn-title(wnsYw<<< INSPECTION CONFIGURATION >>> 'I); if(!(wns)) ( I* errors ?? *I printfrwn-open failed!!\nW); I* tell of woe... *I exit(1); ) I* and die */ emsgl="NO REWORK STEPS SPECIFIED!!! Enter 0.0 for probability value."; emsg2="Exceeding the total sequence length defined for this job !!!"; emsg3="Enter a probability value (0.0 - 1.0): Press any key to continue...."; emsg4="SUM OF (Prob.Rework + Prob. Scrap) c= 1.0 !! !"; hmsg="%inspection%"; for (k=l;kc=rec.njob;k++) I wn-locate(wns, 1.20); wnqrintf(wns," REWORK DATA FOR INSPECTION: JOB # %d ",k); fnn3=wn_frmopn(30); if(!frm3) { I* errors ?? *I printf("wn_frmopn failed!!\nM); I* tell of woe... *I exit(1); ) I* and die *I m4;j4; I* field and column index *I wn_locate(wns,4,1); wn-printf(wns,"No.of Rework Steps:"); wn_locate(wns,5,1);wn-printf(wns,"at each station"); for@=l;pc=rec.seqlength[k];p++) { if (p<15){ wnsint (SET,frm3,m,wns,4,j+21, "",atrib,fchar,&rec.~tep[k][p],2,0,(rec.~eqlength[k]- 1),rep.step[kl [pl ,hmsg,emsg2); j=j+4; if (p==14) j=O; ) else { wnsint (SET,frrn3,m,wns,6,j+2 1, "",atrib,fchar,&re~.step[kl[pl,2,0,(~length[k]-l),rep.~tep[kl[p],hmsg,emsg2); j=j+4; ) m=m+l ; I* update field index value *I 1

wn-putsa(wns,21,15," ESC (Save & Skip) F1 (Help) ",(NVIDEOcc4) IBLUEI BOLD); if(!(interr=wn_frmget(fxm3))) { I* get (read) form4 *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!\nl'); exit(1); ] if( wns-escape){ for (i=l;ic=rec.njob;i++) J* scan for ESC *I for (p= l;p<=rec.seqlength[i];p++) rec.step[i][p]= atoi(rep.step[i][p]);) wn-frmcls(frm3); if(interr==l 11 I) { wn-clr(wns); wn-close(wns); return(2222);) I* scan for F2 *I I* Reinitialize counters and reopen form3 for rework probability...*/ j=O; m=O; frm3=wn_frmopn(27); wn-locate(wns,8,2); wnqrintf(wns,"** Probability of REWORK for station sequences for this job **");

for(p= 1;pc=rec.seqlength[k];p++) { if(pcl5) { if(rec.step[k][p]!=O) wnsfloat (SET,frm3,m,wns,lOj+3, "",atrib,fchar,&rec.prework[kl[p1,4,2,0.0,1.O,rep.prework[k][p],hmsg,emsg3); else wnjfloat (SET,frm3,m,wns,101j+3, "",atrib,fchar,&rec.prework[k][p],4,2,0.0,0.O,rep.prework[k][p],hmsg,emsg1); j=j+5; if(p==14)j=O; ) else { if(rec.step[k][p]!=O) wnsfloat (SET,frm3,m,wns, 12j+5, '~1~,atrib,fchar.&rec.pre~~rk[k][p],4,2,~.~,l.O,rep.prework[k][p],hmsg,emsg3); else wnsfloat (SET,frm3,m,wns, 12j+5, "",atrib,fchar,&rec.prework[k][p],4,2,0.0,0.O,rep.prework[k][p],hmg,emg1); j=j+5; } m=m+ 1; 1 wn-putsa(wns,21 ,15," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); if(!(interr=wn_frmget(frm3))) ( I* get (read) form4 *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!\n"); exit(1); 1 if (wns-escape)( for (i=l;i<=rec.njob;i++) I* scan for ESC *I for @=l;p<=rec.seqlength[i];p++) rec.prework[i][p]=atof(rep.prework[i][p]); } wn-frmcls(fim3); if(interr==l 11 1) {wn-clr(wns); wn-close(wns); return(2222);) I* scan for F2 *I

I* reinitialize form3 and reopen for probability of scrap *I j=O; ma;frm3=wn_frmopn(27); wn-locate(wns, l4,2); wn-printf(wns,"** Probability of SCRAP for station sequences for this job ** "); for(p=l ;p<=rec.seqlength[k];p++) ( if@<15) { if(rec.step[k][p]=O) wn-gfloat (SET,!im3,m,wns,l6j+3, "",atrib,fchar,&rec.pscrap[k][p],4,2,0.0,0.0,rep.pscrap[k][p],hmsg,emsg1); else wn-gfloat (SET,frm3,m,wns,l6,j+3, "",atrib,fchar,&rec.pscrap[k][pJ,4,2,0.0,(1- rec.prework[kI ~pl),~p.~~~~ap~kl[pl,hmsg,emsg4); j=j+S; if@==14)j=O; ) else ( if(rec.step[k][p]!=O) wnsfloat (SET,frm3,m,wns,l8j+5, "",arrib,fchar,&rec.pscrap[k][p],4,2,0.0(1- ~c.p~work[kI~pl),rep.pscrap~kl~pl,hmsg,emsg4); else wnsfloat (SET,frm3,m,wns,l8j+5, "",atrib,fchar,&rec.pscrap[k][p],4,2,0.O,O.O,rep.pscfap[k][p],hmsg,emsgl); j=j+S; ) m=m+ 1; I* increment field index *I 1 wn_putsa(wns,21,15," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); if(!(interr=wn-frmget(frm3))) { I* get (read) form4 *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!\nW); exit(1); 1

if( wns-escape) ( for (i=l;i<=rec.njob;i++) ( for @=1;p<=rec.seqlength[i];p++) ~c.~~~~~~~il[~l=atof(rep.ps~ap~il[pl);}) wn-frmcls(frm3); I* close form *I

wn-clr(wns); if(interr==l111) ( wn-close(wns); retum(2222);) I* scan for F2 *I 1 wn-close(wns); I* close window *I

) I* closing the else loop when inspection flag is true *I I* Display for obtaining station numbers for operation sequences & rework *I jobflag-1 =O; jobflag-2=0; I* initialize flags *I if (rec.njob<5) njobO=rec.njob; else njobk-4; if (rec.njob>4 && rec.njob8) { jobflagl=l; jobflag2=1; njob04; njobl=4; njob2=rec.njob-8; }

atrib = (WHITE<<4) IBLACKI BOLD; I* field attribute *I wns = wn~open(800,1,2,70,22,(BLUE<<41YELLOWIBOLD),(CYAN<<4l~LLOWlBOLD)); if(!(wns)) { I* errors ?? *I printf("wnppen failed!!\nW); I* tell of woe... *I exit(1); } I* and die *I wn-title(wns," >> ROUTING SEQUENCE FOR EACH JOB << "); wn-printf(wns," JOB#s Station Sequences for operationh"); wn-printf(wns," (Valid stations include: 1 - %d) ",rec.nstation); emsg2="Enter correct value (range same as number of stations defined)!!!"; hmsg="%sequences%"; wn-putsa(wns,21 ,16," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); I* printing the sequences *I m=O; p=O; for&=l;k<=njobO;k++){ j=O; I* initialize column index *I wn-locate(wns,k+p+2,l);wn-printf(wns,"JOB#%d,k); wn~locate(wns,k+p+3,l);wn~printf(wns,"S.L=%d",rec.seqlength[k]); for(i=l;i<=rec.seqlength[k];i++) { wn-locate(wns,k+p+4,1);wn-printf(wns,"Rew=%d",rec.stepF][i]); if (ie16) { I* first 15 operations *I wnjint (XEQ,NFRM,NFLD,wns,k+p+2j+7, "",atrib,fchar,&re~.sequence[k][i],2,1 ,rec.nstation,rep.sequence[k][i],hmsg,emsg2); j=j+3; if(i==l5) j=O; 1 else { wnsint (XEQ,NFRM,NFLD,wns,k+p+4j+7, "",atrib,fchar,&ec.sequence[k][i],2,1,rec.nstation,rep.sequence[k][i],hmsg,emsg2); j=j+3; 1 if (wns-escape){ rec.sequenceF][i]=atoi(rep.sequence[k][i] );} I* Pop up message for user to input rework steps *I if (rec.statype[rec.sequence[k][i]] = 3) { if(rec.seqlength[k]>=i+rec.step[k][i]) ( wnl= ~~-O~~~(~~~,~~,~~,~O,~,(BLACK<<~~GREENIBOLD),@LACK<<~~WHITEIBOLD)); if(!(wnl)) { I* errors ?? *I printf("wn-open failed!!\nW); I* tell of woe... *I exit(1); } I* and die *I wngrintf(wn1,'ln NOOTE!!! Specify %d rework sequencel',rec.step~[i]); wngrintf(wnl,"\n for each job. "1; wngrintf(wn1,'ln This includes only rework stations."); wngrintf(wn1,'In DO NOT enter INSPECTION station!\nW); wn-printf(wn1,'ln Press any key ... "); v_getchO; wn-clr(wn1); wn-close(wn1); I* close window */ I* accepting rework inputs alone */ i=i+l ; m=i; I* initialize length index */ if(m<= rec.seqlength[k]) ( do (if(m< 16) wnsint (XEQ,NFRM,NFLD,wns,k+p+2j+7, "",atrib,fchar,&e~.sequence[k][m],2,1 ,rec.nstation,rep.sequence[k][m],hmsg,emsg2); else wn_gint (XEQ,NFRM,NFLD,wns,k+p+4j+7, "",atrib,fcharl&rec.sequence[k][m],2,1 ,rec.nstation,rep.sequence[k][m],hmsg,emsg2); ) while (rec.statype[rec.sequence[k][m]] == 3); 1 if (wns,escape)( rec.sequenceF] [m]=atoi(rep.sequence[k][m]); } j=j+3; 1 else ( wn1 = wn~open(800,16,37,40,7,(BLACK<<41GREENIBOLD),(BLACK<<41WHITEIBOLD)); if(!(wnl)) ( I* errors ?? */ printf("wn-open failed!!\nV); I* tell of woe... */ exit(1); ) /* and die */ wnsrintf(wn1 ,"inNOTE !! Sequence length for job "); wn~rintf(wn1,'lnis insufficient to fit in all"); wnjrintf(wn1,'ln rework stations. Hence,inspectionW); wn_printf(wnl,'ln operation cannot be allowed !!"); wnsrintf(wn1 ,'ln\n Press any key ...."); v_getchO; wn-clr(wn 1); wn-close(wn 1); j=j-3; i4-1; 1 I 1 P=P+~; I* increment column index */ I wn-clr(wns); wn-close(wns); I* close window */ if (jobflagl) /* flag check for next screen */ { wns = wn-open(800,l ,2,7O822,(BLUE<<41YELLOWIBOLD),(CYAN<<41WlBOLD)); if(!(wns)) { I* errors ?? */ printf("wn-open failed!!\nW); I* tell of woe... */ exit(1); } /* and die */ wn-title(wns,">>> OPERATION SEQUENCES FOR JOBTYPES CONTINUED....<<< "); wngrintf(wns," JOB& Station Sequences for operation\n "); wngrintf(wns," (Valid stations include: 1 - %d) ",rec.nstation); wnqutsa(wns,21 ,16," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEI BOLD); I* again print the sequences... */ m=O; p=O; /* field and row indices */ for(k=l ;k<=njob1 ;k++) ( j=O; /* column locator */ wn_locate(wns,k+p+2, l);wnqrintf(wns,"JOB#%d8',k+4); wn,locate(wns,k+p+3,l);wn~printf(wns8"S.L=%d",rec.seqlength~+4]); for(i=l ;i<=rec.seqlength[k+4];i++) ( wn~locate(wns,k+p+4,l);wn~pnntf(wns,"Rew=%d8',~c.step[k+4][i]); if (ic16) ( wnjint (XEQ,NFRMlNFLD,wns,k+p+2,j+7, "",atrib,fcharI&rec.sequenee[k+4][i],2,l ,rec.nstation,rep.sequence[k+4][i],hmsg,emsg2); j=j+3; m=m+l; I* increment indices *I if(i=l5) j4; ) else ( wn-gint (XEQ,NFRM,NFLDIwns,k+p+4,j+7, "",atrib,fchar,&re~.sequence[k+4][i],2,1 ,rec.nstation,rep.sequence[k+4][i],hmsg,emsg2); j=j+3; m=m+l; ) if (wns-escape) (rec.sequence[k+4][i]=atoi(rep.~equence[k+4][i] ); ) I* Pop up message for user to input rework steps *I if (rec.statype[rec.sequenceF+4][i]] = 3) { if((i+l -rec.step[k+4][i]) >0) { wnl = wn~open(800,16,37,40,6,(BLACK<<4lGWENIBOLD),(BLACK<

I* accepting rework inputs alone *I i=i+l; m=i; I* initialize length index *I if(mc= rec.seqlength[k+4]) ( do ( if (me 16) wn-gint (XEQ,NFRM,NFLD,wns,k+p+2j+7, "",atrib,fchar,&re~.sequence[k+4][m],2,1 ,rec.nstation,rep.sequence[k+4][m],hmsg,emsg2); else wn-gint (XEQ,NFRM,NFLD,wns,k+p+4J+7, "",atrib,fchar,&re~.sequence[k+4][m],2,1 ,rec.nstation,rep.sequence[k+4][m],hmsg,emsg2); ) while (rec.statype[rec.sequence[k+4][m]] == 3); 1 if (wns-escape) { rec.sequence[k+4][m]=atoi(rep.sequenc~+4][m] ); ) j=j+3; 1

else { wnl = wn~open(800,16,37,40,7,(BLACK<<4lGWENIBOLD),(BLACK<<4lWH~lBOLD)); if(!(wnl)) ( I* errors ?? *I printf("wn-open failed!!\nm); I* tell of woe.. . *I exit(1); } I* and die *I wngrintf(wn1,'ln NOTE !! Sequence length for job "); wn_printf(wnl,"\n is insufficient to fit in all"); wn-printf(wn1 ,'ln rework stations. Hence,inspectionl'); wnqrintf(wn1,'ln operation cannot be allowed !!"); wnjrintf(wn1 ,'ln\n Press any key.."); v_getch(); wn-clr(wn1); wn-close(wn1); I* clear and close windows *I j=j-3; i=i-1; } 1 I p=p+4; I* increment index *I 1 wn-clr(wns); wn-close(wns); I* close window *I I /* starting third screen for sequences *I if (jobflag-2) I* check flag to activate third screen *I 1 atrib = (WHITE<<4) IBLACKI BOLD; I* field attribute *I wns = wn~open(800,1,2,70,22,(BLUE<<41YELLOWIBOLD),(CYAN<<4lY~OWlBOLD)); if(!(wns)) { I* errors ?? *I printfrwn-open failed!!\,"); I* tell of woe ... *I exit(1); ] I* and die *I wn-title(wns,">>> OPERATION SEQUENCES FOR JOBTYPES CONTINUE...<<< "); wngrintf(wns," JOB#s Station Sequences for operationh "); wn-printf(wns," (Valid stations include: 1 - %d) ",rec.nstation); wn-putsa(wns21 ,16," ESC (Save & Skip) F1 (Help) ",(NVIDE0<<4) IBLUEl BOLD); I* printing the sequences.. *I m=O; p=O; for&= 1;k<=njob2;k++) j=O; wn~locate(wns,k+p+2,I);wn~printf(wns,"JOB#%d",k+8); wn_locate(wns,k+p+3,l);wn~printf(wns,"S.L=%d",recrecseqlength~+8]); for(i= 1;i<=re~.seqlength[k+8];i++) { wn~locate(wns,k+p+4,1);wn~printf(wns,"Rew=%d1'~c.stepF+8][i]); if (i<16) { wn-gint (XEQ,NFRM,NFLD,wns,k+p+2j+7, "",atrib,fchar,&rec.sequence[k+8][i],2.1 ,rec.nstation,rep.sequence[k+8][i],hmsg,emsg2); j=j+3; m=m+l; if(i==lS) j=O; ] else { wnsint (XEQ,NFRM,NFLD,wns,k+p+4j+7, "",atrib,fchar,&re~.sequence[k+8][i],2,1 ,rec.nstation,rep.sequence[k+8][i],hmsg,emsg2); j=j+3; ] if (wns-escape) {rec.sequence[k+8][i]=atoi(rep.sequence&+8][i] ); ) I* Pop up message for user to input rework steps *I if (rec.statype[rec.sequenc&+8][i]] == 3) { if((rec.seqlength[k]-i+l-rec.stepF+8][i]) >=0) { wn1 = wn~open(800,16,37,40,6,(BLACK<<4lG~ENlBOLD),@LACK<<41WHITEIBOLD)); if(!(wnl)) { I* errors ?? *I printf("wn-open failed!!hW); I* tell of woe... *I exit(1); ] I* and die *I wnsrintf(wn1,'%I NOTE! !! Specify %d rework sequence",rec.step[k+8][i]); wn-printf(wn1,'ln for each job. "); wn-printf(wnl."\n This includes ONLY rework stations."); wn-printf(wn1 ,'%I DO NOT enter INSPECTION station!"); wn$rintf(wnl,"\n "); v_getchO; wn-clr(wn1); wn-close(wn I);

I* accepting rework inputs alone *I i=i+l ; m=i; I* initialize length index *I if(m<= rec.seqlength[k+8]) { do {if(m<16) wnjint (XEQ,NFRM,NFLD,wns,k+pt2jt7, "",atrib,fchar,&re~.sequence[k+8][m],2,1 ,rec.nstation,rep.sequence[k+8][m],hmsg,emsg2); else wn~int(XEQ,NFRM,NFLD,wns,k+p+4 j+7, "",atrib,fchar,&re~.sequence[k+8][m],2,1,rec.nstation,rep.sequence[k+8][m],hmsg,emsg2); ) while (rec.statype[rec.sequence[k+8][m]] == 3); 1 if (wns-escape)( rec.sequence[k+8][m]=atoi(rep.sequence@+8][m] );) j=j+3; 1 else ( wnl = ~~-O~~~(~~~,~~,~~,~~,~,(BLACK<<~~G~ENIBOLD),@LACK<<~~~BOLD)); if(!(wnl)) { I* errors ?? *I printf("wn-open failed!!\nV); I* tell of woe ... *I exit(1); ) I* and die *I wn-printf(wn1,"b NOTE !! Sequence length for job "); wn-printf(wn1,'b is insufficient to fit in all"); wn-printf(wn 1,'b rework stations. Hence,inspectionW); wnqrintf(wn 1,'%I operation cannot be allowed !!"); wn-printf(wnl,'ln\n Press any key..."); v_getch(); wn-clr(wn1); wn-close(wn1); j=j-3; i=i-l; ) I* increment indices *I 1

1 wn-clr(wns); I* clear window *I wn-close(wns); I* close window *I ) I* End of third and final display for sequences *I

I* Defining text prompt for pdf s inputted earlier *I

atrib = (WHITE<<4) IBLACKI BOLD; I* field attribute *I wnd = wn~open(800,0,26,49,23,(BLACK<<41WHITE),@LACK<<4ICYANIBOLD)); if(!(wnd)) ( I* errors ?? *I printf("wn-open failed!!bn); I* tell of woe... *I exit(1); } I* and die *I wn-title(wnd,"++> P.D.F LOOK-UP TABLE <+++"); wngrintf(wnd," Enter appropriate digit(s) given in yellow "); atrib = (BLACK<<4) IYELLOWI BOLD; wn-putsa(wnd,l,O,"O",atrib); I* print only certain char in red *I wn-locate(wnd, l,3); wnqrintf(wnd,"None"); I* printing distribution table *I for(i=l ;i<=rec.ndistrib;i++) ( if (i>20) { atrib = (BLACK<<4) IYELLOWI BOLD; I* only number string in red *I itoa(i,num-str, 10); wn-putsa(wnd,i- 19.25,num-str,atrib); wn~locate(wnd,i-19,28);wn~printf(wnd,"%s",pdfname[recI~function[i]]); wn-locate(wnd,i-19,32);wngrintf(wnd,"%4.2f ,reel-param-1[i]); wn-locate(wnd,i-19,38);wn-printf(wnd,"%4.2f",recl_param_2[i]); wn-locate(wnd,i-19,44);wn~printf(wnd,~c1-param-3[i]); 1 else { atrib = (BLACKe4) IYELLOWI BOLD; itoa(i,num-str, 10); wn-putsa(wnd,i+ l ,O,num-str,atrib); wn~locate(wnd,i+l,3);wngrin~(wnd,"%s",pdfname[recl~function[i]]); wn-locate(wnd,i+l,7);wngrintf(wnd,"%4.2f',reel-param-1 [i]); wn-locate(wnd,i+l,13);wnqrintf(wnd,"%4.2f ',reel-paramam2[i]); wn-locate(wnd,i+l,l9);wngrintf(wnd,"%4.2f',rec lqaram_3[i]); 1 1 I* Popup a prompt window *I wn 1 = wn~open(800,11,20,50,7,(BLACK>> NOTE <<<"); wn-printf(wn1,'ln SETUP times may ONLY be defined for MACHINING "); I* print message *I wngrintf(wn 1 ,'b stations. For other stations it is defined "); wnqrintf(wn1,'b as ZERO. However, Process times may be"); wn-printf(wn 1,'b defined for all station types."); wn-printf(wn1,'Wn Press any key ... "); v_getch(); wn-clr(wn 1); /* clear contents of prompt window wnl *I wn-close(wn1); I* close prompt window wnl *I I* close prompt window and obtain input *I I* input for arrival, setup and process times for each job at each station *I I* seqlength max is 25 - split input forms into 3 windows *I wngutsa(wnd,22,5," ESC (Save & Skip) FI (Help) ",(NVIDE0<<4) lBLUEl BOLD); for (k=l;k<=rec.njob;k++) I* set all flags *I I jobflagl=l ;jobflag2=0; jobflag34; lenseq 1=rec.seqlengtR[k]; if (rec.seqlength[k] > 10) {jobflag2=l;lenseql=lO;lenseq2=re~.seqleng~k]-10;) if (rec.seqlength[k] > 20) { jobflag_3=1 ;lenseq 1=10;1enseq2=10;1enseq3=rec.seq1ength[k]-20;)

aaib = (WHITEc<4) IBLACKl BOLD; I* field attribute *I wns = wn~open(800,0,0,24,23,(BLUE<<4l~LLOWIBOLD),(CYAN~~4l~~OWlBOLD)); if(!(wns)) { I* errors ?? *I printf("wn-open failed!!\nH); I* tell of woe... *I exit(1); j I* and die *I wn-title(wns,"ARRIVAL & OPERATION TIME"); wn-printf(wns," JOBTYPE #: %d \nU,k); wngrintf(wns,"InterArrival Time :"); emsg2=" Enter the distribution number (in red): Press a key to continue..."; emsgl="Only machining stations have setup times defined; others default to ZERO !!"; hmsg="%operate times%"; frm2=wn-frmopn(25); I* open form 2 with 25 fields *I if(!frm2) { /* errors ?? */ printfrwn-frmopn failed!!\nW); /* tell of woe... *I exit(1); j /* and die */

m=O ; /* initialize field index */ wn-gint (SET,frm2,m,wns,l,21, "",atrib,fchar,&rec,arrdno[k],2,1 ,rec.ndistrib,rep.arrdno[k],hmsg,emsg2); I* get integer input into buffer */ /* Should this block be repeated */ j=O; m=l; /* set row and field indices */ wn-locate(wns,2,8);wnwnprintf(wns,"SetupProcess"); wn-locate(wns,3,8);wn-printf(wns,"Times Times"); for(i=l;i<=lenseql;i++) I* for first ten stations sequences */ ( wn-locate(wns,i+3+j,l); wn-printf(wns,"%sn,stat-nme[rec.statype[rec.sequence[k][i]]]); if (rec.statype [rec.sequence[k][i]]==2) wn~int(SET,frm2,m,wns,i+3+j,lO, "",atrib,fchar,&rec.setdno[i][k],2,0,rec.ndistrib,rep.setdno[i]~],hmsg,emsg2); else wn-gint (SET,frm2,m,wns,i+3+j,10, "",atrib,fchar,&rec.setdno[i][k],2,0,0,rep.setdno[i][k],hmg,emgl); m=m+ 1; wn-gint (SET,frm2,m,wns,i+3+j,20, "",a~b,fchar,&rec.prodno[i][k],2,0,rec.ndistrib,rep.prodno[i][k],hmsg,emsg2); m=m+l ;j++; 1

if(!(interr=wn-frmget(fim2))) { /* get (read) form */ v-cls(7); /* die if errors !! *I vwnlocate(60,60,60); printf("Memot-y Corruption Error!\nW); exit(1); 1 if(wns-escape){ rec.arrdnoF]=atoi(rep.arrdno[k]); for (i=l;i<=lenseql;i++) ( /* save and skip */ rec.setdno[i][k]= atoi(rep.setdno[i][k]); rec.prodno[i][k]= atoi(rep.prodno[i][k]); } 1

wn-frmcls(frm2); /* close form */ wn-clr(wns); /* clear window */ if(intem==l111) {wn-clr(wnd); wn-close(wnd); I* close main window */ wn-close(wns); retum(2222); } /* scan for F2 to exit *I

I* next display for setup and process times for operations between 11-20 *I if (jobflag2) I* check flag to next form for same job*/ { frm2=wn-frmopn(25); if(!frm2) { I* errors ?? */ printf("wnfrmopn failed!!\nW); I* tell of woe.. . */ exit(1); } I* and die */ wnwnlocate(wns,0,8);wn_printf(wns," JOBTYPE # %dH,k);/* print headers */ wn-locate(wns,l,8);wn_printf(wns,"SetupProcess"); wn-locate(wns,2,8);wngrintf(wns,"Times Times "); j=O; m=O; I* initialize index *I for(i=l ;i<=lenseq2;i++) { wnlocate(wns,i+3+j,l); wngrintf(wns,"%s",stattnme[rec.staty~uence][i+10]]]); if (rec.statype[rec.sequence[k][i+l0]]==2) wnjint (SET,frm2,m,wns,i+3+j,10, "",atrib,fchar,&rec.setdno[i+l0][k],2,O,rec.ndis~b,rep.setdno[i+lO]~],hmg,emsg2); else wnsint (SET,frm2,m,wns,i+3+j,lO, "",atrib,fchar,&rec.setdno[i+l0][k],2,O,O,rep.~tdno[i+lO][k],hmg,emgl); m=m+ 1; wnjint (SET,frm2,m,wns,i+3+j,20, "",atrib,fchar,&ec.prodno[i+l0][k],2,O,rec.ndistrib,rep.prodno[i+lO] [k],hmsg,emsg2); m=m+ 1;i++; 1 if(!(interr=wn-frmget(frm2))) { I* get (read) form4 *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!\nU); exit(]); 1 if( wns-escape) for (i=l;ic=lenseq2;i++) { rec.setdno[i+lO][k]= atoi(rep.setdno[i+lO]F]); rec.prodno[i+lO][k]= atoi(rep.prodno[i+lO][k]); ) wn-frmcls(frm2); I* close form *I wn-clr(wns); I* clear window *I if(interr==l 1 11) {wn-clr(wnd); wn-close(wnd); I* close main window *I wn-close(wns); return(2222); ) I* scan for F2 to exit *I 1 I* closing second display for setdno and prodno *I

I* display the last five fields of operation time for same jobtype....*/ if (jobflag3) I* check flag before display *I { I* opening third display *I frm2=wn_frmopn(25); if(!frm2) { I* errors ?? *I printf("wn-frmopn failed!!\nm); I* tell of woe ... *I exit(1); ) I* and die *I j=O; m=O; I* initialize index *I wnlocate(wns,0,8); wnqrintf(wns," JOBTYPE # %dM,k); wn-locate(wns, 1,8);wnqrintf(wns,"Setup Process"); wn-locate(wns,2,8);wngrintf(wns,"TimesTimes "); for(i= 1;ic=lenseq3;i++) { wn-locate(wns,i+3+j,l); wn-printf(wns,"%s",stattnme[rec.statype[rec.sequence~][i+20]]]); if (rec.statype[rec.sequenceF] [i]]==2) wnjint (SET,frm2,m,wns,i+3+j,10, "",atrib,fchar,&rec.setdno[i+20][k],2,0,rec.ndisttib,rep.setdno[i+20]~],hmg,emsg2); else wnsint (SET,frm2,m,wns,i+3+j,lO, "",atrib,fchar,&rec.setdno[i+20][k],2,0,0,rep.setdno[i+20][k],hmg,emg 1); m=m+l ; wnsint (SET,frm2,m,wns,i+3+j,20, "",atrib,fchar,&ec.prodno[i+20][k],2,0,rec.ndistrib,rep.prodno[i+20][k],hmsg,emsg2); m=m+l;j++; I if(!(interr=wn-frmget(fim2))) { I* get (read) form4 *I v-cls(7); I* die if errors !! *I v_locate(60,60,60); printf("Memory Corruption Error!\nN); exit(1); 1 I* save and skip *I if( wns-escape) for (i=l ;i<=lenseq3;i++) { rec.setdno[i+20][k]= atoi(rep.setdno[i+20][k]); rec.prodno[i+20]F]= atoi(rep.prodno[i+20][k]); }

wn-frmcls(frm2); I* close form *I

} I* closing third display for setdno and prodno *I wn-clr(wns); wn-close(wns); I* close window *I if(interr==llll) { wn-clr(wnd); wn-close(wnd);retum(2222);}I* scan for F2 to exit */ } I* finally exiting display for operation times *I wn-clr(wnd); wn-close(wnd); I* close main window *I

I* Open replication display *I wn = wn_open(800,3,3,61,13,(CYAN~~41WHITEIBOLD),(BLUE<<4IYELLOWIBOLD)); if(!(wn)) ( I* errors ?? *I printf("wn-open failed!!\nW); I* tell of woe... *I exit(1); } I* and die *I I* &fine title of input form and error messages for each field *I wn-title(wn,">>> SIMULATION RUN DATA ccc"); emsg 1 = "Invalid value(range :1 -999), press any key to continue..."; emsg2 = "Invalid value(range :1-999999), press any key to continue..."; emsg3 ="Invalid value(range : 0-999999.99), press any key to continue...";

hmsg="%run data%"; atrib = (BLUEcc4) IYELLOWI BOLD; I* field attribute *I fnn3 = wn-frmopn(6); /* form 3 open for max. 6 fields *I if(!frm3) { I* errors ?? *I printf("wn-frmopn failed!!\nn); I* tell of woe... *I exit(l);} I* and die *I atrib = (WHITE<<4) IBLACK I BOLD; I* input field attribute *I wn-printf(wn,"\n Specify the following for execution of simulation model"); wnsint (SET,fnn3,0, wn,4,8, "No. of simulation runs : ",atrib,fchar,&rec.numrep, 3,1,999 ,rep.numrep,hmsg,emsgl); wn_gfloat(SET,frm3,2, wn,8,8, "Begin time of first run : ",atrib,fchar,&ec.begintime,9,2,0.0,999999.99,rep.begintime,hmg,emg3); wn~long(SET,fnn3,1, wn,6,8, "Length of each run : ",atrib,fchar,&rec.length, 6,1,999999,rep.length,hmsg,emsg2); wn_gfloat(SET,fnn3,3, wn,10,8, "WarmUp for steady state : ",atrib,fchar,&rec.warmup,9,2,0.0,999999.99,rep.warmup,hmsg,emsg3); wnqutsa(wn,l2,8," ESC (Save & Skip) F1 (Help) ",(NVIDEOcc4) IBLUEI BOLD); if(!(interr=wn_frmget(frm3))) { I* get (read) form */ v-cls(7); I* die if errors !! *I v-locate(60,60,60); printf("Memory Corruption Error!\nW); if(wns-escape){ rec.numrep= atoi(rep.numrep); I* save and skip */ rec.length=atol(rep.length); rec.begintime=atof(rep.begintime); rec.warmup=atof(rep.warmup); 1 wn-hcls(frm3); I* close form */ wn-clr(wn); I* clear window */ wn-close(wn); I* close window */ if(interr=llll) return(2222); I* scan for F2 to exit */ I* Phew ... ending all those displays...!!!*/ clrscro; I* clearing the screen */ I* input summary report */ wn = wn~open(1000,1,1,78,23,(BLUE<<41YELLOWIBOLD),(BLUE~c4lYELLOWlBOLD)); if(!(wn)) { /* errors ?? */ printf("wn-open failed!!bV); I* tell of woe ... */ exit(1); } I* and die *I I* define title of input form and error messages for each field */ wn-title(wn,">>> INPUT SUMMARY: MANUFACTURING SYSTEM CONFIGURED

wn-printf(wn," Queue Capacity: "); for (i=l ;i<=rec.nstation;i++)I wnqrintf(wn,"W,rec.qcapacity[i]); if (i=rec.nstation) wn-printf(wn,'bW); else wn-printf(wn,","); } wn-printf(wn," Queue Selection Rule for processing jobs: "); switch(rec.npriority) { case 1: wngrintf(wn," FIFO b"); break; case 2: wn_printf(wn," LIFO b"); break; 1 wn-printf(wn,ll No. of operaters I workers: %d\nW,rec.nsecres); wn-printf(wn," Interarrival times for jobs/parts:\n "); for (i=l;i<=c.njob;i++) { switch(recl~function[rec.arrdno[i]]) ( case 1: wn-printf(wn,"EXPO(%5.2f) ",reclgaram_l[rec.arrdno[i]]); break; case 2: wnqrintf(wn,"NORM(%5.2f,%5.2f) ",recl_paramaml[rec.arrdno[i]], rec 1-paramam2[rec.arrdno[i]]); break; case 3: wn-printf(wn,"LOGN(%5.2f,%5.2f) ",recl_param-l[rec.arrdno[i]], recl_paramam2[rec.arrdno[i]]); break; case 4: wn-printf(wn,"TRIA(%5.2f,%5.2f,%5.2f) ",re~l_param~l[rec.arrdno[i]], recl_paramam2[rec.arrdno[i]],recl_param~3[rec.arrdno[i]]); break; case 5: wn-printf(wn,"ERLA(%5.2f,%5.2f) ",recl~param~l[rec.arrdno[i]], rec l_param_2[rec,arrdno[i]]); break; case 6: wngrintf(wn,"UNIF(%5.2f,%5.2f) ",recl_paramaml[rec.arrdno[i]], rec 1-param-2[rec.arrdno[i]]); break; case 7: wn-printf(wn,"CONST(%5.2f)",reel-param-1 [rec.arrdno[i]]); break; case 8: wnqrintf(wn,"POIS(%5.2f) ",reel-param-l[rec.arrdno[i]]); break; 1 if (i==5) wn-printf(wn,'b '7; 1 if (f-inspect==l) { wn-printf(wn,'ln Detection Probability for faulty parts :\n "); for (i=l;i<=rec.njob;iu)( wn-printf(wn,"%5.2f',rec.pinspect[i]); if (iuec.njob) wn-printf(wn,", "); 1 1 if (f-load= 1) { wn-printf(wn,'ln Fixture Capacity: "); for (i=l;i<=rec.njob;iu){ wn-printf(wn,l%d ,rec.fixture[i]); if (iuec.njob) wn-printf(wn,", "); 1 wn_printf(wn,'ln Lotsize for jobs: "); for (i=l;i<=rec.njob;i++) ( wn_printf(wn,"W",rec.lotsize[i]); if (i>> Press [SHIFT]+[PrintScreen] to print OR any key to continue <<<",(CY AN<<4)1(YELLOWl BOLD)); v~etch(); wn-clr(wn); wn-close(wn);

I* to save input model in a file *I strcpy(boo1," "); emsg l="Press Y' or 'N"'; wnl = wn~open(800,9,10,58,5,~LACK<<4ICYAN),(BLACK~~4lW~lBOLD)); wn-title(wnl,"<< SAVE MODEL >>"); wn_gbool(XEQ,NFRM,NFLD,wn1,1,l,"Do you want to save this data:",atrib,fchar,&m,bool,NSTR,emsgl); if(wns-escape) ma; if (m){wn_gtext(XEQ,NFRM,NFLD, wnl,l,l, "Enter file name (with no extension):",atrib,fchar, 11 ,filename,NSTR,NSTR); strcpy(fi1ename1 ,filename); strcat(fi1ename1 ,".INPW); write-file(filenarne1); exp-flag= 1; 1 else {write-file("last.inpl'); /* default file for storing input *I exp-flagd; 1 wn-clr(wn1); I* clear fields in window wnl *I wn-close(wn 1); /* close window wnl *I I* input module completed...*/ return(NULL); I* keep the happy *I

I* +++++++++++++++++++++SimanFile ...... void sirnan-file(char *sl) { int c,i,j; char stat~name[lO],numb[lO]; FILE *@out; fpout=fopen(sl,"w"); I* module for translating data into SIMAN experimental file *I printf(" Generating %s.... Please WaitbW,sl); fprintf(fpout,"BEGIN;b;WROJECT,%s,%s;b;bDISCRETE,,3,20,21;b",rec.model~name,rec.uname); fprintf(fpout,";bATI'RIBUTES : 1, TimeIn:b\t\t2, Priority:b\At3, Flag;\n;bM); fprintf(fpout,"VARIABLES : l,NSta, %d:b",rec.nstation); fprintf(fpout,'lt 2, Nopr, %d:b",nopr); fprintf(fpout, "\t 3, Njob, %d:bn,rec.njob); c=rec.nstation+3; fprintf(fpou6 '7t 4 - %d, StaType(%d) ",c,rec.nstation); for(i=l ;i<=rec.nstation;i++) fprintf(fpout,",%d",rec.statype[i]); fprintf(fpout,":b\t %d - %d, QCapacity(%d) ",c+l,c+rec.nstation,rec.nstation); for(i=l;i<=rec.nstation;i++) {if (i==l 1) fprintf(fpout,"b\t"); fprintf(fpout,", %d",rec.qcapacity[i]); 1 for(i=l;i<=nopr;i++) { for(j=l;j<=rec.njob;j++) if (rec.setdno[i]u]==O) fprintf(fpout,", 41 "); else fprintf(fpout,",%d",rec.setdno[i]lj]); fprintf(fpout,"\n\At\t\tW); 1 c=c+(rec.njob*nopr); fprintf(fpout,":\n\t %d - %d, ProDNo(%d,%d) ",c,c+(rec.njob*nopr)-l,rec.njob,nopr);

for(i=l;i<=nopr;i++) ( for(i=l;jc=rec.njob;j++) if (rec.prodno[i]Lj]=O) fprintf(fpout,", 41"); else fprintf(fpout,",%d",rec.prodno[i]~]); fprintf(fpout,'b\At\t\t"); 1 c=c+(rec.njob*nopr);

fprintf(fpout,":\n\t\t %d, TempNjob, %d;\n;\n",c+rec.njob,rec.njob); fprintf(fpout,"STATIONS :\tV); for (i=l ;ic=rec.nstation;i++) { itoa(i,numb,10); strcpy(stat_name, "MSta"); strcat(stat-name, numb); fprintf(fpoutll'%d,%s:\n\AAt",i,stat-name); 1 fprintf(fpout,"26, Finish;\n;\nQUEUES : 'I); for (i=l;ic=rec.nstation;i++){ itoa(i,numb,lO); strcpy(stat-name, "QMSta"); strcat(stat-name, numb); if (rec.npriority== 1) fprintf(fpout,"%d, %s, FIFOU,i,stat-name); else fprintf(fpout,"%d, %s, LIFO",i,stat_name); if (i=rec.nstation) fprintf(fpout,";\n;\nRESOURCES :"); else fprintf(fpout,":\n\t\t\tW); 1

fprintf(fpout,"%d, Operator", rec.nstation+l); if (rec.nsecre-0) fprintf(fpout,", %d,rec.nsecres); fprintf(fpout.":\n\t\t\tW); c=rec.nstation+Z; I* increment counter by two *I if (f-splres>O) { if(f-splreo 1) fprintf(fpoutW%d - %dl Fixture(%d) ",c,c+f-splres- 1,f-splres); else fprintf(fpout,"%d, Fixture(l)", c); for(i=l;ic=rec.njob;i+t) fprintf(fpoutlU,%d", rec.fucture[i]); 1 else fprintf(fpout,"%d, Fixture(l)", c); fprintf(fpout,";\n;\n"); fprintf(fpout,"DISTRIBUTIONS: "); for(i=l ;i<=rec.ndistrib;i++){ switch(rec1-function[i]) { case 1: { fprintf(fpout,'lt%d EXPO(%5.2f)",i,rec1-param-1 [i]); break; 1 case 2: { fprintf(fpout,'lt%d, NORM(%5.2f, %5.2f)",i,rec 1-param-1 [i],rec1-param-2[i]); break; 1 case 3: {fprintf(fpout,'7t%dlL0GN(%5.2f,%5.2f)",i,rec1~paramam1[i],rec1_parmam2[i]); break; 1 case 4: ( fprintf(fpoutl'7t%d, TRIA(%5.2fl%5.2f,%5.2f)",i,recl-param-1 [i],rec1~param~2[i],rec1~arm~3[i]); break; 1 case 5: { fprintf(fpout,"\t%d, ERLA(%5.2f,%5.2f)",i,recl-param-1[i],recl-paramam2[i]); break; 1 case 6: { fprintf(fpout,"\t%d, UNIF(%5.2f,%5.2f)",i,recl-param-1 [i],recl-paramam2[i]); break; 1 case 7: { fprintf(fpout,"\t%d, %5.2f',i,reclgaram-1 [i]); break; 1 case 8: {fprintf(fpout,'lt%d,POIS(%5.2f)",i,recl-param-1 [i]); break; 1 1 if(i=rec.ndistrib){ fprintf(fpout,":\n\t41,0.0"); fprintf(fpoutW;\n;\n");) else fprintf(fpout,":\n\tW); 1 fprintf(fpout,"SEQUENCES :\nW); for(i=1 ;i<=rec.njob;i++) { fprintf(fpout."%d, ",i); for(j=l ;j<=rec.seqlength[i];j++) {if (i==14) fprintf(fpout,'7n\t1'); fprintf(fpout,lf%d&",rec.sequence[i]tj]); 1 if(i=re~.njob)fprintf(fpout,"26;\n;\n"); else fprintf(fpout,"26:\n "); 1 fprintf(fpout,"COUNTERS : "); c=O; for(i=l ;i<=4;i++)( for (i=l;ic=rec.njob;j++) { itoa(j,numb,lO); switch(i) { case 1: strcpy(stat-name, "Rework); break; case 2: strcpy(stat-name, "Scrap"); break; case 3: strcpy(stat-name, "Balkjob"); break; case 4: strcpy(stat-name, "Faulty"); break; 1 strcat(stat_name,numb); c=c+l; fprintf(fpout,'lt%d,%s ",c,stat-name); if (c==4*rec.njob) fprintf(fpout,";\n;\n"); else fprintf(fpout,":\n\t\t\tW); 1 1 fprintf(fpout,"TALLIES :\t\tW); for(i=l ;ic=rec.njob;i++){ itoa(i,numb,lO); strcpy(stat-name, "Time In System"); strcat(stat-name, numb); fprintf(fpout,"%d, %sw ,i,stat-name); if (i==rec.njob) fprintf(fpout,";\n;\nDSTATS:"); else fprintf(fpout,":\n\t\t\tl'); 1

for(i= l;i<=rec.nstation;i++) {fprintf(fpout,'lt\tad, (NQ(%d)/%d)*100, Stat%d Queue Util",i+rec.nstation,i~ec.server[i],i); if(i==rec.nstation) fprintf(fpout,";\n"); else fprintf(fpout,":\n\tW); 1 fprintf(fpout,"REPLICATE ,");

fprintf(fpout,"%d, ",rec.numrep); fprintf(fpout,"%9.2f, ",rec.begintime); fprintf(fpout,"%ld , , ,",rec.length); fprintf(fpout,"%9.2f;b;\n",rec.warmup); fprintf(fpout,"END;"); printf(" Generation of experimental frame in SIMAN completed...... "); fclose(fpout); 1 ...... Read-file +++++++++++++++++++++++++*I void read-file(char *sl) I static int i j,nsta,znjob,nopr; static long longn; static float fl ,f2,f3; static int nl ,n2,n3; FILE *fp; fp=fopen(sl,"rl');

I* begin reading the specified file *I fscanf(fp, "%16s %16sW,rec.mode1-name,rec.uname); fscanf(fp, "%d %d %d ",&nl ,&n2,&n3); if (!(rep.nstation = malloc(sizeof(n1)))) {printf("Not enough memory\n");exit(l);) itoa(nl,rep.nstation,10);

if (!(rep.njob = malloc(sizeof(n2)))) {printf("Notenough memory\n");exit(l);) itoa(n2,rep.njob, 10);

if (!(rep.npriority = malloc(sizeof(n3)))) (printf("Not enough memory\nW);exit(l);) itoa(n3,rep.npriority,lO); znjob=n2; nsta=nl ; for(i=l ;i<=nsta;i++) { fscanf(fp,"%d",&nl); if ((rep.statype[i] = malloc(sizeof(n1))) = NULL) {printf("Not enough memory to allocate buffer\nl');exit(l);} itoa(n I ,rep.statype[i],lO); 1 for(i=l ;i<=nsta;i++) {fscanf(fp,"%d",&nl); if (!(rep.qcapacity[i] = malloc(sizeof(n1)))) {printf("Not enough memory\n");exit(l);) itoa(n 1,rep.qcapacity[i], 10); 1 for(i=l ;i<=nsta;i++) { fscanf(fp,"%d,&n 1); if (!(rep.semer[i] = malloc(sizeof(n1)))) {printf("Not enough memoryb");exit(l);} itoa(n1,rep.semer[i],lO); 1 fscanf(fp, "%d ",&nl); if (!(rep.nsecres = malloc(sizeof(n1)))) {printf("Not enough memory\n");exit(l);) itoa(n1,rep.nsecres,lO); for(i=l ;i<=znjob;i++) {fscanf(fp,"Yod",&n I); if (!(rep.fixture[i] = malloc(sizeof(n I)))) {printf("Not enough memory\n");exit(l);) itoa(n 1,rep.fixture[i],lO); 1 for(i=l ;i<=znjob;i++) {fscanf(fp,"%dW,&n1); if (!(rep.lotsize[i] = malloc(sizeof(n1)))) {printf("Not enough memoryW);exit(l);) itoa(n1,rep.lotsize[i],lO); 1 fscanf(fp,"%d",&nl); if (!(rep.ndistrib = malloc(sizeof(n1)))) {printf("Not enough memory\nW);exit(l);} itoa(n 1,rep.ndistrib, 10); for(i=l ;i<=atoi(rep.ndistrib);i++) { fscanf(fp,"9hh %f %f %f',&nl,&fl,&fl,&f3); if ((repl-function[i] = malloc(sizeof(n1))) =NULL) {printf(ltNotenough memory to allocate buffeh"); exit(l);} itoa(n1,repl-function[i],lO);

if ((repl-param-1 [i] = malloc(sizeof(fl)+3)) =NULL) {printf("Not enough memory to allocate buffeh"); exit(1);) strcpy(replgaram-1 [i],addblank(f 1,l));

if ((replgaramaram2[i]= malloc(sizeof(f2)+3)) = NULL) {printf("Notenough memory to allocate buffer\nW);exit(l);} if ((repIgaram_3[i]= malloc(sizeof(f3)+3)) == NULL) {printf("Not enough memory to allocate bufferb"); exit(1);) strcpy(rep1-paramam3[i],addblank(f3, 1)); nopr=O; for(i=l ;i<=znjob;i++) { fscanf(fp,"%dU,&nl); if (!(rep.seqlength[i] = malloc(sizeof(n1)))) (printf("Not enough memory\n");exit(l);) itoa(n1 ,rep.seqlength[i], 10); nopr=max(nopr,n 1); 1 for(i= 1;i<=znjob;i++) { fscanf(fp,"%f',&fl); if (!(rep.pinspect[i] = malloc(sizeof(f1)))) {printf("Not enough memory\n");exit(l);) gcvt(fl,2,rep.pinspect[i]); 1 for(i= 1;i<=znjob;i++) ( for(i=l ;i<=atoi(rep.seqlength[i j);j++) { fscanf(fp,"%d",&nl); if (!(rep.step[i]Lj] = malloc(sizeof(n 1)))) {printf("Not enough memory\nV);exit(l);) itoa(n1 ,rep.step[i]Lj],lO); 1 1 for(i=l;i<=znjob;i++) I for(j=l ;i<=atoi(rep.seqlength[i]);i++) { fscanf(fp,"%f',&fl); if (!(rep.prework[i]Lj] = malloc(sizeof(f1)))) (printf("Not enough memory\n");exit(l);} gcvt(fl,2,rep.prework[i]~]); 1 for(i=l ;i<=znjob;i++) t for(j=l ;i<=atoi(rep.seqlength[i]);j++) ( fscanf(fp,"%f' ,&fl); if (!(rep.pscrap[i]lj] = malloc(sizeof(f1)))) {printf("Not enough memory\n");exit(l);) gcvt(f 1,2,rep.pscraptiILjl); 1 1 ( for(j=l ;j<=atoi(rep.seqlength[i]);j++) { fscanf(fp,"%d",&nl ); if ((rep.sequence[i]Lj] = malloc(sizeof(n1))) = NULL) (printf("Not enough memory to allocate buffehW);exit(l);) itoa(n1 ,rep.sequence[i]lj],lO); 1 1 for(i=l ;i<=znjob;i++) (fscanf(fp,"9d",&nl); if ((rep.arrdno[i] = malloc(sizeof(n1))) == NULL) (printf("Not enough memory to allocate buffeh");exit(l);) itoa(n 1,rep.arrdno[i], 10); 1

for(i=l;i<=nopr;i++) { for(i=l J<=znjob;i++) { fscanf(fp,"%d",&nl); if ( (rep.setdno[i]Lj] = malloc( sizeof(n1) ) ) == NULL) (printf("Not enough memory to allocate buffeh");exit(l);} itoa(n1 ,rep.setdno[i]Lj],10); 1 1 for(i= l ;i<=nopr;i++) { for(j= 1J<=znjobJ++) ( fscanf(fp,"%d",&nl); if ((rep.prodno[i]Lj] = malloc(sizeof(n1))) = NULL) {printf("Not enough memory to allocate buffeh"); exit(1);) itoa(n 1,rep.prodno[i]Lj], lo); 1 1 fscanf(fp,"%d %f %Id %f ',&n 1,&fl ,&longn,&f2); if (!(rep.numrep = malloc(sizeof(n1)))) (printf("Not enough memory\n");exit(l);} itoa(n 1,rep.numrep, lo); if (!(rep.begintime = malloc(sizeof(f1)))) {printf("Not enough memory\n");exit(l);) gcvt(f 1,6,rep.begintirne); if (!(rep.length = malloc(sizeof(longn)+2))) {printf("Not enough memory\n");exit(l);} ltoa(longn,rep.length, 10); if (!(rep.wmup = malloc(sizeof(f2)))) (printf("Not enough memory\n");exit(l);) gcvt(fl,6,rep.wmup);

I* ++++++++++++++++++Write file Module ...... */ void write-file(char *sl) (int iJ,znjob; FILE *fpout; fpout=fopen(sl,"w");

I* creating raw data file *I fprintf(fpout, "% 16s % 16s\nW,rec.model-name ,rec.uname);

for(i=l ;i<=rec.ndistrib;i++) { fprintf(fpout,"%d\n%4.lf 63.lf %3.lf\n",recl~function[i],recl_param~l [i],reclqaramam2[i], rec 1-param-3 [i 1); 1 nopr=O; I* initialize counter for max. no. of operations */ for(i=l;i<=rec.njob;i++) { fprintf(fpout,"%d",rec.seqlength[i]); nopr=max(nopr,rec.seqlength[i]); 1 fprintf(fpout,'7nW); I* Module for right-adjusting the fields for float values in pdf*/ char *addblank(float fl,int n) { char *prefix=" ", *suffix=" "; if (n==l){ gcvt(fl,4,suffix); if(fl< 10) { strcpy(prefix," ");strcat(prefix,suffix);retum(prefix);] else if(fl<100) (strcpy@refix," ");strcat(prefix,suffix);retum(prefix);} else (return(suffix);} 1 retum(NULL); 1 I* First screen displayed after logo .....*I firstscr() { WINDOWPTR ww 1; ww1 = wn~open(0,2,2,70,21,(CYAN<<41WHITEIBOLD),(RED<<41WHITEIBOLD)); if(!(wwl)) { I* errors ?? *I printf("wn-open failed!!\nN); /* tell of woe... *I exit(1); ] I* and die *I I* define title of input form and error messages for each field */ 206 wn-title(ww 1,">>> SIMTRAN (SIMan TRANslator) <

RAW DATA SHEETS FROM SUBJECT TESTS SOFTWARE EVALUATION WORKSHEET

Nameofthesubject: ~~ WcuC'dc Subject #: L

Evaluation Start Time : I O ; (3 P fi~. Date :It 12~1~~ Evaluation End Time : 11: ~2 Irm< I

Jobmask Description Time Taken ( In Minutes)

Reading the User's Guide r- II -,I , L.2

Installing the Software 3 ..--"I '\ Getting familiarized $ V.

Data Input for the Given Model Problem 1 0 m(t~ .7 t' r, 1" ,/ Simulating the Model -Y it .- I, - &

Determining Steady State Output L 'LI nL:t :4 * SOFTWARE RATING OUESTIONNAIRE

Question Poor Fair Good Excellent Completeness of the User's Guide

Ease in Installation of Software

Interactiveness of the Software during Input

Ease of Generation and Execution of the Simulation Model Defined J

"User friendliness" of the Software "/'

Did you encounter any problems while running the Software ? Yes (~9) ( Circle One)

If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

Thank you for your cooperation and time! SOFTWARE EVALUATION WORKSHEET

Name of the subject : l.bLten Subject #: 2 v Evaluation Start Time : .' ' 'P a 'm Date :/I129 4L Evaluation End Time : //- )s- l3-m

Jobmask Description Time Taken ( In Minutes)

Reading the User's Guide / 0 Installing the Software 4 Getting familiarized lorhXcn ) Y Data Input for the Given Model Problem 3 1 k~ple/ b) [O f'amp/c? 2 Simulating the Model a) 4 b) 8.0 Determining Steady State Output a) 3 b) 1.0 SOFTWARE RATING OUESTIONNAIRE

Question Poor Fair Good Excellent Completeness of the User's Guide t/

Ease in Installation of Software b'

Interactiveness of the Software during Input I/' I/' Ease of Generation and Execution of the Simulation Model Defined I/

"User friendliness" of the Software 1/

Did you encounter any problems while running the Software ?

If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

Thank you for your cooperation and time! SOFTWARE EVALUATION WORKSHEET

Name of the subject : Ma & &CLVLC Subject #: 3

Evaluation Start Time : 11 : 2S sSnn- Date : 11 125-14 2

Evaluation End Time : I 2> : - c (J.. i

Jobmask Description Time Taken ( In Minutes)

Reading the User's Guide I0

Installing the Software dd o Getting familiarized lr 10

Data Input for the Given Model Problem "7 15 a 0 b) Il.0 Simulating the Model ? _,-- Ij 13 3 Determining Steady State Output -‘ 3 3 ' 3 SOFl'WARE RATING OUESTIONNAIRE

Question Poor Fair Good Excellent Completeness of the User's Guide

Ease in Installation of Software ,-"

Interactiveness of the Software during Input / Ease of Generation and Execution of the , Simulation Model Defined

"User friendliness" of the Software

Did you encounter any problems while running the Software ? Yes ao,, ( Circle One)

If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

- L,/-* -- s , / -. 'z /

Thank you for your cooperation and time! SOFTWARE EVALUATION WORKSHEET

Name of the subject : p-e Subject #: 4

Evaluation Start Time : ' 2 9 P. M Date :/I1 a 9 L Evaluation End Time : IT P ,,,

Jobmask Description Time Taken ( In Minutes)

Reading the User's Guide '2.u 'V rll~

Installing the Software ,-. ni -.,#A* Getting familiarized I e v -,<:I !- Data Input for the Given Model Problem "" ' \ - r J J 1 I--

\-- Simulating the Model 0- 1 -,, ,

', / ,,$,, - - Determining Steady State Output S - ,- r 3 SOFTWARE RATING OUESTIONNAIRE

Question Poor Fair Good Excellent Completeness of the User's Guide J Ease in Installation of Software J Interactiveness of the Software during Input ," Ease of Generation and Execution of the , Simulation Model Defined 1,

/ "User friendliness" of the Software 4

Did you encounter any problems while running the Software ? yes G> ( Circle One)

If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

,AF ,- A! r, 4'" 'pi CffP/d, L7'Ayw&,of&,-~,-,g5-~P /A7

r r r- ' ,/ 4 / &w? , +~~L-P*GL+/,&& &&

Name of the subject : SL-~ Subject #: 5

Evaluation Start Time : 5: 30 Date : / 25/qr Evaluation End Time :

Jobmask Description Time Taken ( In Minutes) Reading the User's Guide 4 - Installing the Software 25 &

Getting familiarized i5#0& Data Input for the Given Model Problem * b) 4. 0 v\*s J,,.. Simulating the Model ‘3) 1\5- b't'~SA Determining Steady State Output b3 1.5~ I 9 1 1. o& a SOFTWARE RATING OUESTIONNAIRE 217

Question Poor Fair Good Excellent Completeness of the User's Guide ,//

Ease in Installation of Software /

Interactiveness of the Software during Input L/ Ease of Gzneration and Execution of the / . Simulation Model Defined -- "User friendliness" of the Software /

Did you encounter any problems while running the Software ? YJ No 2ircle One) If yes, what was the nature of the problem ?

Additional Comments or Suggestions ( Optional) :

- .-, 2 -I , r c r- ! . ., .. . ,.< ' . +,re.. . ,-. ,,LC r /,- . -,v Yr'r' 'F , 0' , I.,.-

" .' + ,;,)CC -.,: G,..+' #-> ,/--:-- -;FL'/' , ', ,// ,- )---L .. , ,,, ( .- , , ._, .: ,,". z. ,-1 J :/' '! ...- ?,*, - ,-.-I >(-,/r< un:: /<,7- -

Thank you for your cooperation and time!