Log-normal function

Updated: 2025-09-17

What is the log-normal distribution?

A variable follows a log-normal distribution if the logarithm of that variable has a normal distribution. In other words:

“Many small events occur frequently, but it is also possible for some events with very large values to appear, although with low probability.”

Typical cases:

  • Machine repair time.

  • Duration of a phone call.

  • Income (most people earn little, a few earn a lot).

Function {Name:lfunc1, Type:LOGNORMAL, b:30, sigma:0.1}

Parameters:

  • b: The function’s most likely value (the peak of the curve).
  • sigma: Controls the spread of values to the right. The larger the sigma, the wider the distribution’s “tail”.

GPSS-Plus automatically converts these values into the mathematical parameters μ (log-mean) and σ (standard deviation) to build the log-normal curve.

Unlike the Gaussian, the log-normal is not symmetric. It has a long “tail” toward higher values. This behavior matches well with phenomena where extreme values are rare, but possible.

This example shows three log-normal functions with the same curve type, but different dispersion.

Function {Name:lfunc1, Type:LOGNORMAL, b:30, sigma:0.1}   ; narrow curve
Function {Name:lfunc2, Type:LOGNORMAL, b:20, sigma:0.15}  ; medium dispersion
Function {Name:lfunc3, Type:LOGNORMAL, b:40, sigma:0.2}   ; long tail

 

Graph

Example

/*

  	 	Log-normal
 
*/
SYSTEM {TYPE:OPTIONS, Speed:5}

Facility {NAME:VENTANILLA1,X:165,Y:184,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:100,capacity:10}

Facility {NAME:VENTANILLA2,X:343,Y:185,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:100,capacity:10}

Facility {NAME:VENTANILLA3,X:535,Y:183,E_BIN_start:0,E_BIN_SIZE:1,E_BIN_COUNT:100,capacity:10}

POSITION {NAME:POS1, X:250, Y:381}
POSITION {NAME:POS2, X:423, Y:383}
POSITION {NAME:POS3, X:566, Y:384}

Function {Name:lfunc1, Type: LOGNORMAL, b:30, sigma:0.1}
Function {Name:lfunc2, Type: LOGNORMAL, b:20, sigma:0.15}
Function {Name:lfunc3, Type: LOGNORMAL, b:40, sigma:0.2}


START 500

GENERATE 10,0,0,0 {NAME:GEN1, X:91, Y:383}

; WINDOW 1 – Small dispersion
ADVANCE 20,4 {TO:VENTANILLA1}
SEIZE VENTANILLA1
ADVANCE FN$lfunc1
RELEASE VENTANILLA1
ADVANCE 20,0 {TO:POS1}

; WINDOW 2 – Medium dispersion
ADVANCE 20,0 {TO:VENTANILLA2}
SEIZE VENTANILLA2
ADVANCE FN$lfunc2
RELEASE VENTANILLA2
ADVANCE 20,0 {TO:POS2}

; WINDOW 3 – Large dispersion (long tail)
ADVANCE 20,0 {TO:VENTANILLA3}
SEIZE VENTANILLA3
ADVANCE FN$lfunc3
RELEASE VENTANILLA3
ADVANCE 20,0 {TO:POS3}

ENDGENERATE 1