LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::lal::StateView Class Reference

Read-only view of a joint state, for functional rates and rewards (StateView). More...

#include <line/lang/lal/core.h>

Public Member Functions

 StateView (const Model &model, const std::vector< std::size_t > &state)
bool contains (const std::string &agent) const
std::string operator[] (const std::string &agent) const
std::size_t index (const std::string &agent) const
long var (const std::string &agent, const std::string &variable) const
std::vector< double > node (const std::string &agent, const std::string &node) const
double jobs (const std::string &agent, const std::string &node, const std::string &jobclass=std::string()) const
const Model & model () const
const std::vector< std::size_t > & state () const

Detailed Description

Read-only view of a joint state, for functional rates and rewards (StateView).

view[agent] is the local state name of a hand agent (the decimal global state index of an embedded one); index(agent) the local index; var(agent, v) the value of a typed variable; node(agent, node) the state row of a stateful node of an embedded LINE model, as in LINE's state space; and jobs(agent, node[, class]) the jobs at one of its stations.

Definition at line 345 of file core.h.

Constructor & Destructor Documentation

◆ StateView()

line::lal::StateView::StateView ( const Model & model,
const std::vector< std::size_t > & state )
inline

Definition at line 347 of file core.h.

References model(), and state().

Referenced by line::lal::reward_values().

Member Function Documentation

◆ contains()

bool line::lal::StateView::contains ( const std::string & agent) const
inline

Definition at line 349 of file core.h.

◆ index()

std::size_t line::lal::StateView::index ( const std::string & agent) const
inline

Definition at line 358 of file core.h.

◆ jobs()

double line::lal::StateView::jobs ( const std::string & agent,
const std::string & node,
const std::string & jobclass = std::string() ) const
inline

Definition at line 375 of file core.h.

References line::lal::AgentRecord::embedded, node(), and line::lal::value_error().

◆ model()

const Model & line::lal::StateView::model ( ) const
inline

Definition at line 382 of file core.h.

Referenced by StateView().

◆ node()

std::vector< double > line::lal::StateView::node ( const std::string & agent,
const std::string & node ) const
inline

Definition at line 368 of file core.h.

References line::lal::AgentRecord::embedded, node(), and line::lal::value_error().

Referenced by jobs(), and node().

◆ operator[]()

std::string line::lal::StateView::operator[] ( const std::string & agent) const
inline

Definition at line 351 of file core.h.

References line::lal::AgentRecord::embedded, and line::lal::AgentRecord::states.

◆ state()

const std::vector< std::size_t > & line::lal::StateView::state ( ) const
inline

Definition at line 383 of file core.h.

Referenced by StateView().

◆ var()

long line::lal::StateView::var ( const std::string & agent,
const std::string & variable ) const
inline

The documentation for this class was generated from the following file:
  • include/line/lang/lal/core.h