LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::mapqn::MapqnP1Index Struct Reference

Variable layout of the p1-level models. More...

#include <line/api/mapqn/mapqn_p1_common.h>

Collaboration diagram for line::mapqn::MapqnP1Index:

Public Member Functions

 MapqnP1Index ()
 MapqnP1Index (int m, int n, const std::vector< int > &k, bool with_p2)
std::size_t pk (int i, int k) const
 Flat (queue, phase) index, range sumK.
std::size_t half (int i, int ni, int h) const
 Flat (queue, population, phase) half-index, range block.
std::size_t U (int i, int k) const
std::size_t IT (int i, int k) const
std::size_t Q (int i, int k) const
std::size_t C (int j, int k, int i) const
std::size_t p1 (int j, int k, int i, int ni, int h) const
std::size_t p1c (int j, int k, int i, int ni, int h) const
std::size_t p2 (int j, int nj, int k, int i, int ni, int h) const
std::size_t num_vars () const

Public Attributes

int M = 0
int N = 0
std::vector< int > K
std::vector< int > cumK
 cumK[i] = sum_{i' < i} K(i')
std::size_t sumK = 0
 sum_i K(i)
std::size_t block = 0
 (N+1) * sumK, the pairwise half-index range
bool has_p2 = false
std::size_t off_U = 0
std::size_t off_IT = 0
std::size_t off_Q = 0
std::size_t off_C = 0
std::size_t off_p1 = 0
std::size_t off_p1c = 0
std::size_t off_p2 = 0
std::size_t total = 0

Detailed Description

Variable layout of the p1-level models.

with_p2 selects the quadratic reduction's extra block; the linear reduction carries no joint variables at all, and allocating them would square the model for nothing.

Definition at line 55 of file mapqn_p1_common.h.

Constructor & Destructor Documentation

◆ MapqnP1Index() [1/2]

line::mapqn::MapqnP1Index::MapqnP1Index ( )
inline

Definition at line 65 of file mapqn_p1_common.h.

◆ MapqnP1Index() [2/2]

line::mapqn::MapqnP1Index::MapqnP1Index ( int m,
int n,
const std::vector< int > & k,
bool with_p2 )
inline

Definition at line 66 of file mapqn_p1_common.h.

References block, cumK, has_p2, K, M, N, off_C, off_IT, off_p1, off_p1c, off_p2, off_Q, off_U, sumK, and total.

Member Function Documentation

◆ C()

std::size_t line::mapqn::MapqnP1Index::C ( int j,
int k,
int i ) const
inline

Definition at line 96 of file mapqn_p1_common.h.

References M, off_C, and pk().

◆ half()

std::size_t line::mapqn::MapqnP1Index::half ( int i,
int ni,
int h ) const
inline

Flat (queue, population, phase) half-index, range block.

Definition at line 87 of file mapqn_p1_common.h.

References cumK, K, and N.

Referenced by p1(), p1c(), and p2().

◆ IT()

std::size_t line::mapqn::MapqnP1Index::IT ( int i,
int k ) const
inline

Definition at line 94 of file mapqn_p1_common.h.

References off_IT, and pk().

Referenced by line::mapqn::mapqn_bnd_lr(), and line::mapqn::mapqn_bnd_qr().

◆ num_vars()

std::size_t line::mapqn::MapqnP1Index::num_vars ( ) const
inline

Definition at line 109 of file mapqn_p1_common.h.

References total.

Referenced by line::mapqn::mapqn_bnd_lr(), and line::mapqn::mapqn_bnd_qr().

◆ p1()

std::size_t line::mapqn::MapqnP1Index::p1 ( int j,
int k,
int i,
int ni,
int h ) const
inline

Definition at line 99 of file mapqn_p1_common.h.

References block, half(), off_p1, and pk().

◆ p1c()

std::size_t line::mapqn::MapqnP1Index::p1c ( int j,
int k,
int i,
int ni,
int h ) const
inline

Definition at line 102 of file mapqn_p1_common.h.

References block, half(), off_p1c, and pk().

◆ p2()

std::size_t line::mapqn::MapqnP1Index::p2 ( int j,
int nj,
int k,
int i,
int ni,
int h ) const
inline

Definition at line 105 of file mapqn_p1_common.h.

References block, half(), and off_p2.

◆ pk()

std::size_t line::mapqn::MapqnP1Index::pk ( int i,
int k ) const
inline

Flat (queue, phase) index, range sumK.

Definition at line 83 of file mapqn_p1_common.h.

References cumK.

Referenced by C(), IT(), p1(), p1c(), Q(), and U().

◆ Q()

std::size_t line::mapqn::MapqnP1Index::Q ( int i,
int k ) const
inline

Definition at line 95 of file mapqn_p1_common.h.

References off_Q, and pk().

Referenced by line::mapqn::mapqn_bnd_lr(), and line::mapqn::mapqn_bnd_qr().

◆ U()

std::size_t line::mapqn::MapqnP1Index::U ( int i,
int k ) const
inline

Definition at line 93 of file mapqn_p1_common.h.

References off_U, and pk().

Referenced by line::mapqn::mapqn_bnd_lr(), and line::mapqn::mapqn_bnd_qr().

Member Data Documentation

◆ block

std::size_t line::mapqn::MapqnP1Index::block = 0

(N+1) * sumK, the pairwise half-index range

Definition at line 60 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), p1(), p1c(), and p2().

◆ cumK

std::vector<int> line::mapqn::MapqnP1Index::cumK

cumK[i] = sum_{i' < i} K(i')

Definition at line 58 of file mapqn_p1_common.h.

Referenced by half(), MapqnP1Index(), and pk().

◆ has_p2

bool line::mapqn::MapqnP1Index::has_p2 = false

Definition at line 61 of file mapqn_p1_common.h.

Referenced by MapqnP1Index().

◆ K

std::vector<int> line::mapqn::MapqnP1Index::K

Definition at line 57 of file mapqn_p1_common.h.

Referenced by half(), and MapqnP1Index().

◆ M

int line::mapqn::MapqnP1Index::M = 0

Definition at line 56 of file mapqn_p1_common.h.

Referenced by C(), and MapqnP1Index().

◆ N

int line::mapqn::MapqnP1Index::N = 0

Definition at line 56 of file mapqn_p1_common.h.

Referenced by half(), and MapqnP1Index().

◆ off_C

std::size_t line::mapqn::MapqnP1Index::off_C = 0

Definition at line 62 of file mapqn_p1_common.h.

Referenced by C(), and MapqnP1Index().

◆ off_IT

std::size_t line::mapqn::MapqnP1Index::off_IT = 0

Definition at line 62 of file mapqn_p1_common.h.

Referenced by IT(), and MapqnP1Index().

◆ off_p1

std::size_t line::mapqn::MapqnP1Index::off_p1 = 0

Definition at line 63 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and p1().

◆ off_p1c

std::size_t line::mapqn::MapqnP1Index::off_p1c = 0

Definition at line 63 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and p1c().

◆ off_p2

std::size_t line::mapqn::MapqnP1Index::off_p2 = 0

Definition at line 63 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and p2().

◆ off_Q

std::size_t line::mapqn::MapqnP1Index::off_Q = 0

Definition at line 62 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and Q().

◆ off_U

std::size_t line::mapqn::MapqnP1Index::off_U = 0

Definition at line 62 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and U().

◆ sumK

std::size_t line::mapqn::MapqnP1Index::sumK = 0

sum_i K(i)

Definition at line 59 of file mapqn_p1_common.h.

Referenced by MapqnP1Index().

◆ total

std::size_t line::mapqn::MapqnP1Index::total = 0

Definition at line 63 of file mapqn_p1_common.h.

Referenced by MapqnP1Index(), and num_vars().


The documentation for this struct was generated from the following file: