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

Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port. More...

#include <cmath>
#include <cstddef>
#include <functional>
#include <limits>
#include <memory>
#include <string>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for lang_types.h:

Go to the source code of this file.

Classes

struct  line::lang::GlobalConstants
 The MATLAB GlobalConstants, as reported by lineStart at its defaults. More...
struct  line::lang::Distrib< T >
struct  line::lang::PriorSpec< T >
 A LINE Distribution, as the model layer and sn carry it. More...

Namespaces

namespace  line
namespace  line::lang

Typedefs

template<class T>
using line::lang::CdScaling = std::function<std::vector<T>(const std::vector<T>&)>
 A class-dependent scaling map, sn.cdscaling.
template<class T>
using line::lang::GdScaling = std::function<std::vector<T>(const std::vector<T>&)>
 A globally state-dependent scaling, sn.gdscaling.

Enumerations

enum class  line::lang::MetricType {
  line::lang::ResidT = 0 , line::lang::RespT = 1 , line::lang::DropRate = 2 , line::lang::QLen = 3 ,
  line::lang::QueueT = 4 , line::lang::FCRWeight = 5 , line::lang::FCRMemOcc = 6 , line::lang::FJQLen = 7 ,
  line::lang::FJRespT = 8 , line::lang::RespTSink = 9 , line::lang::SysQLen = 10 , line::lang::SysRespT = 11 ,
  line::lang::SysTput = 12 , line::lang::Tput = 13 , line::lang::ArvR = 14 , line::lang::TputSink = 15 ,
  line::lang::Util = 16 , line::lang::TranQLen = 17 , line::lang::TranUtil = 18 , line::lang::TranTput = 19 ,
  line::lang::TranRespT = 20 , line::lang::Tard = 21 , line::lang::SysTard = 22
}
 Solver output metrics, with the numeric values of MATLAB MetricType. More...
enum class  line::lang::EventType {
  line::lang::INIT = -1 , line::lang::LOCAL = 0 , line::lang::ARV = 1 , line::lang::DEP = 2 ,
  line::lang::PHASE = 3 , line::lang::READ = 4 , line::lang::STAGE = 5 , line::lang::ENABLE = 6 ,
  line::lang::FIRE = 7 , line::lang::PRE = 8 , line::lang::POST = 9 , line::lang::RENEGE = 10 ,
  line::lang::RETRY = 11 , line::lang::SWITCH = 12 , line::lang::FAILURE = 13 , line::lang::REPAIR = 14 ,
  line::lang::START = 15 , line::lang::PREEMPT = 16
}
 The events a state can undergo, with the values of MATLAB EventType. More...
enum class  line::lang::SignalType { line::lang::REPLY = 0 , line::lang::NEGATIVE = 1 , line::lang::CATASTROPHE = 2 }
 G-network signal classes, with the values of MATLAB SignalType. More...
enum class  line::lang::RemovalPolicy { line::lang::RANDOM = 0 , line::lang::FCFS = 1 , line::lang::LCFS = 2 }
 Which job a negative signal removes, with the values of MATLAB RemovalPolicy. More...
enum class  line::lang::SchedStrategy {
  line::lang::INF = 0 , line::lang::FCFS = 1 , line::lang::LCFS = 2 , line::lang::SIRO = 3 ,
  line::lang::SJF = 4 , line::lang::LJF = 5 , line::lang::PS = 6 , line::lang::DPS = 7 ,
  line::lang::GPS = 8 , line::lang::SEPT = 9 , line::lang::LEPT = 10 , line::lang::HOL = 11 ,
  line::lang::FORK = 12 , line::lang::EXT = 13 , line::lang::REF = 14 , line::lang::LCFSPR = 15 ,
  line::lang::POLLING = 16 , line::lang::PSPRIO = 17 , line::lang::DPSPRIO = 18 , line::lang::GPSPRIO = 19 ,
  line::lang::LCFSPI = 20 , line::lang::LCFSPRIO = 21 , line::lang::LCFSPRPRIO = 22 , line::lang::LCFSPIPRIO = 23 ,
  line::lang::FCFSPR = 24 , line::lang::FCFSPI = 25 , line::lang::FCFSPRPRIO = 26 , line::lang::FCFSPIPRIO = 27 ,
  line::lang::SRPT = 28 , line::lang::SRPTPRIO = 29 , line::lang::EDD = 30 , line::lang::EDF = 31 ,
  line::lang::LPS = 32 , line::lang::PSJF = 33 , line::lang::FB = 34 , line::lang::LRPT = 35 ,
  line::lang::SETF = 36 , line::lang::FSP = 37 , line::lang::PAS = 38 , line::lang::OI = 39 ,
  line::lang::NONE = -1
}
 Scheduling disciplines, with the values of MATLAB SchedStrategy. More...
enum class  line::lang::NodeType {
  line::lang::Queue = 0 , line::lang::Source = 1 , line::lang::Delay = 2 , line::lang::ClassSwitch = 3 ,
  line::lang::Logger = 4 , line::lang::Cache = 5 , line::lang::Router = 6 , line::lang::Fork = 7 ,
  line::lang::Place = 8 , line::lang::Transition = 9 , line::lang::Region = 10 , line::lang::Join = 11 ,
  line::lang::Sink = 12
}
 Node kinds, with the values of MATLAB NodeType. More...
enum class  line::lang::TimingStrategy { line::lang::TIMED = 0 , line::lang::IMMEDIATE = 1 }
 SPN transition timing, with the values of MATLAB TimingStrategy. More...
enum class  line::lang::JobClassType { line::lang::OPEN = 0 , line::lang::CLOSED = 1 }
 Job class kinds, with the values of MATLAB JobClassType. More...
enum class  line::lang::PollingType { line::lang::GATED = 0 , line::lang::EXHAUSTIVE = 1 , line::lang::KLIMITED = 2 , line::lang::DECREMENTING = 3 }
 Polling service disciplines, with the values of MATLAB PollingType. More...
enum class  line::lang::ReplacementStrategy {
  line::lang::RR = 0 , line::lang::FIFO = 1 , line::lang::SFIFO = 2 , line::lang::LRU = 3 ,
  line::lang::HLRU = 4 , line::lang::CLIMB = 5 , line::lang::QLRU = 6
}
 Cache replacement policies, with the values of MATLAB ReplacementStrategy. More...
enum class  line::lang::RoutingStrategy {
  line::lang::RAND = 0 , line::lang::PROB = 1 , line::lang::RROBIN = 2 , line::lang::WRROBIN = 3 ,
  line::lang::JSQ = 4 , line::lang::FIRING = 5 , line::lang::SQ = 6 , line::lang::SDR = 7 ,
  line::lang::DISABLED = -1
}
 Routing strategies, with the values of MATLAB RoutingStrategy. More...
enum class  line::lang::DropStrategy {
  line::lang::WAITQ = -1 , line::lang::DROP = 1 , line::lang::BAS = 2 , line::lang::BBS = 3 ,
  line::lang::RSRD = 4 , line::lang::RETRIAL = 5 , line::lang::RETRIAL_WITH_LIMIT = 6
}
 Blocking and loss rules, with the values of MATLAB DropStrategy. More...
enum class  line::lang::ImpatienceType { line::lang::NONE = 0 , line::lang::RENEGING = 1 , line::lang::BALKING = 2 , line::lang::RETRIAL = 3 }
 Impatience kinds, with the values of MATLAB ImpatienceType. More...
enum class  line::lang::BalkingStrategy { line::lang::NONE = 0 , line::lang::QUEUE_LENGTH = 1 , line::lang::EXPECTED_WAIT = 2 , line::lang::COMBINED = 3 }
 Balking rules, with the values of MATLAB BalkingStrategy. More...
enum class  line::lang::HeteroSchedPolicy {
  line::lang::ORDER = 0 , line::lang::ALIS = 1 , line::lang::ALFS = 2 , line::lang::FAIRNESS = 3 ,
  line::lang::FSF = 4 , line::lang::RAIS = 5
}
 How a heterogeneous station picks among its server types, MATLAB HeteroSchedPolicy. More...
enum class  line::lang::DepartureDiscipline { line::lang::NORMAL = 0 , line::lang::FIFO = 1 }
 When a Place releases a served token, MATLAB DepartureDiscipline. More...
enum class  line::lang::JoinStrategy { line::lang::STD = 1 , line::lang::PARTIAL = 2 }
 Join rules, with the values of MATLAB JoinStrategy. More...
enum class  line::lang::LqnElement {
  line::lang::HOST = 0 , line::lang::TASK = 1 , line::lang::ENTRY = 2 , line::lang::ACTIVITY = 3 ,
  line::lang::CALL = 4
}
 LQN element kinds, with the values of MATLAB LayeredNetworkElement. More...
enum class  line::lang::CallType { line::lang::NONE = 0 , line::lang::SYNC = 1 , line::lang::ASYNC = 2 , line::lang::FWD = 3 }
 Call kinds, with the values of MATLAB CallType. More...
enum class  line::lang::PrecedenceType {
  line::lang::NONE = 0 , line::lang::PRE_SEQ = 1 , line::lang::PRE_AND = 2 , line::lang::PRE_OR = 3 ,
  line::lang::POST_SEQ = 11 , line::lang::POST_AND = 12 , line::lang::POST_OR = 13 , line::lang::POST_LOOP = 14 ,
  line::lang::POST_CACHE = 15
}
 Activity precedence kinds, with the values of MATLAB ActivityPrecedenceType. More...
enum class  line::lang::ProcessType {
  line::lang::EXP = 0 , line::lang::ERLANG = 1 , line::lang::HYPEREXP = 2 , line::lang::PH = 3 ,
  line::lang::APH = 4 , line::lang::MAP = 5 , line::lang::UNIFORM = 6 , line::lang::DET = 7 ,
  line::lang::COXIAN = 8 , line::lang::GAMMA = 9 , line::lang::PARETO = 10 , line::lang::MMPP2 = 11 ,
  line::lang::REPLAYER = 12 , line::lang::IMMEDIATE = 13 , line::lang::DISABLED = 14 , line::lang::COX2 = 15 ,
  line::lang::WEIBULL = 16 , line::lang::LOGNORMAL = 17 , line::lang::DUNIFORM = 18 , line::lang::BERNOULLI = 19 ,
  line::lang::PRIOR = 20 , line::lang::BINOMIAL = 21 , line::lang::POISSON = 22 , line::lang::GEOMETRIC = 23 ,
  line::lang::BMAP = 24 , line::lang::ME = 25 , line::lang::RAP = 26 , line::lang::DISCRETESAMPLER = 27 ,
  line::lang::ZIPF = 28 , line::lang::DMAP = 29 , line::lang::MMAP = 31 , line::lang::EMPIRICALCDF = 32 ,
  line::lang::NHPP = 33 , line::lang::MAPT = 34 , line::lang::PHT = 35 , line::lang::NORMAL = 100 ,
  line::lang::NONE = -1
}
 Distribution kinds, with the values of MATLAB ProcessType. More...

Functions

const char * line::lang::metric_to_text (MetricType metric)
 Port of MetricType.toText.
const char * line::lang::event_to_text (EventType e)
const char * line::lang::sched_to_text (SchedStrategy s)
SchedStrategy line::lang::sched_from_lqnx (const std::string &s)
 Parse the scheduling attribute of an .lqnx processor or task.
std::string line::lang::sched_to_lqnx (SchedStrategy s)
 The scheduling attribute an .lqnx processor or task carries for a strategy.
const char * line::lang::node_type_to_text (NodeType t)
 Name of a node kind, for diagnostics.
const char * line::lang::routing_to_text (RoutingStrategy r)
const char * line::lang::process_to_text (ProcessType p)
 The MATLAB ProcessType name, as sn.procid prints it.
bool line::lang::process_is_markovian (ProcessType p)
 ProcessType.isMarkovian: true when sn.proc carries an exact matrix representation of the law, rather than the Erlang fit convertToMAP leaves there for the parameter-only families.

Detailed Description

Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port.

The numeric values are the MATLAB ones (matlab/src/lang/constant), not a fresh numbering, because they cross the JSON boundary and appear in the dumps used as parity oracles. _kb/11 records that MATLAB and Python disagree on ProcessType numbering (MATLAB starts at EXP=0, Python at EXP=1); this port follows MATLAB, the reference implementation, so a numeric comparison against a MATLAB dump is meaningful and one against a Python dump is not – compare by name there.

SCOPE: the model layer added here exists to run SolverLN over a layered queueing network whose layers are solved by SolverMVA. It carries the scheduling disciplines, node kinds and precedence types that path reaches and REFUSES the rest by name rather than silently mapping them onto a neighbour, because a discipline that is silently treated as FCFS returns a plausible number that is wrong.

Definition in file lang_types.h.