line_direction namespace
Classes
- struct BusInjection
- Injection-sign class flags of one bus (OR of its elements).
- struct Edge
- One circuit of the transport graph.
- struct ElementRefs
- struct LineClass
- Per-circuit classification.
- struct LineDecision
- Decision applied to one line in the LP (stored in
SystemContext). - struct Summary
- Aggregate counts for logging / tests.
Enums
Functions
- auto classify(std::span<const BusInjection> buses, std::span<const Edge> edges) -> std::vector<LineClass>
- void collect_element_refs(std::string_view expression, std::string_view element_type, ElementRefs& refs)
- auto find_radial(std::size_t n_buses, std::span<const Edge> edges) -> std::vector<bool>
- auto side_class(const BusInjection& f) -> SideClass noexcept
- Class of a side from its aggregated injection flags.
- auto side_verdict(SideClass a, SideClass b) -> Verdict noexcept
- Verdict of a radial circuit from the classes of its two sides.
- auto summarize(std::span<const LineClass> classes) -> Summary noexcept
- Count radial / one-way / dead-end / mixed circuits.
- auto verdict_name(Verdict v) -> std::string_view noexcept
Enum documentation
enum class gtopt:: line_direction:: SideClass: std::uint8_t
#include <gtopt/line_direction.hpp>
Class of one side of a radial corridor.
enum class gtopt:: line_direction:: Verdict: std::uint8_t
#include <gtopt/line_direction.hpp>
Structural verdict of one circuit.
| Enumerators | |
|---|---|
| both |
not certified (meshed, or a mixed radial side) |
| ab |
certified one-way bus_a → bus_b |
| ba |
certified one-way bus_b → bus_a |
| dead_end |
certified zero flow (removable) |
Function documentation
std::vector<LineClass> gtopt:: line_direction:: classify(std::span<const BusInjection> buses,
std::span<const Edge> edges)
#include <gtopt/line_direction.hpp>
Full classification of every circuit (see the file comment). buses.size() is the bus count; edges reference indices into it.
void gtopt:: line_direction:: collect_element_refs(std::string_view expression,
std::string_view element_type,
ElementRefs& refs)
#include <gtopt/line_direction.hpp>
std::vector<bool> gtopt:: line_direction:: find_radial(std::size_t n_buses,
std::span<const Edge> edges)
#include <gtopt/line_direction.hpp>
Mark each circuit that belongs to a radial (bridge) corridor. Parallel circuits between the same bus pair are collapsed first, so a 2-circuit corridor that is a cut is radial (both circuits marked). Self-loops are never radial. O(V + E), iterative (no recursion).
SideClass gtopt:: line_direction:: side_class(const BusInjection& f) noexcept
#include <gtopt/line_direction.hpp>
Class of a side from its aggregated injection flags.
Verdict gtopt:: line_direction:: side_verdict(SideClass a,
SideClass b) noexcept
#include <gtopt/line_direction.hpp>
Verdict of a radial circuit from the classes of its two sides.
Summary gtopt:: line_direction:: summarize(std::span<const LineClass> classes) noexcept
#include <gtopt/line_direction.hpp>
Count radial / one-way / dead-end / mixed circuits.
std::string_view gtopt:: line_direction:: verdict_name(Verdict v) noexcept
#include <gtopt/line_direction.hpp>