![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of @@SolverFLD/getJacobian, all four of its outputs. More...
#include <map>#include <memory>#include <string>#include <vector>#include "line/api/sym/sage_rest_engine.h"#include "line/api/sym/sym_engine.h"#include "line/api/sym/sym_engines.h"#include "line/solvers/fluid/fluid_symodes.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::fluid::FluidSymbolicOptions |
| Backend selection, mirroring options.config.symbolic and its timeout. More... | |
| struct | line::fluid::FluidJacobian |
| The four outputs of @@SolverFLD/getJacobian. More... | |
Namespaces | |
| namespace | line |
| namespace | line::fluid |
Functions | |
| FluidJacobian | line::fluid::fluid_jacobian (const FluidSymSystem &sys, const FluidSymbolicOptions &opt=FluidSymbolicOptions()) |
| Jacobian, drift and equilibria of the mean-field vector field. | |
Port of @@SolverFLD/getJacobian, all four of its outputs.
The reference builds the drift locally with getSymbolicDrift and then posts it to the line-sage-rest backend, asking for the Jacobian and, when a fourth output is requested, the solutions of f(x) = 0. This header does the same: fluid_symbolic_drift supplies rhs and vars, sym::sym_resolve supplies the backend, and SymEngine::fluidODEs answers.
WHY THE BACKEND IS NOT OPTIONAL FOR THE EQUILIBRIA. Differentiating the drift is structural – fluid_symbolic_jacobian does it exactly by the chain rule over the typed factors of FluidSymSystem, with no algebra system in sight – but SOLVING f(x) = 0 in closed form is not. There is no local answer to fall back to, so a request for equilibria without a backend is refused by name, with the same guidance the reference's SAGE.require() prints. Returning an empty list instead would read as "this system has no equilibria", which is a different and false statement.
DIVERGENCE, DELIBERATE: when equilibria are NOT asked for and no backend resolves, this returns the locally differentiated Jacobian rather than erroring as the reference does. The entries are the same derivative, obtained without a 3 GB container; refusing to answer a question we can answer exactly would be a worse port than answering it. FluidJacobian::engine names which path produced them, so a caller comparing text against MATLAB knows whether it is comparing against SAGE's normal form or this port's.
The smoothness gate is upstream, in fluid_symbolic_drift: a drift that scales rates by min(n_i, S_i) has no Jacobian at n_i = S_i and is refused before any backend is contacted.
Definition in file fluid_jacobian.h.