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

Per-class queue lengths seen by each arriving job, reconstructed from arrival and response time samples. More...

#include <algorithm>
#include <cstddef>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for infer_compute_ql_at_arrival.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::infer

Functions

template<class T>
Matrix< T > line::infer::infer_compute_ql_at_arrival (const std::vector< T > &at, const std::vector< long > &at_jobid, const std::vector< T > &rt, const std::vector< long > &rt_jobid, const std::vector< std::size_t > &cls, std::size_t R)
 Per-class queue lengths seen by each arriving job, reconstructed from arrival and response time samples.

Detailed Description

Per-class queue lengths seen by each arriving job, reconstructed from arrival and response time samples.

Templated port of matlab/src/api/infer/infer_compute_ql_at_arrival.m (the shipped .mexa64 is a compiled copy of that same .m). No JAR counterpart.

Arrivals and response times are matched by job id, so the two sample sets need not be in the same order nor come from the same source. Each job is turned into an arrival event at t and a departure event at t + rt; the events are replayed in time order, departures before arrivals at a tie, and the state recorded at each arrival is the queue seen by that job INCLUDING itself (the arriving job is counted first, then the state is read).

ARITHMETIC: only comparisons and one addition per job, so a finite field computation, exact in the exact instantiation. Exactness matters here: with rational timestamps a tie between a departure and an arrival is decided by the documented rule rather than by rounding.

Definition in file infer_compute_ql_at_arrival.h.