STOCHREL is a Matlab package for analyzing stochastic relations of random variables and processes. The package provides basic functions for working with relations, together with an implementation of the subrelation algorithm described in the research article Stochastic relations of random variables and processes (J Theor Probab 23(2):523-546, 2010).

Application of the subrelation algorithm to a parallel two-server queueing system.


  1. Download and unzip the file
  2. Place the M-files in a location on your Matlab path.
  3. Start up Matlab.

Getting started

The best way to get started is to run the script example.m, and inspect how the results behave when the model parameters are modified.


Each M-file has its own documentation which can be accessed by typing at the Matlab prompt:

help <name of M-file>

Terms of use

Anyone may use STOCHREL free of charge. Anyone may modify STOCHREL for their own use as long as the original copyright notices remain in place. The author makes no guarantees regarding the correctness of STOCHREL's code or its fitness for any particular purpose.

Further information

Please send email to Lasse Leskelä, if you have any question or comments. Updates will be available at the package home page