LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
ctmc_cosimla.h File Reference

COSIMLA (COmbined SIMulation and Linear Algebra) estimate of a stationary expectation of a Markov chain with a large or infinite state space, with a general finite regeneration set (Glynn and Zheng, WSC 2023, extending Zheng, Infanger and Glynn, WSC 2022). More...

#include <chrono>
#include <cmath>
#include <cstddef>
#include <functional>
#include <map>
#include <random>
#include <sstream>
#include <string>
#include <vector>
#include "line/api/mc/ctmc_solve.h"
#include "line/api/mc/dtmc_solve.h"
#include "line/api/sim/sim_dist.h"
#include "line/util/error.h"
#include "line/util/lu.h"
#include "line/util/matrix.h"
Include dependency graph for ctmc_cosimla.h:

Go to the source code of this file.

Classes

struct  line::mc::CosimlaSuccessors
 Successor states and their weights (probabilities for a DTMC, rates for a CTMC). More...
struct  line::mc::CosimlaOptions
 Options, with the MATLAB defaults. More...
struct  line::mc::CosimlaResult
 Estimate, confidence interval and diagnostics. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::mc

Typedefs

using line::mc::CosimlaTransition = std::function<CosimlaSuccessors(const std::vector<double>&)>
 One-step transition function; it must accept any state the chain can reach.
using line::mc::CosimlaReward = std::function<std::vector<double>(const std::vector<double>&)>
 Reward function returning one or more rewards per state.

Functions

CosimlaResult line::mc::dtmc_cosimla (const std::vector< std::vector< double > > &A, const std::vector< std::size_t > &K, const CosimlaTransition &trans, const CosimlaReward &reward, const CosimlaOptions &options=CosimlaOptions())
 COSIMLA estimate of a stationary expectation of a DTMC.
CosimlaResult line::mc::ctmc_cosimla (const std::vector< std::vector< double > > &A, const std::vector< std::size_t > &K, const CosimlaTransition &trans, const CosimlaReward &reward, const CosimlaOptions &options=CosimlaOptions())
 COSIMLA estimate of a stationary expectation of a CTMC, through its embedded jump chain; trans returns transition rates (a successor equal to the state itself is ignored).

Detailed Description

COSIMLA (COmbined SIMulation and Linear Algebra) estimate of a stationary expectation of a Markov chain with a large or infinite state space, with a general finite regeneration set (Glynn and Zheng, WSC 2023, extending Zheng, Infanger and Glynn, WSC 2022).

Port of matlab/src/api/mc/private/cosimla_core.m behind ctmc_cosimla.m and dtmc_cosimla.m. With K a subset of the finite center A, linear algebra on A gives the reward and the transitions of the chain watched on K up to its first exit from A, and simulated excursions from every boundary state (the states outside A one step away from A) back to K supply the rest. A CTMC is analysed through its embedded jump chain with reward r/q and holding weight 1/q, q the total outgoing rate.

The simulation draws from MT19937 through genrand_res53, the stream of MATLAB's RandStream('mt19937ar'): with the same seed and transition function the sample paths, and so the results, coincide with MATLAB, JAR and Python. The center is solved with dense LU, so it suits centers of up to a few thousand states.

Definition in file ctmc_cosimla.h.