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

Port of matlab/src/api/sn/sn_is_discrete_time.m. More...

#include <cmath>
#include <cstddef>
#include <string>
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for sn_is_discrete_time.h:

Go to the source code of this file.

Classes

struct  line::api::DiscreteTimeInfo
 Which laws the model carries, and why it was refused when it was. More...
struct  line::api::DiscreteTimeOptions
 How the caller may override the automatic decision. More...

Namespaces

namespace  line
namespace  line::api

Functions

template<class T>
bool line::api::sn_is_discrete_time (const qn::NetworkStruct< T > &sn, const DiscreteTimeOptions &options, double *slot_length, DiscreteTimeInfo *info)
 True when every law of sn is lattice-valued on slot_length.

Detailed Description

Port of matlab/src/api/sn/sn_is_discrete_time.m.

Decides whether every interarrival and service law of a model lives on the slot lattice {slotLength, 2*slotLength, ...}, which is what lets SolverMAM take the discrete-time (Q-MAM) path instead of the continuous one.

The test reads procid, rates and scv and NOT the fitted proc matrices: by the time a solver sees the struct a Geometric has already been converted to a CONTINUOUS MAP, so the lattice is no longer visible there. A DMAP is the exception, its (D0,D1) having MAP shape it survives verbatim. For the same reason this test must run BEFORE any phase-type conversion.

ARITHMETIC: field, with one square root in the DiscreteUniform width. Every other test is a comparison, so the family instantiates under Rational apart from that branch, which needs a real square root.

Definition in file sn_is_discrete_time.h.