LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
solver_ag_autocat.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012-2026, QORE Lab, Imperial College London
3 * All rights reserved.
4 */
5#ifndef LINE_SOLVERS_AG_SOLVER_AG_AUTOCAT_H
6#define LINE_SOLVERS_AG_SOLVER_AG_AUTOCAT_H
7
8/**
9 * @file
10 * @ingroup line_solvers
11 * `solver_ag_autocat.m`, the optimization-based search for RCAT product-form
12 * solutions. Refused by name, on two independent grounds either of which is
13 * sufficient.
14 *
15 * IT IS ALREADY DEAD IN THE REFERENCE. `SolverMAM.listValidMethods` no longer
16 * lists 'exact', and its comment says why: "'exact' method removed - autocat
17 * moved to line-legacy.git". `solver_mam_analyzer.m` never calls autocat on any
18 * path, and the one remaining reference to it, the 'exact' case of
19 * `solver_mam_ag.m`, does not call it either -- it emits a line_warning and
20 * falls back to INAP. The .m file still sitting in matlab/src/solvers/MAM is a
21 * leftover of that move, not live code. Porting it would put a method into the
22 * C++ solver that the reference cannot reach, so the two would disagree by
23 * construction on every model.
24 *
25 * IT NEEDS A MATHEMATICAL PROGRAMMING STACK THIS PORT DOES NOT HAVE. Eleven of
26 * its fourteen relaxations bottom out in `linprog` or `fmincon` from the MATLAB
27 * Optimization Toolbox: LP relaxation with McCormick envelopes, the tightened
28 * LP and zero-potential families with cutting planes, and the interior-point
29 * nonlinear programs behind 'ens' and 'qcp'. There is no LP or NLP solver
30 * anywhere under cpp/include/line, and writing one to serve a dead code path
31 * would be a large piece of numerics whose correctness nothing here could
32 * check.
33 *
34 * The live RCAT path is `solver_mam_ag.h`, which is ported: INAP, INAP+ and the
35 * matrix-geometric INAPINF. Callers wanting a product form should use those.
36 */
37
38#include <string>
39
43#include "line/util/error.h"
44
45namespace line {
46namespace ag {
47
48/**
49 * The reference signature takes RCAT rate matrices and an action-process map
50 * rather than a NetworkStruct, because autocat sits below the network layer.
51 * The port keeps the struct-level signature the dispatch would need, since
52 * there is no body for the other one to feed.
53 *
54 * It returns the plain `mva::MvaSolution<T>` the other analyzers return, not a
55 * wrapper carrying `actualmethod`: nothing can observe the return of a function
56 * that always throws, and the wrapper would leave the dispatch with a third
57 * result shape to unpack for no gain. `solver_mam_ag.h`'s `AgResult` stays a
58 * wrapper because it carries a payload of its own.
59 */
60template <class T>
62 throw UnsupportedError(
63 "SolverAG: solver_ag_autocat is not ported. It is dead in the reference -- "
64 "SolverMAM.listValidMethods dropped 'exact' when autocat moved to line-legacy.git, "
65 "solver_mam_analyzer never calls it, and solver_mam_ag's 'exact' case warns and falls "
66 "back to INAP -- and it needs MATLAB's linprog and fmincon (McCormick-envelope LP "
67 "relaxations, cutting planes, interior-point nonlinear programs), for which this port has "
68 "no LP or NLP solver. Use method 'inap', 'inapplus' or 'inapinf', which are ported in "
69 "solver_mam_ag.h");
70}
71
72} // namespace ag
73} // namespace line
74
75#endif // LINE_SOLVERS_AG_SOLVER_AG_AUTOCAT_H
Options of the agent-based (RCAT) solver.
UnsupportedError(const std::string &what)
Definition error.h:51
A network plus its refreshed NetworkStruct.
The exception types the port throws.
The option and result types every MVA analyzer shares.
mva::MvaSolution< T > solver_ag_autocat(const qn::NetworkStruct< T > &, const AgOptions &)
The reference signature takes RCAT rate matrices and an action-process map rather than a NetworkStruc...
A queueing network and its refreshed NetworkStruct.
Class-level results, the [Q,U,R,T,C,X] of the MATLAB analyzers.
Definition mva_types.h:96