LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fluid_export_odes.h File Reference

@@SolverFLD/exportODEs.m: the fluid ODE system as a standalone LaTeX document, in a form meant to be read by a person AND parsed by a program. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <string>
#include <vector>
#include "line/lang/qn/network_struct.h"
#include "line/solvers/fluid/fluid_symodes.h"
#include "line/solvers/fluid/solver_fluid.h"
#include "line/util/error.h"
Include dependency graph for fluid_export_odes.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::fluid

Functions

template<class T>
std::string line::fluid::fluid_export_odes (const qn::NetworkStruct< T > &sn, const FluidOptions &opt, const std::string &notation="scalar", const std::string &model_name="model")
 Render the fluid ODE system of sn as a LaTeX document.

Detailed Description

@@SolverFLD/exportODEs.m: the fluid ODE system as a standalone LaTeX document, in a form meant to be read by a person AND parsed by a program.

THE MACHINE-READABLE PART is the comment header, before the preamble: one % STATE s station=... class=... phase=... line per state variable and, in the J form, one % EVENT e var=... type=... coeff=... line per event. A tool that wants the system and not the typesetting reads those and stops at \documentclass. The comments are the contract; the body below them is presentation, and the two are generated from the same FluidSymSystem.

TWO NOTATIONS. scalar writes one expanded equation per state variable, which is what one reads to understand a small model. matrix writes the compact form – dx/dt = W' theta(x) + lambda, or dx/dt = J r(x) – with the numeric matrices printed once, which is the only readable option once the state space passes a few dozen entries.

WHAT IS NOT REPRODUCED, and is called out in the exported Remarks exactly as the reference calls it out: the regularization of vanishing denominators, the FCFS non-exponential re-fitting loop, and any immediate-transition elimination. The exported system is the nominal one.

Definition in file fluid_export_odes.h.