5#ifndef LINE_API_MAPQN_MAPQN_BND_QR_DELAY_H
6#define LINE_API_MAPQN_MAPQN_BND_QR_DELAY_H
53 int objective_phase,
int objective_n,
56 if (p.
N < 1)
throw InputError(
"mapqn_bnd_qr_delay: N must be at least 1");
57 if (p.
M < 2)
throw InputError(
"mapqn_bnd_qr_delay: the delay model needs at least two queues");
58 detail::qr_check_objective(p, objective_queue, objective_phase, objective_n);
81 return detail::qr_finish(p, idx, m, objective_queue, objective_phase, objective_n, sense);
Sparse LP in the natural form, with per-variable bounds.
void set_bounds(std::size_t j, const T &lo, const T &hi)
The exception types the port throws.
Model parameters and variable indexing shared by the mapqn QR bounds.
The constraint families of the quadratic-reduction (QR) polytope.
MapqnQrResult< T > mapqn_bnd_qr_delay(const MapqnParams< T > &p, int objective_queue, int objective_phase, int objective_n, MapqnSense sense=MapqnSense::Max)
Bound P(queue objective_queue holds objective_n jobs in phaseobjective_phase) for a network with a de...
void qr_pc2(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
PC2 (second moment): sum_{i,j,ni>=1,nj>=1,h,k} nj ni p2(j,nj,k,i,ni,h) = N^2.
void qr_qbal(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
QBAL (queue balance): LHS1 + LHS2 = RHS1 + RHS2 for each (i,k).
void qr_thm4(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM4 (QMIN): for each (j,k,i), sum_{t,h,nj,nt} nt p2(j,nj,k,t,nt,h) >= N sum_{h,nj,...
void qr_thm1(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM1 (Little's law in probability form): for each (j,k), sum_{i,nj>=1,ni>=1,h} ni p2(j,...
std::vector< char > qr_zero_bounds(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
ZERO1/2/3: states that carry no probability mass, imposed as ub = 0.
MapqnSense
Which direction the bound is taken in.
void qr_xz(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
XZ (delay model only): the think-time balance sum_{ni>=1,k} ni p2(M,ni,k,M,ni,k) = (Z/D1) sum_{k,...
void qr_symmetry(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m, const std::vector< char > &is_zero)
SYMMETRY: p2(i,ni,h,j,nj,k) = p2(j,nj,k,i,ni,h), emitted once per pair.
void qr_marginals(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
MARGINALS: p2(j,nj,k,j,nj,k) = sum over (ni <= N-nj, h) of p2(j,nj,k,i,ni,h) for every i !...
void qr_one(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
ONE: sum over (nj,k) of p2(j,nj,k,j,nj,k) = 1, per queue j.
void qr_thm1c(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM1c: the nj = 0 companion of THM1, conditioning on queue j being empty.
void qr_thm2(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM2 (phase balance): for each (i,k) the total rate out of phase k at queue i equals the total rate i...
void qr_thm3a(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM3a (population flow balance, 1 <= ni <= N-1): the rate at which queue i is entered while holding n...
void qr_cor1a(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
COR1a: the order-1 correlation cut, for each (i, kstar, ni = 0..N-2).
void qr_thm3b(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
THM3b: the ni = 0 boundary case of THM3a, resolved per arrival phase u.
void qr_cor1b(const MapqnParams< T > &p, const P2Index &idx, lp::LpModel< T > &m)
COR1b: the ni = N-1 boundary of COR1a (blocks A', C', D', E', H').
Number-type abstraction for the templated API port.
Templated primal simplex with Bland's rule.
Parameters of a MAP queueing network for the QR bounds.
std::vector< int > K
K[i] = number of phases at queue i.
Result of a QR bound solve.
Flat index of the joint variable p2(j,nj,k,i,ni,h).
std::size_t num_vars() const