First Application: Behavior Functions in Action

Updated: 2026-01-27

In this first practical example, we apply the Behavior Functions (BF$) concept in its simplest form: a single dimension of interpolation.

Instead of defining an exact function for every possible scenario, we define a few known behavior points and let GPSS-Plus calculate the rest.

The Behavior Logic: "tramo1D"

We have two studied cases mapped to the behavior name "tramo1D":

  • Case P0=10: Resulted in b:20, Sigma1:2.5, Sigma2:2.5
  • Case P0=20: Resulted in b:40, Sigma1:3.0, Sigma2:3.5

Imagine P0 is the number of employees. If we want to simulate a workshop with 15 employees (P0=15), GPSS-Plus performs a linear interpolation. Since 15 is exactly between 10 and 20, the resulting Gaussian parameters will be b=30, sigma1=2.75, sigma2=3.

Implementation in the Model:

  1. Fixed Call: ADVANCE FN$gName1 uses the standard static definition.
  2. Interpolated Call: ADVANCE BF$(tramo1D, 15) creates a dynamic distribution based on the midpoint.
  3. Extrapolated Call: ADVANCE BF$(tramo1D, 30) projects the behavior beyond the original samples.

The resulting statistical reports will show service curves centered exactly at 20, 30, and 60 respectively, proving the mathematical accuracy of the dynamic generator.

Example

SYSTEM {TYPE:OPTIONS,Speed:5}

Graphic {NAME:Text1,Type:TEXT,X:230,Y:496,Text:"FN$gName1: b=20 / sigma1=2.5 / sigma2=2.5"}

Graphic {NAME:Text2,Type:TEXT,X:349,Y:100,Text:"BF$(tramo1D 30): b=60 / sigma1=3.5 / sigma2=4.5 (interpolated)"}

Graphic {NAME:Text3,Type:TEXT,X:523,Y:397,Text:"BF$(tramo1D 15): b=30 / sigma1=2.75 / sigma2=3 (interpolated)"}

Facility {NAME:VENTANILLA1,X:233,Y:444,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:80,capacity:30}
Facility {NAME:VENTANILLA2,X:352,Y:152,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:80,capacity:30}
Facility {NAME:VENTANILLA3,X:523,Y:354,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:80,capacity:30}

POSITION {NAME:POS1,X:708,Y:268}

; Behavior definitions: P0 represents the configuration parameter (e.g., number of workers)
Function {behavior: tramo1D, type: GAUSS, p0:10, Name:gName1, a:1, b:20, Sigma1:2.5, Sigma2:2.5}
Function {behavior: tramo1D, type: GAUSS, p0:20, Name:gName2, a:1, b:40, Sigma1:3.0, Sigma2:3.5}

START 2000

;*****************************************************
GENERATE 2,0,0,0 {NAME:GEN1,X:56,Y:319}

ADVANCE 30,10 {TO:VENTANILLA1}

SEIZE VENTANILLA1
ADVANCE FN$gName1           ; Traditional fixed function call
RELEASE VENTANILLA1

ADVANCE 20,10 {TO:VENTANILLA2}

SEIZE VENTANILLA2
ADVANCE BF$(tramo1D,30)      ; Dynamic call: P0=30 (extrapolated)
RELEASE VENTANILLA2

ADVANCE 20,10 {TO:VENTANILLA3}

SEIZE VENTANILLA3
ADVANCE BF$(tramo1D,15)      ; Dynamic call: P0=15 (interpolated)
RELEASE VENTANILLA3

ADVANCE 20,0 {TO:POS1}

TERMINATE 1