5#ifndef LINE_API_SN_SN_SCHEDULE_NOMINAL_H
6#define LINE_API_SN_SN_SCHEDULE_NOMINAL_H
60 std::vector<std::vector<Matrix<T> > >
segMark;
61 std::vector<std::vector<std::vector<Matrix<T> > > >
segBatch;
67 if (ist >=
sn.service.size() || r >=
sn.service[ist].size())
return false;
68 return sn.service[ist][r].has_schedule();
76 throw InputError(
"sn_schedule_nominal: station " + std::to_string(ist + 1) +
", class " +
77 std::to_string(r + 1) +
78 " carries no MAPt/PHt schedule; read sn.service[i][r].D0 for an "
86 const std::size_t nseg = d.
sched_D0.size();
87 if (d.
sched_bp.size() == nseg + 1 && d.
sched_D1.size() == nseg && nseg > 0) {
90 for (std::size_t k = 0; k < nseg; ++k) total += d.
sched_bp[k + 1] - d.
sched_bp[k];
93 for (std::size_t k = 0; k < nseg; ++k) {
95 for (std::size_t a = 0; a < out.
D0bar.rows(); ++a)
96 for (std::size_t b = 0; b < out.
D0bar.cols(); ++b)
98 for (std::size_t a = 0; a < out.
D1bar.rows(); ++a)
99 for (std::size_t b = 0; b < out.
D1bar.cols(); ++b)
A network plus its refreshed NetworkStruct.
The exception types the port throws.
Enumerations and the minimal distribution descriptor shared by the model layer of the C++ port.
Dense matrix and non-owning view.
ScheduleNominal< T > sn_schedule_nominal(const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r)
Port of sn_schedule_nominal(sn, ist, r); ist and r are 0-based here.
bool sn_has_schedule(const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t r)
True when (ist, r) carries a MAPt / PHt / NHPP schedule.
Conservation laws of a layered queueing network, enumerated from its structure.
A queueing network and its refreshed NetworkStruct.
Number-type abstraction for the templated API port.
std::vector< std::vector< std::vector< Matrix< T > > > > sched_Dbatch
The BATCH marked schedule, sched_Dbatch[c][b][k] being the block that, in segment k,...
Matrix< T > D0
The (D0,D1) pair when the type carries one directly.
std::vector< std::vector< Matrix< T > > > sched_Dmark
The MARKED schedule, sched_Dmark[c][k] being the block of mark c+1 in segment k.
std::vector< T > sched_bp
sn.proc{i}{r} = {breakpoints, A, B, cyclic} of a MAPt / PHt / NHPP.
std::vector< Matrix< T > > sched_D1
std::vector< Matrix< T > > sched_D0
What sn_schedule_nominal returns, in the reference's own output order.
std::vector< std::vector< std::vector< Matrix< T > > > > segBatch
Matrix< T > D1bar
the width-weighted time average
std::vector< Matrix< T > > segD1
per-segment D1
std::vector< T > breakpoints
the boundary vector, nseg + 1 long
std::vector< Matrix< T > > segD0
per-segment D0, already in MAP form
std::vector< std::vector< Matrix< T > > > segMark
The reference's 7th and 8th outputs: the per-mark blocks of a marked schedule, segMark[c][k] being ma...