Product-Form Queueing Networks

MVA, convolution, and normalizing constant methods.

The pfqn module contains algorithms for product-form queueing networks, including Mean Value Analysis (MVA), convolution, and normalizing constant methods.

Key function categories:

Product-form queueing network (PFQN) algorithms.

This module implements analytical algorithms for product-form queueing networks, including Mean Value Analysis (MVA), normalizing constant methods, and various approximation techniques.

Key algorithms: - pfqn_mva: Standard Mean Value Analysis - pfqn_ca: Convolution Algorithm - pfqn_nc: Normalizing Constant methods - pfqn_bs: Balanced System analysis - pfqn_aql: Approximate queueing lengths - Various load-dependent and multi-class extensions

These functions provide the computational core for product-form network analysis in LINE.

pfqn_ca(N, L, Z)[source]

Convolution Algorithm for product-form networks.

Computes normalizing constants using the convolution algorithm.

Parameters:
  • N – Population vector.

  • L – Demand matrix (service demands = mean visits × mean service times).

  • Z – Think time vector.

Returns:

(G, lG) where G is normalizing constant and lG is log(G).

Return type:

tuple

pfqn_panacea(N, L, Z)[source]

PANACEA algorithm for product-form networks.

A hybrid algorithm that combines convolution and MVA techniques for efficient computation of normalizing constants.

Parameters:
  • N – Population vector

  • L – Demand matrix (service demands)

  • Z – Think time vector

Returns:

(G, lG) where G is normalizing constant and lG is log(G)

Return type:

tuple

pfqn_bs(N, L, Z)[source]

Balanced System analysis for product-form networks.

Computes performance measures assuming balanced system conditions.

Parameters:
  • N – Population vector

  • L – Demand matrix (service demands)

  • Z – Think time vector

Returns:

(XN, CN, QN, UN, RN, TN, AN) where:
  • XN: Throughputs

  • CN: Response times

  • QN: Queue lengths

  • UN: Utilizations

  • RN: Residence times

  • TN: Node throughputs

  • AN: Arrival rates

Return type:

tuple

pfqn_mva(N, L, Z)[source]

Mean Value Analysis for product-form networks.

Computes performance measures using the MVA algorithm.

Parameters:
  • N – Population vector.

  • L – Demand matrix (service demands = mean visits × mean service times).

  • Z – Think time vector.

Returns:

Performance measures including throughputs, response times, queue lengths, and utilizations.

pfqn_aql(N, L, Z)[source]

Approximate Queue Length algorithm for product-form networks.

Provides approximations for queue lengths in product-form networks when exact algorithms are computationally expensive.

Parameters:
  • N – Population vector

  • L – Demand matrix (service demands)

  • Z – Think time vector

Returns:

(XN, CN, QN, UN, RN, TN, AN) - Performance measures

Return type:

tuple

pfqn_mvald(L, N, Z, mu, stabilize=True)[source]

MVA with Load-Dependent service rates.

Mean Value Analysis for networks with load-dependent service rates.

Parameters:
  • L – Demand matrix

  • N – Population vector

  • Z – Think time vector

  • mu – Load-dependent service rate functions

  • stabilize – Whether to use numerical stabilization (default: True)

Returns:

(XN, QN, UN, CN, lGN, isNumStable, newpi) where:
  • Performance measures and numerical stability indicators

Return type:

tuple

pfqn_mvaldms(lambda_rates, D, N, Z, S)[source]

MVA with Load-Dependent Multi-Server stations.

Mean Value Analysis for networks with load-dependent multi-server stations.

Parameters:
  • lambda_rates – Arrival rates

  • D – Service demands

  • N – Population vector

  • Z – Think times

  • S – Server configurations

Returns:

Performance measures for load-dependent multi-server network

pfqn_mvaldmx(lambda_rates, D, N, Z, mu=None, S=None)[source]

MVA with Load-Dependent mixed service stations.

Mean Value Analysis for networks with mixed load-dependent service stations that can have both load-dependent rates and multiple servers.

Parameters:
  • lambda_rates – Arrival rates

  • D – Service demands

  • N – Population vector

  • Z – Think times

  • mu – Load-dependent service rates (optional)

  • S – Server configurations (optional)

Returns:

(XN, QN, UN, CN, lGN, newPc) - Performance measures with corrected parameters

Return type:

tuple

pfqn_mvams(lambda_rates, L, N, Z, mi=None, S=None)[source]

MVA for Multi-Server stations.

Mean Value Analysis algorithm extended for multi-server stations.

Parameters:
  • lambda_rates – Arrival rates

  • L – Service demands

  • N – Population vector

  • Z – Think times

  • mi – Service rates (optional)

  • S – Number of servers per station (optional)

Returns:

Performance measures for multi-server network

pfqn_mvamx(lambda_rates, D, N, Z, mi=None)[source]

MVA for mixed open/closed networks.

Mean Value Analysis for mixed networks containing both open and closed classes.

Parameters:
  • lambda_rates – Arrival rates for open classes

  • D – Service demands

  • N – Population vector for closed classes

  • Z – Think times

  • mi – Service rates (optional)

Returns:

(XN, QN, UN, CN, lGN) - Performance measures

Return type:

tuple

pfqn_gldsingle(L, N, mu, options=None)[source]

GLD algorithm for single load-dependent station.

Specialized version for networks with a single load-dependent station.

Parameters:
  • L – Service demands

  • N – Population vector

  • mu – Load-dependent service rates

  • options – Algorithm options (optional)

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_comomrm(L, N, Z, m=None, atol=1e-8)[source]

Co-moment matching algorithm for product-form networks.

Uses moment matching techniques to approximate performance metrics in product-form queueing networks with high accuracy.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • m – Number of moments to match (optional)

  • atol – Absolute tolerance for convergence

Returns:

Performance metrics computed via co-moment matching

pfqn_linearizer(L, N, Z, schedule_types, tol=1e-8, maxiter=1000)[source]

Linearizer algorithm for non-product-form networks.

Uses iterative approximation to analyze networks with non-product-form scheduling disciplines (e.g., priority, LCFS-PR).

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

  • schedule_types – Scheduling disciplines for each station

  • tol – Convergence tolerance (default: 1e-8)

  • maxiter – Maximum iterations (default: 1000)

Returns:

(Q, U, R, C, X, totiter) where:
  • Q: Queue lengths

  • U: Utilizations

  • R: Response times

  • C: Class response times

  • X: Throughputs

  • totiter: Total iterations performed

Return type:

tuple

pfqn_linearizerms(L, N, Z, nservers, schedule_types, tol=1e-8, maxiter=1000)[source]

Linearizer algorithm for multi-server non-product-form networks.

Extended linearizer for networks with multi-server stations and non-product-form scheduling disciplines.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

  • nservers – Number of servers per station

  • schedule_types – Scheduling disciplines

  • tol – Convergence tolerance (default: 1e-8)

  • maxiter – Maximum iterations (default: 1000)

Returns:

(Q, U, W, C, X, totiter) - Performance measures and iterations

Return type:

tuple

pfqn_linearizerpp(L, N, Z, level=2, tol=1e-8, maxiter=1000, flag=0)[source]

Priority Preemptive linearizer algorithm.

Specialized linearizer for networks with priority preemptive scheduling.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

  • level – Priority level (default: 2)

  • tol – Convergence tolerance (default: 1e-8)

  • maxiter – Maximum iterations (default: 1000)

  • flag – Algorithm flag (default: 0)

Returns:

Performance measures for priority preemptive network

pfqn_linearizermx(lambda_rates, L, N, Z, nservers, schedule_types, tol=1e-8, maxiter=1000, method='lin')[source]

Mixed linearizer algorithm for open/closed networks with multi-server stations.

Extended linearizer for mixed networks containing both open and closed classes with multi-server stations and non-product-form scheduling.

Parameters:
  • lambda_rates – Arrival rates for open classes

  • L – Service demands

  • N – Population vector for closed classes

  • Z – Think times

  • nservers – Number of servers per station

  • schedule_types – Scheduling disciplines

  • tol – Convergence tolerance (default: 1e-8)

  • maxiter – Maximum iterations (default: 1000)

  • method – Solution method (default: “lin”)

Returns:

(Q, U, R, C, X, totiter) - Performance measures and iterations

Return type:

tuple

pfqn_kt(L, N, Z)[source]

Korkmazoglu-Tucci (KT) algorithm for normalizing constants.

Efficient algorithm for computing normalizing constants in product-form networks.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_recal(L, N, Z=None, m0=None)[source]

Recurrence algorithm for normalizing constants.

Uses recurrence relations to compute normalizing constants.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times (optional)

  • m0 – Initial multiplicities (optional)

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_cub(L, N, Z, order=3, atol=1e-8)[source]

Cubic spline approximation for normalizing constants.

Uses cubic spline interpolation for approximate computation of normalizing constants.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

  • order – Spline order (default: 3)

  • atol – Absolute tolerance (default: 1e-8)

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_mmint2(L, N, Z)[source]

Two-moment interpolation algorithm for normalizing constants.

Uses moment interpolation to approximate normalizing constants.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_ls(L, N, Z=None, I=10000, seed=12345)[source]

Large-Scale approximation algorithm for normalizing constants.

Monte Carlo based approximation for large-scale product-form networks.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times (optional)

  • I – Number of Monte Carlo samples (default: 10000)

  • seed – Random seed (default: 12345)

Returns:

(G, lG) - Normalizing constant and its logarithm

Return type:

tuple

pfqn_rd(L, N, Z, mu, options=None)[source]

Recursive Doubling algorithm for load-dependent networks.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

  • mu – Load-dependent service rates

  • options – Algorithm options (optional)

Returns:

(lG, Cgamma) - Log normalizing constant and performance measures

Return type:

tuple

pfqn_fnc(alpha, c)[source]

Flow-equivalent Node Centralization algorithm.

Parameters:
  • alpha – Alpha parameters

  • c – Capacity parameters

Returns:

(mu, c) - Service rates and updated capacities

Return type:

tuple

pfqn_propfair(L, N, Z)[source]

Proportional fair algorithm for product-form networks.

Parameters:
  • L – Service demands

  • N – Population vector

  • Z – Think times

Returns:

(G, lG, X, Q, method) - Performance measures and method used

Return type:

tuple

pfqn_xia(L, N, s, options=None)[source]

Xia’s algorithm for multi-server networks.

Parameters:
  • L – Service demands

  • N – Population count

  • s – Server configurations

  • options – Algorithm options (optional)

Returns:

Algorithm results

pfqn_xzabalow(L, N, Z)[source]

Lower bound algorithm by Zahorjan and Abadir.

Parameters:
  • L – Service demands

  • N – Population count

  • Z – Think time

Returns:

Lower bound estimates

pfqn_xzabaup(L, N, Z)[source]

Upper bound algorithm by Zahorjan and Abadir.

Parameters:
  • L – Service demands

  • N – Population count

  • Z – Think time

Returns:

Upper bound estimates

pfqn_xzgsblow(L, N, Z)[source]

Lower bound algorithm by Zahorjan, Gesbert, and Sevcik.

Parameters:
  • L – Service demands

  • N – Population count

  • Z – Think time

Returns:

Lower bound estimates

pfqn_xzgsbup(L, N, Z)[source]

Upper bound algorithm by Zahorjan, Gesbert, and Sevcik.

Parameters:
  • L – Service demands

  • N – Population count

  • Z – Think time

Returns:

Upper bound estimates

pfqn_egflinearizer(L, N, Z, tol=1e-8, maxiter=1000)[source]

Enhanced Gauss-Friedman linearizer for product-form networks.

Advanced linearization algorithm that provides improved convergence and accuracy compared to standard linearizer methods.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • tol – Convergence tolerance

  • maxiter – Maximum number of iterations

Returns:

Performance metrics computed via enhanced linearizer

pfqn_gflinearizer(L, N, Z, tol=1e-8, maxiter=1000)[source]

Gauss-Friedman linearizer for product-form networks.

Uses the Gauss-Friedman linearization method to approximate performance metrics in product-form queueing networks.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • tol – Convergence tolerance

  • maxiter – Maximum number of iterations

Returns:

Performance metrics computed via Gauss-Friedman linearizer

pfqn_gld_complex(L, N, mu=None, options=None)[source]

Complex variant of Generalized Load-Dependent algorithm.

Enhanced GLD method for complex load-dependent service configurations with support for advanced service rate dependencies.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • mu – Load-dependent service rates (optional)

  • options – Optional solver options

Returns:

Performance metrics for complex load-dependent systems

pfqn_gldsingle_complex(L, N, mu, options=None)[source]

Complex GLD algorithm for single load-dependent station.

Specialized version for networks with one complex load-dependent station with sophisticated service rate modeling.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • mu – Complex load-dependent service rates

  • options – Optional solver options

Returns:

Performance metrics for single complex load-dependent station

pfqn_mushift(L, N, Z, mu, shift_factor=1.0)[source]

Service rate shifting algorithm for load-dependent networks.

Applies a shifting transformation to service rates for improved numerical stability in load-dependent network analysis.

Parameters:
  • L – Service demand matrix.

  • N – Population vector.

  • Z – Think time vector.

  • mu – Load-dependent service rates.

  • shift_factor – Shifting parameter (default: 1.0).

Returns:

(mu_shifted, G, lG) - Shifted rates and normalizing constants.

Return type:

tuple

pfqn_le_fpiZ(L, N, Z, max_iter=1000, tol=1e-6)[source]

Load Evaluation FPI with Z-parameter computation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • max_iter – Maximum iterations (default: 1000)

  • tol – Convergence tolerance (default: 1e-6)

Returns:

Performance metrics with Z coefficients

Return type:

dict

pfqn_le_hessian(L, N, Z, step_size=1e-6)[source]
pfqn_le_hessianZ(L, N, Z, step_size=1e-6)[source]
pfqn_lldfun(L, N, Z, lambda_vec)[source]
pfqn_mci(L, N, Z, num_samples=10000, confidence=0.95)[source]

Monte Carlo Integration with confidence intervals.

Extended MCI method that provides confidence interval estimates for the computed performance metrics.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • num_samples – Number of Monte Carlo samples

  • confidence – Confidence level for intervals (e.g., 0.95)

Returns:

Performance metrics with confidence intervals

pfqn_mmint2_gausslegendre(L, N, Z, order=10)[source]
pfqn_mmsample2(L, N, Z, num_samples=1000)[source]
pfqn_nrl(L, N, Z, options=None)[source]

Newton-Raphson Linearization for product-form networks.

Uses Newton-Raphson optimization to solve the linearized system of equations for performance metrics computation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • options – Optional solver options

Returns:

Performance metrics computed via Newton-Raphson linearization

pfqn_nrp(L, N, Z, options=None)[source]

Newton-Raphson method for performance measures.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • options – Algorithm options (optional)

Returns:

Performance measures with convergence status

Return type:

dict

pfqn_stdf(L, N, Z, S, fcfs_nodes, rates, tset)[source]

Service Time Distribution Function computation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • fcfs_nodes – FCFS node indicators

  • rates – Service rates

  • tset – Time set for evaluation

Returns:

Distribution function values (CDF, PDF, mean)

Return type:

dict

pfqn_stdf_heur(L, N, Z, S, fcfs_nodes, rates, tset, options=None)[source]

Service Time Distribution Function with heuristic approximation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • fcfs_nodes – FCFS node indicators

  • rates – Service rates

  • tset – Time set for evaluation

  • options – Algorithm options (optional)

Returns:

Approximate distribution function values

Return type:

dict

pfqn_conwayms_core(L, N, Z, S, options=None)[source]

Conway multi-server algorithm core computation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • options – Algorithm options (optional)

Returns:

Core performance metrics (XN, QN, RN, UN)

Return type:

dict

pfqn_conwayms_estimate(L, N, Z, S, options=None)[source]

Conway multi-server algorithm with estimation.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • options – Algorithm options (optional)

Returns:

Estimated performance metrics

Return type:

dict

pfqn_conwayms_forwardmva(L, N, Z, S, options=None)[source]

Conway multi-server algorithm with forward MVA.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • options – Algorithm options (optional)

Returns:

Performance metrics via forward MVA

Return type:

dict

pfqn_mu_ms_gnaux(L, N, Z, S, mu, options=None)[source]

Multi-server service rate computation with auxiliary variables.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think time vector

  • S – Server configuration

  • mu – Service rates

  • options – Algorithm options (optional)

Returns:

Scaling factors and convergence information

Return type:

dict

pfqn_nc(N, L, Z, options=None)[source]

Normalizing Constant algorithm variant for product-form networks.

Alternative interface to the normalizing constant method that computes performance measures using exact or approximate NC techniques.

Parameters:
  • N – Population vector

  • L – Service demand matrix

  • Z – Think time vector

  • options – Optional solver options

Returns:

Performance metrics computed via normalizing constants

pfqn_gld(L, N, mu, options=None)[source]

Generalized Load-Dependent algorithm variant.

Alternative interface to the GLD method with explicit service rate parameters for load-dependent stations.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • mu – Load-dependent service rate matrix

  • options – Optional solver options

Returns:

Performance metrics for load-dependent network

pfqn_conwayms(N, L, Z, S, options=None)[source]

Conway Multi-Server algorithm with server specifications.

Alternative interface for Conway’s multi-server method that takes explicit server configuration parameters.

Parameters:
  • N – Population vector

  • L – Service demand matrix

  • Z – Think time vector

  • S – Server configuration matrix

  • options – Optional solver options

Returns:

Performance metrics with detailed server utilization

pfqn_cdfun(N, L, Z, options=None)[source]

Cumulative distribution function computation for product-form networks.

Computes the cumulative distribution function of response times or other performance metrics in product-form queueing networks.

Parameters:
  • N – Population vector.

  • L – Service demand matrix.

  • Z – Think time vector.

  • options – Algorithm options (optional).

Returns:

Contains ‘cdf’ values and ‘support’ points.

Return type:

dict

pfqn_nca(N, L, Z, options=None)[source]

Normalizing Constant Approximation algorithm.

Computes performance measures using approximation techniques for the normalizing constant in product-form networks.

Parameters:
  • N – Population vector.

  • L – Service demand matrix.

  • Z – Think time vector.

  • options – Algorithm options (optional).

Returns:

Performance measures (QN, UN, RN, TN).

Return type:

dict

pfqn_ncld(N, L, Z, mu, options=None)[source]

Normalizing Constant for Load-Dependent networks.

Computes performance measures using normalizing constant methods for networks with load-dependent service rates.

Parameters:
  • N – Population vector.

  • L – Service demand matrix.

  • Z – Think time vector.

  • mu – Load-dependent service rates.

  • options – Algorithm options (optional).

Returns:

Performance measures (QN, UN, RN, TN).

Return type:

dict

pfqn_pff_delay(N, L, Z, options=None)[source]

Product-form approximation for delay networks.

Parameters:
  • N – Population vector

  • L – Service demand matrix

  • Z – Think time vector

  • options – Algorithm options (optional)

Returns:

Performance metrics for delay networks

Return type:

dict

pfqn_sqni(N, L, Z, options=None)[source]

Single Queue Network Iteration algorithm.

Parameters:
  • N – Population vector

  • L – Service demand matrix

  • Z – Think time vector

  • options – Algorithm options (optional)

Returns:

Performance metrics via SQNI method

Return type:

dict

pfqn_qzgblow(M, N)[source]

Zahorjan-Gesbert lower bound algorithm.

Computes lower bounds for queue lengths using the Zahorjan-Gesbert approximation method.

Parameters:
  • M – Service demand matrix.

  • N – Population vector.

Returns:

Lower bound estimate.

Return type:

float

pfqn_qzgbup(M, N)[source]

Zahorjan-Gesbert upper bound algorithm.

Computes upper bounds for queue lengths using the Zahorjan-Gesbert approximation method.

Parameters:
  • M – Service demand matrix.

  • N – Population vector.

Returns:

Upper bound estimate.

Return type:

float

pfqn_nc_sanitize(L, N, Z)[source]

Sanitize parameters for normalizing constant computation.

Preprocesses and validates input parameters to ensure numerical stability in normalizing constant algorithms.

Parameters:
  • L – Service demand matrix.

  • N – Population vector.

  • Z – Think time vector.

Returns:

Sanitized parameters with scaling information.

Return type:

dict

pfqn_comomrm_ld(L, N, Z, S)[source]

Co-moment matching algorithm for load-dependent networks.

Applies moment matching techniques to product-form networks with load-dependent service stations.

Parameters:
  • L – Service demand matrix.

  • N – Population vector.

  • Z – Think time vector.

  • S – Server configuration matrix.

Returns:

Performance measures including normalizing constant G.

Return type:

dict

pfqn_mvaldmx_ec(L, N, Z, S)[source]

MVA for Load-Dependent Mixed networks with Error Control.

Mean Value Analysis for mixed networks with load-dependent service rates and enhanced error control mechanisms.

Parameters:
  • L – Service demand matrix.

  • N – Population vector.

  • Z – Think time vector.

  • S – Server configuration matrix.

Returns:

Performance measures with error-controlled computation.

Return type:

dict

pfqn_ab(L, N, Z=None, type='exact')[source]

Asymptotic bounds for product-form queueing networks.

Parameters:
  • L – Service demand matrix (stations x classes)

  • N – Population vector

  • Z – Think times (optional)

  • type – Type of bounds (‘exact’ or ‘approx’)

Returns:

Asymptotic bounds on throughput and response time

Return type:

dict

pfqn_le(L, N, Z=None)[source]

Little’s law equations for product-form networks.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times (optional)

Returns:

Performance metrics from Little’s law

Return type:

dict

pfqn_le_fpi(L, N, Z=None, max_iter=100)[source]

Fixed-point iteration for Little’s law equations.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times (optional)

  • max_iter – Maximum iterations

Returns:

Converged performance metrics

Return type:

dict

pfqn_le_fpiz(L, N, Z, max_iter=100)[source]

Fixed-point iteration with think time adjustment.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times

  • max_iter – Maximum iterations

Returns:

Converged performance metrics

Return type:

dict

pfqn_le_hessianz(L, N, Z)[source]

Hessian computation for product-form networks with think times.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times

Returns:

Hessian matrix

Return type:

numpy.ndarray

pfqn_mom(L, N, Z=None)[source]

Method of moments for product-form networks.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times (optional)

Returns:

First and second moments

Return type:

dict

pfqn_mu_ms(L, N, m)[source]

Service rates for multi-server product-form networks.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • m – Number of servers at each station

Returns:

Effective service rates

Return type:

numpy.ndarray

pfqn_procomom2(L, N, Z=None)[source]

Second-order product-form complementary moments.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times (optional)

Returns:

Second-order complementary moments

Return type:

dict

pfqn_schmidt(L, N, Z=None)[source]

Schmidt’s approximation for product-form networks.

Parameters:
  • L – Service demand matrix

  • N – Population vector

  • Z – Think times (optional)

Returns:

Performance metrics using Schmidt’s method

Return type:

dict

pfqn_lcfsqn_ca(alpha, beta, N=None)[source]

Convolution algorithm for multiclass LCFS queueing networks.

Computes the normalizing constant for a 2-station closed queueing network with:
  • Station 1: LCFS (Last-Come-First-Served, non-preemptive)

  • Station 2: LCFS-PR (LCFS with Preemption-Resume)

Parameters:
  • alpha – Vector of inverse service rates at station 1 (LCFS). alpha[r] = 1/mu(1,r) for class r

  • beta – Vector of inverse service rates at station 2 (LCFS-PR). beta[r] = 1/mu(2,r) for class r

  • N – Population vector, N[r] = number of jobs of class r. Default: ones(1,R) - one job per class

Returns:

(G, V) where G is the normalizing constant and V is the auxiliary term.

Return type:

tuple

Reference:

G. Casale, “A family of multiclass LCFS queueing networks with order-dependent product-form solutions”, QUESTA 2026.

pfqn_lcfsqn_mva(alpha, beta, N=None)[source]

Mean Value Analysis for multiclass LCFS queueing networks.

Computes performance metrics for a 2-station closed queueing network with:
  • Station 1: LCFS (Last-Come-First-Served, non-preemptive)

  • Station 2: LCFS-PR (LCFS with Preemption-Resume)

This implementation uses log-space arithmetic to prevent numerical underflow. The results are mathematically exact (up to floating-point precision) - no approximations are made.

Parameters:
  • alpha – Vector of inverse service rates at station 1 (LCFS). alpha[r] = 1/mu(1,r) for class r

  • beta – Vector of inverse service rates at station 2 (LCFS-PR). beta[r] = 1/mu(2,r) for class r

  • N – Population vector, N[r] = number of jobs of class r. Default: ones(1,R) - one job per class

Returns:

Dictionary containing:
  • ’T’: Throughput vector (1 x R)

  • ’Q’: Queue length matrix (2 x R)

  • ’U’: Utilization matrix (2 x R)

  • ’B’: Back probability matrix (2 x R)

Return type:

dict

Reference:

G. Casale, “A family of multiclass LCFS queueing networks with order-dependent product-form solutions”, QUESTA 2026.

pfqn_lcfsqn_nc(alpha, beta, N)[source]

Normalizing constant for multiclass LCFS queueing networks.

Computes the normalizing constant using matrix permanent calculations for a 2-station closed queueing network with Station 1 using LCFS (Last-Come-First-Served, non-preemptive) and Station 2 using LCFS-PR (LCFS with Preemption-Resume).

Parameters:
  • alpha – Vector of inverse service rates at station 1 (LCFS). alpha[r] = 1/mu(1,r) for class r

  • beta – Vector of inverse service rates at station 2 (LCFS-PR). beta[r] = 1/mu(2,r) for class r

  • N – Population vector, N[r] = number of jobs of class r.

Returns:

(G, Ax) where G is the normalizing constant and Ax is the

array of A matrices for each state.

Return type:

tuple

Reference:

G. Casale, “A family of multiclass LCFS queueing networks with order-dependent product-form solutions”, QUESTA 2026.