Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
Loading...
Searching...
No Matches
icarus::TopologyAnalyzer Class Reference

Utility class for building and analyzing component dependency graphs. More...

#include <TopologyAnalyzer.hpp>

Static Public Member Functions

static DependencyGraph BuildGraph (const SimulatorConfig &config, const std::vector< signal::SignalRoute > &routes={})
 Build dependency graph from configuration.
static TopologyResult ComputeExecutionOrder (const SimulatorConfig &config, TopologyConfig::CycleHandling cycle_handling=TopologyConfig::CycleHandling::Error)
 Compute execution order from configuration.
static SchedulerGroupConfig GenerateSchedulerGroup (const TopologyResult &result, const std::string &group_name="auto", double rate_hz=400.0)
 Generate scheduler groups from topological order.
static void ApplyTopologyOrder (SchedulerConfig &config, const TopologyResult &result)
 Merge topology order into existing scheduler config.

Detailed Description

Utility class for building and analyzing component dependency graphs.

Member Function Documentation

◆ ApplyTopologyOrder()

void icarus::TopologyAnalyzer::ApplyTopologyOrder ( SchedulerConfig & config,
const TopologyResult & result )
inlinestatic

Merge topology order into existing scheduler config.

Reorders members within each group based on topological sort. Components not in any group are added to a new "unscheduled" group.

Parameters
configScheduler config to modify
resultTopology result

◆ BuildGraph()

DependencyGraph icarus::TopologyAnalyzer::BuildGraph ( const SimulatorConfig & config,
const std::vector< signal::SignalRoute > & routes = {} )
inlinestaticnodiscard

Build dependency graph from configuration.

Analyzes routes to determine which components depend on which. A route from A.output to B.input creates edge A -> B.

Parameters
configSimulator configuration with components and routes
Returns
DependencyGraph representing component dependencies

◆ ComputeExecutionOrder()

TopologyResult icarus::TopologyAnalyzer::ComputeExecutionOrder ( const SimulatorConfig & config,
TopologyConfig::CycleHandling cycle_handling = TopologyConfig::CycleHandling::Error )
inlinestaticnodiscard

Compute execution order from configuration.

Parameters
configSimulator configuration
cycle_handlingHow to handle detected cycles
Returns
TopologyResult with execution order
Exceptions
ConfigErrorif cycles detected and handling is Error

◆ GenerateSchedulerGroup()

SchedulerGroupConfig icarus::TopologyAnalyzer::GenerateSchedulerGroup ( const TopologyResult & result,
const std::string & group_name = "auto",
double rate_hz = 400.0 )
inlinestaticnodiscard

Generate scheduler groups from topological order.

Creates a single group with all components in dependency order.

Parameters
resultTopology result from ComputeExecutionOrder
group_nameName for the generated group
rate_hzRate for the group
Returns
SchedulerGroupConfig with ordered members

The documentation for this class was generated from the following file: