General Purpose Simulation System ( GPSS ) is a simulation language used for discrete-event simulations . It is especially useful in the modelling of queuing systems, with many statistics being collected automatically. The typical simulation consists of Transactions being generated in the system (usually at a certain interval), performing a defined set of rules (like use a resource, wait, transfer), and being removed from the simulation.
28-475: GPSS was developed in the 1960s by Geoffrey Gordon , an employee of IBM's Advanced Systems Development Division (ASDD). This division was heavily involved with research into the design of teleprocessing systems, trying to achieve an economic balance of the use of computer resources and shared lines between server terminals. The simulation system, then known as the Gordon Simulator, became very popular in
56-585: A Facility , which only allows one use at a time, use the SEIZE command. To stop using it, use the RELEASE command. If you want more than one use at a time, use Storage . SEIZE RELEASE This way, multiple people can sit in the Seating at once. If this was a Facility (using SEIZE/RELEASE), it would block others who tried to use the resource. The ENTER command takes the storage reference as Argument A and
84-429: A customer seizes Joe, she proceeds to the next statement which is ADVANCE 16,4 , whose task is to freeze the entity for a prescribed length of time, here a random number picked between 16-4=12 and 16+4=20mn. Other service time distributions are available through GPSS FUNCTION (a somehow different notion than function in other programming languages). During that time, other transactions will be allowed to move through
112-449: A parameter of 1, meaning a special counter is decreased by 1. When that counter reaches 0, the program stops and the output is printed. This special counter is set up with the START statement. In the example, it is set to one, thus the simulation will finish after one run of 480 mn in simulated time. The output contains: Geoffrey Gordon (computer scientist) Geoffrey Gordon was
140-503: A predetermined time, make sure none of your TERMINATES decrement the counter and include a section like this: Then run your program with START 1. It will run for 100 time units. Use the ASSIGN control block to assign a value to a transaction parameter. Called with Pj (j=parameter number) ASSIGN : ASSIGN Blocks are used to place or modify a value in a Transaction Parameter. The following example, taken from Simulation using GPSS ,
168-620: A project to digitally simulate what was seen across flow-chart style simulation sequence diagrams, instead of writing new software for each one. These diagrams used nodes to communicate the flow and operations of a simulation. The project, called the "Sequence Diagram Simulator" was completed at the end of that year. In 1960, Gordon became manager of the Advanced Systems Development Division at IBM which experimented with new technology to design more efficient systems, especially in teleprocessing problems. Since
196-424: A waiting line, and collects statistics accordingly. In the example, it materialize a line of chairs and, at the end of the simulation, we will know, among other things, the maximum queue size (how many chairs are needed) and the average waiting time. The QUEUE block requires the name of the queue as a parameter, because more than one queue may exist in the model. Each one is associated with a DEPART block, which
224-477: Is comprised between the SIMULATE and END statements, and is divided into "model segments" and "control cards". The first segment models customers. The GENERATE block creates a flow of Transactions and schedules them to enter the model with an inter-arrival time uniformly distributed over the range 18±6. It is the programmer's responsibility to interpret these transaction as customers and to understand that
252-654: Is referred to as a "control". Blocks can be facility-oriented (such as machines in a job shop) or transaction-oriented (such parts of work-in-process, signals in electronic components or documents in a bureaucratic procedure). GPSS automatically keep track of statistics for display on a report. Entities can be broadly classified in Resources, Computational entities and Statistical entities. Resources, like Facilities and Storages represent limited capacity resources. Computational entities, like Ampervariables (variables), Functions and random generators are used to represent
280-407: Is the "Hello world!" of GPSS and will illustrate the main concepts. The aim is to simulate one day of operation of a barber shop. Customers arrive in a random constant flow, enter the shop, queue if the barber is busy, get their hair cut on a first-come first-served basis, and then leave the shop. We wish to know the average and maximum waiting line, as well as the number of customers. The "program"
308-618: Is triggered when the transaction leaves the queue. GPSS remembers which transactions are in the queue, so that it possible to know the average time spent, and to check that no buggy transaction is leaving a queue without previously entering in it. After the QUEUE chairs block, the transaction will try to proceed to the SEIZE Joe block, a block simulating the capture of the Facility named Joe. Facilities model single servers of capacity one. If
SECTION 10
#1732782510631336-603: The Windows program GPSS World was released with new features to GPSS. It includes scripting with PLUS (a Pascal -like language), graphical system state displays, graphing, and optimization experiments. In 2009, a graphical Java -based tool called JGPSS (Java General Purpose Simulation System) was developed to teach the GPSS simulation language. A GPSS simulation is written in an Assembly -style "block diagram language" with many different single-purpose commands ("Blocks") to control
364-566: The TRANSFER command, but besides that your transaction lifecycles will be separated. It helps to add whitespace between lines of action of one transaction versus another. Transaction generated every 0.1 time unit. Transaction is generation every 15 time units, plus or minus 4 time units. GENERATE To have a transaction wait, use the ADVANCE command. It has similar arguments to GENERATE. Transaction waits 10+-6 seconds. ADVANCE To use
392-409: The amount to reserve with Argument B. The LEAVE command's arguments are the same. ENTER LEAVE To remove the transaction, use TERMINATE. The optional argument decrements the completion counter , which is a variable that is chosen by the user when running the simulation. Say you wanted to test 100 customers: you would start the execution of your simulation with START 100 . TERMINATE 1 at
420-544: The company on October 25, 1960. The use of the program outside of the company was soon recognized by the Cross Industry Marketing Group of IBM. On October 6, 1961, the program became available publicly outside of IBM as "GPSS I" after a complete rewrite. It was initially available for the IBM 704, 709, and 7090. Gordon retired from IBM as a Consulting Systems Engineer and an IBM Fellow. He then became
448-617: The creator of the popular GPSS simulation system language . In the early 1950s, Gordon began using analog computers for simulation in England. A few years later he began working with digital computers. He moved to the United States in 1955 where he continued working with digital simulation at Westinghouse Electric Corporation . At the end of following year (1956) he began working at Bell Labs , writing simulation software for message switching systems. In 1959, he started work on
476-462: The end of each transaction would decrement initial value 100 by 1 (99, 98, 97 ...) until it reached zero. At this point, the simulation stops and results are returned. If you omit the argument in TERMINATE, it will be assumed to be 0. This means your simulation will run forever (unless, of course, you have another TERMINATE that does decrement this counter. TERMINATE To have your program run for
504-535: The facility is busy, the SEIZE will deny the attempting transaction the right to enter. In the example, the customer will wait in the QUEUE block. If it is free, or as soon as it becomes available, the transaction will be allowed to capture the facility, mark it as busy to others transactions and start to count the service time and other statistics, until the same transaction passes the corresponding RELEASE Joe block. The SEIZE / RELEASE pairs are linked by
532-419: The facility name, because many independent facilities may exist in the model. They can model operators, like a barber, a repairman, an agent, but also pieces of equipment, like a crane, a gas station, an authorization document, etc., in fact anything with capacity one. To simulate multiple parallel servers, like a team of five barbers, or an oven with a capacity of 10, GPSS uses entities named STORAGE s. After
560-453: The first-come first-served basis, with priority. Other selection policies can be programmed by direct manipulation of the future event chain entity. In parallel to this first segment, simulating the customer behavior, a second model segment simulates the end of the day. At time 480mn = 8h an entity is GENERATE d, which will TERMINATE on the next block. This time, the TERMINATE as
588-469: The flow of a Transaction , statistics collection, and variables. Simulations have Transaction entry points through the GENERATE command, such as a customer walking into a store. Then, actions are performed through claiming Facilities / Storage (like a cashier), waiting, saving statistics, etc. Finally, the simulated transaction exits the simulation through the TERMINATE command. Each command verb
SECTION 20
#1732782510631616-428: The model, blocking some other facilities that may exist in the model, but not Joe because this facility is busy with the frozen customer. After the prescribed time, the customer will wake up, proceed to the next statement, which will free Joe, and TERMINATE . Then the next transaction on the previous block, that is a customer sitting on a chair, will be able to SEIZE Joe . To select the "next" transaction, GPSS uses
644-420: The simulation system. In 1963, GPSS II was released with 32 block types. It introduced system numerical attributes, which allowed tracking the current content of a Storage , the length of a Queue , or the current clock time. In 1965, GPSS III was released. It was made available for IBM Systems 7090/94 and 7040/44 . In 1967, GPSS/360 was released to run on the newly released System 360 . In 1970, GPSS V
672-552: The state of Transactions or elements of their environment. Statistical entities, like Queues or Tables (histograms) collect statistical information of interest. Transactions can : Along with these main tasks, they can also hold parameters with the ASSIGN command. Transactions are implicitly sectioned off in the code. There can be multiple transactions in the code that happen at once. A transaction starts with GENERATE and ends with TERMINATE. The code inbetween could potentially be shared between multiple transactions by means of
700-494: The study of teleprocessing systems within ASDD. It subsequently was fixed and documented on October 25, 1960 in an internal IBM memorandum. Between the winter and summer of 1961, a group of three programmers (including Gordon) rewrote the simulation system with a new algorithm and new block types. It was officially released as a supported IBM-label program on September 27, 1961 with 25 block types. At this point, Gordon stopped working on
728-475: The time is to be counted in minutes. The Transactions start their existence in the GENERATE block and progress from Block to Block, according to certain rules, until they reach a TERMINATE which remove them from the model. Normally transactions progress from one block to the next one, so the customer transactions will leave the GENERATE block to enter the QUEUE Chairs block. This block simulates
756-502: The use of simulation was important in creating accurate models, Gordon suggested that a block diagram language be created similar to the Sequence Diagram Simulator. The new program and corresponding language, unofficially called the "Gordon Simulator", was developed in the IBM 704 symbolic assembly language. It became known throughout the company as a useful tool and became officially documented for internal use in
784-428: Was released with 49 block types. In the 1980s, GPSS/VAC and GPSS/PC were released. These appear to be the last official IBM-label releases before the language became unlicensed. Subsequently, there were releases for IBM 360 , Univac 1108 , and CDC. Over time, other implementations were developed for systems including DEC 's VAX, a specialized APL version for large-scale Univac systems, and Macintosh . In 2001,
#630369