ArticleslgStudy

science

GPSS

GPSS is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand GPSS rather than just read about it. In short: 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.

GPSS — main illustration
GPSS — illustration

Key takeaways

  • GPSS belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect GPSS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of GPSS from memory before moving on to harder problems.

Reference excerpt

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.

History 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 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 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 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, 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.

Description A GPSS simulation is written in an Assembly-style "block diagram language" with many different single-purpose commands ("Blocks") to control 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 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 the state of Transactions or elements of their environment. Statistical entities, like Queues or Tables (histograms) collect statistical information of interest.

Basic transaction commands Transactions can:

Automatically enter the simulation (GENERATE) Use a facility or storage (SEIZE/ENTER respectively) Stop using a facility or storage (RELEASE/LEAVE respectively) Wait (ADVANCE) Transfer to another section of code (TRANSFER) Exit the simulation (TERMINATE) 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 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.

GENERATE GENERATE 0.1

Transaction generated every 0.1 time unit.

GENERATE 15,4

Transaction is generation every 15 time units, plus or minus 4 time units. GENERATE

ADVANCE To have a transaction wait, use the ADVANCE command. It has similar arguments to GENERATE.

ADVANCE 10,6

Transaction waits 10±6 seconds. ADVANCE

SEIZE, RELEASE (Facilities) To use a Facility, which only allows one use at a time, use the SEIZE command. To stop using it, use the RELEASE command.

GENERATE 30,5 ; Generate a customer every 30±5 time units SEIZE Barber ; Use a facility ADVANCE 15,4 ; Wait 15±4 time units RELEASE Barber ; Stop using the facility TERMINATE 1 ; Leave the barber shop

If you want more than one use at a time, use Storage. SEIZE RELEASE

ENTER, LEAVE (Storages) Seating STORAGE 100 ; 100 people allowed in lounge seating

GENERATE 10,5 ; Generate a person every 10±5 time units ENTER Seating,1 ; Person sits down ADVANCE 15,4 ; Wait 15±4 time units LEAVE Barber,1 ; Person stops sitting TERMINATE 1 ; Exit the seating area

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 the amount to reserve with Argument B. The LEAVE command's arguments are the same. ENTER LEAVE

… excerpt ends here. Continue reading the full article.

Illustrations

GPSS illustration
GPSS illustration

Worked examples

Example 1 — a first encounter with GPSS

Start with the simplest possible case. Write down what GPSS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to GPSS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about GPSS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of GPSS

In research
GPSS appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses GPSS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
GPSS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Simulation programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for GPSS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “GPSS” →

How to study GPSS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what GPSS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain GPSS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is GPSS in simple terms?

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.

Why does GPSS matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study GPSS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on GPSS.

Tags

  • Simulation programming languages

Keep exploring