![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | BenchmarkRow |
| One row of the benchmark table. More... | |
| struct | BranchAlternative |
| One alternative of a branch: the node and its probability. More... | |
| struct | BranchDiversity |
| Mirrors the Java calculateBranchDiversity map. More... | |
| struct | BranchPattern |
| Mirrors the Java BranchPattern. More... | |
| struct | BranchStats |
| Mirrors the Java getBranchStats map. More... | |
| struct | ComplexityReport |
| The complexity report, one band per pattern family plus the overall score. More... | |
| struct | DetectedPatterns |
| Everything the four detectors found. More... | |
| struct | ExpectedIterations |
| 1/(1-p), with the p >= 1 divergence reported rather than encoded. More... | |
| struct | ExtendedSolverRecommendation |
| What the recommendation returns: the choice and why. More... | |
| struct | LoopStats |
| Mirrors the Java getLoopStats map. More... | |
| struct | OptimizationInsights |
| The advisory text the reference's getOptimizationInsights assembles. More... | |
| struct | ParallelStats |
| Mirrors the Java getParallelStats map. More... | |
| struct | PatternComplexityEntry |
| Per-pattern-family complexity, one entry of the report's patternComplexity. More... | |
| struct | SequenceStats |
| Mirrors the Java getSequenceStats map. More... | |
| struct | ServiceParameters |
| A phase-type-shaped service law: entry vector and transient generator. More... | |
| struct | UpdatedWorkflow |
| The collapsed link matrix and the service law of every surviving node. More... | |
| struct | UpdateStats |
| Statistics of one update pass; the Java getUpdateStats map. More... | |
| struct | WfModelFacts |
| The four model facts the base recommendation reads, i.e. More... | |
| struct | WorkflowAnalysis |
| What analyze_workflow returns. More... | |
| struct | WorkflowAnalysisResult |
| Everything analyze_workflow_full returns, i.e. More... | |
| struct | WorkflowComplexity |
| The reference's complexity map, for either the original or the collapsed graph. More... | |
| struct | WorkflowFeatures |
| The flat feature vector the recommendation reads. More... | |
| struct | WorkflowPerformanceMetrics |
| The four efficiency scores plus the two headline numbers. More... | |
| struct | WorkflowRepresentation |
| The workflow in matrix form: the reference's WorkflowRepresentation. More... | |
| struct | WorkflowStatistics |
| The statistics block of WorkflowAnalysis. More... | |
| struct | WorkflowValidation |
| What validate_workflow reports. More... | |
Enumerations | |
| enum class | WfSolver { MVA = 0 , NC , SSA , FLUID , JMT , CTMC , AUTO } |
| The solvers the reference chooses among. More... | |
| enum class | WfExportFormat { Json = 0 , Csv , Summary } |
| The export formats the facade offers. More... | |
Functions | |
| template<class T> | |
| DetectedPatterns< T > | detect_all_patterns (const WorkflowRepresentation< T > &w) |
| Run the four detectors on one representation. | |
| template<class T> | |
| WorkflowComplexity< T > | workflow_complexity (const WorkflowRepresentation< T > &w) |
| Complexity of the workflow as declared. | |
| template<class T> | |
| WorkflowComplexity< T > | optimized_complexity (const UpdatedWorkflow< T > &w) |
| Complexity of the collapsed workflow. | |
| template<class T> | |
| WorkflowAnalysis< T > | analyze_workflow (const WorkflowRepresentation< T > &w) |
| Detect, collapse, and report. | |
| template<class T> | |
| std::vector< std::string > | get_optimization_recommendations (const WorkflowAnalysis< T > &a) |
| The reference's recommendation strings, in its order. | |
| template<class T> | |
| bool | validate_analysis (const WorkflowAnalysis< T > &a) |
| The collapsed workflow is consistent and every detected pattern validates. | |
| template<class T> | |
| WorkflowRepresentation< T > | wf_from_struct (const qn::NetworkStruct< T > &sn) |
| Build a workflow representation from a NetworkStruct. | |
| std::string | wf_solver_name (WfSolver s) |
| The reference's own spelling of each choice. | |
| template<class T> | |
| WfModelFacts< T > | wf_model_facts (const qn::NetworkStruct< T > &sn) |
| Read the base facts off a NetworkStruct. | |
| template<class T> | |
| WfSolver | wf_base_recommendation (const WfModelFacts< T > &f) |
| The AUTO heuristic before the workflow features amend it. | |
| template<class T> | |
| WorkflowFeatures< T > | extract_workflow_features (const WorkflowAnalysis< T > &a) |
| Flatten the analysis into the feature vector the heuristic reads. | |
| template<class T> | |
| ExtendedSolverRecommendation< T > | enhance_recommendation_with_workflow (WfSolver base, const WorkflowFeatures< T > &f, const WorkflowAnalysis< T > &a) |
| Amend the base recommendation with what the workflow analysis found. | |
| template<class T> | |
| ExtendedSolverRecommendation< T > | recommend_solver_with_workflow_analysis (const qn::NetworkStruct< T > &sn) |
| The entry point: analyse the workflow, then let it amend the base choice. | |
| template<class T> | |
| WfSolver | create_optimal_solver (const qn::NetworkStruct< T > &sn) |
| The chosen solver alone, i.e. | |
| template<class T> | |
| std::vector< std::string > | generate_pattern_insights (const DetectedPatterns< T > &p) |
| Pattern-level advice; the strings are the reference's, verbatim. | |
| template<class T> | |
| std::vector< std::string > | generate_performance_predictions (const WorkflowAnalysis< T > &a) |
| Solve-time advice keyed off the collapse ratio and the pattern mix. | |
| template<class T> | |
| OptimizationInsights | get_optimization_insights (const qn::NetworkStruct< T > &sn) |
| All three advisory blocks for one model. | |
| template<class T> | |
| bool | validate_workflow_enhancement (const qn::NetworkStruct< T > &sn) |
| The reference's self-check: a usable recommendation over a valid analysis. | |
| template<class T> | |
| std::vector< BranchPattern< T > > | detect_branches (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes, const std::vector< int > &joinNodes) |
| template<class T> | |
| bool | validate_branch_pattern (const BranchPattern< T > &pattern, const Matrix< T > &linkMatrix) |
| Probabilities sum to one within 1e-2 and every alternative is a fork successor. | |
| template<class T> | |
| BranchDiversity< T > | calculate_branch_diversity (const BranchPattern< T > &pattern) |
| Shannon entropy of the branch probabilities, the same entropy normalized by log(n), the Gini coefficient of the probability vector, and the reciprocal of the largest probability. | |
| template<class T> | |
| BranchStats< T > | get_branch_stats (const std::vector< BranchPattern< T > > &patterns) |
| Count, total, mean/max/min alternatives, and the mean entropy and balance. | |
| template<class T> | |
| BranchAlternative< T > | find_most_probable_branch (const BranchPattern< T > &pattern) |
| The alternative with the largest probability. | |
| template<class T> | |
| BranchAlternative< T > | find_least_probable_branch (const BranchPattern< T > &pattern) |
| The alternative with the smallest probability. | |
| template<class T> | |
| std::vector< int > | detect_loops (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes, const std::vector< int > &routerNodes, const std::vector< int > &joinNodes=std::vector< int >()) |
| template<class T> | |
| T | get_loop_probability (int serviceNode, const Matrix< T > &linkMatrix, const std::vector< int > &routerNodes) |
| Probability on the router-to-service edge that closes the loop, 0 when the node is not on a simple loop. | |
| template<class T> | |
| bool | validate_loop_pattern (int loopNode, const Matrix< T > &linkMatrix, const std::vector< int > &routerNodes) |
| True when the node still has the service -> router -> service structure. | |
| template<class T> | |
| ExpectedIterations< T > | get_expected_loop_iterations (const T &loopProbability) |
| Mean number of visits of a geometric loop, 1/(1-p). | |
| template<class T> | |
| LoopStats< T > | get_loop_stats (const std::vector< int > &loopNodes, const Matrix< T > &linkMatrix, const std::vector< int > &routerNodes) |
| Count and moments of the loop probabilities and iteration counts. | |
| template<class T> | |
| std::vector< std::vector< int > > | detect_parallel (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes, const std::vector< int > &forkNodes, const std::vector< int > &joinNodes) |
| template<class T> | |
| bool | validate_parallel_pattern (const std::vector< int > &pattern, const Matrix< T > &linkMatrix, const std::vector< int > &forkNodes, const std::vector< int > &joinNodes) |
| A pattern is valid when its nodes have exactly one common fork predecessor and exactly one common join successor. | |
| template<class T> | |
| ParallelStats< T > | get_parallel_stats (const std::vector< std::vector< int > > &patterns) |
| Count, total, mean and maximum degree of parallelism. | |
| template<class T> | |
| ServiceParameters< T > | convolve_sequence (const std::vector< ServiceParameters< T > > ¶ms) |
| Convolution of the durations, i.e. | |
| template<class T> | |
| ServiceParameters< T > | convolve_parallel (const std::vector< ServiceParameters< T > > ¶ms) |
| Maximum of the durations, i.e. | |
| template<class T> | |
| ServiceParameters< T > | convolve_loop (const ServiceParameters< T > ¶ms, const T &loopProb) |
| Geometric repetition: the exit flow re-enters through alpha with probability loopProb. | |
| template<class T> | |
| ServiceParameters< T > | convolve_branches (const std::vector< ServiceParameters< T > > ¶ms, const std::vector< T > &probsIn) |
| Probabilistic choice among the alternatives, on a block-diagonal generator. | |
| template<class T> | |
| bool | find_fork_join_for_parallel (const Matrix< T > &, const std::vector< int > &, int *, int *) |
| The fork and join bracketing a parallel pattern. | |
| template<class T> | |
| UpdatedWorkflow< T > | update_patterns (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes, const std::vector< int > &forkNodes, const std::vector< int > &joinNodes, const std::vector< int > &routerNodes, const std::map< int, ServiceParameters< T > > &serviceParams) |
| Collapse the four pattern families in the reference's order: sequences, parallels, loops, branches. | |
| template<class T> | |
| bool | validate_updated_workflow (const UpdatedWorkflow< T > &w) |
| Every node the collapsed matrix still references carries a service law. | |
| template<class T> | |
| UpdateStats< T > | get_update_stats (const Matrix< T > &originalMatrix, const UpdatedWorkflow< T > &w) |
| How much the collapse shrank the link matrix. | |
| template<class T> | |
| std::vector< std::vector< int > > | detect_sequences (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes) |
| template<class T> | |
| bool | validate_sequence (const std::vector< int > &sequence, const Matrix< T > &linkMatrix) |
| Every consecutive pair of the chain must be an edge of the workflow. | |
| template<class T> | |
| SequenceStats< T > | get_sequence_stats (const std::vector< std::vector< int > > &sequences) |
| Count, total, mean, maximum and minimum chain length. | |
| double | calculate_sequence_efficiency (const std::vector< std::vector< int > > &sequences) |
| avg sequence length capped at 5, the reference's saturation point. | |
| double | calculate_parallel_efficiency (const std::vector< std::vector< int > > ¶llels) |
| Efficiency falls linearly past two-way parallelism, floored at 0.1. | |
| double | calculate_loop_efficiency (const std::vector< int > &loops) |
| The reference's placeholder: any loop at all costs half the efficiency. | |
| template<class T> | |
| double | calculate_branch_efficiency (const std::vector< BranchPattern< T > > &branches) |
| The mean NORMALIZED entropy over the branches, i.e. | |
| template<class T> | |
| double | calculate_complexity_score (std::size_t nodes, std::size_t links, const DetectedPatterns< T > &p) |
| The weighted size-plus-pattern score behind the complexity level. | |
| template<class T> | |
| WorkflowPerformanceMetrics | calculate_performance_metrics (const WorkflowAnalysis< T > &a, const ExtendedSolverRecommendation< T > &r) |
| The six metrics of the analysis result. | |
| template<class T> | |
| WorkflowAnalysisResult< T > | analyze_workflow_full (const qn::NetworkStruct< T > &sn) |
| The facade's headline call: analysis, recommendation, insights, metrics. | |
| template<class T> | |
| DetectedPatterns< T > | get_pattern_analysis (const qn::NetworkStruct< T > &sn) |
| The patterns alone. | |
| template<class T> | |
| std::vector< std::string > | get_workflow_recommendations (const qn::NetworkStruct< T > &sn) |
| The recommendation strings alone. | |
| template<class T> | |
| ComplexityReport< T > | generate_complexity_report (const qn::NetworkStruct< T > &sn) |
| The complexity report, with the reference's four bands on the score. | |
| template<class T> | |
| std::vector< std::pair< WfSolver, BenchmarkRow > > | benchmark_solvers (const std::vector< WfSolver > &solvers, const std::function< Matrix< T >(WfSolver)> &runner) |
| Time each solver and aggregate its queue lengths. | |
| std::vector< WfSolver > | default_benchmark_solvers () |
| The reference's default benchmark set. | |
| template<class T> | |
| WorkflowValidation | validate_workflow (const qn::NetworkStruct< T > &sn) |
| The model is well formed and both analyses validate. | |
| template<class T> | |
| std::string | export_analysis (const WorkflowAnalysisResult< T > &a, WfExportFormat format=WfExportFormat::Summary) |
| Render the analysis. | |
| template<class T> | |
| std::string | quick_analysis (const qn::NetworkStruct< T > &sn) |
| The reference's one-call summary. | |
| template<class T> | |
| WfSolver | get_optimal_solver (const qn::NetworkStruct< T > &sn) |
| The chosen solver without the rest of the report. | |
|
strong |
The export formats the facade offers.
| Enumerator | |
|---|---|
| Json | |
| Csv | |
| Summary | |
Definition at line 125 of file workflow_manager.h.
|
strong |
The solvers the reference chooses among.
| Enumerator | |
|---|---|
| MVA | |
| NC | |
| SSA | |
| FLUID | |
| JMT | |
| CTMC | |
| AUTO | |
Definition at line 63 of file wf_auto_integration.h.
| WorkflowAnalysis< T > line::wf::analyze_workflow | ( | const WorkflowRepresentation< T > & | w | ) |
Detect, collapse, and report.
Definition at line 181 of file wf_analyzer.h.
References analyze_workflow(), detect_all_patterns(), line::wf::WorkflowAnalysis< T >::detectedPatterns, line::wf::WorkflowRepresentation< T >::forkNodes, get_branch_stats(), get_loop_stats(), get_parallel_stats(), get_sequence_stats(), get_update_stats(), line::wf::WorkflowRepresentation< T >::joinNodes, line::wf::WorkflowRepresentation< T >::linkMatrix, optimized_complexity(), line::wf::WorkflowAnalysis< T >::optimizedWorkflow, line::wf::WorkflowAnalysis< T >::originalWorkflow, line::wf::WorkflowRepresentation< T >::routerNodes, line::wf::WorkflowRepresentation< T >::serviceNodes, line::wf::WorkflowRepresentation< T >::serviceParameters, line::wf::WorkflowAnalysis< T >::statistics, update_patterns(), and workflow_complexity().
Referenced by analyze_workflow(), analyze_workflow_full(), generate_complexity_report(), get_optimization_insights(), get_pattern_analysis(), get_workflow_recommendations(), recommend_solver_with_workflow_analysis(), validate_workflow(), and validate_workflow_enhancement().
| WorkflowAnalysisResult< T > line::wf::analyze_workflow_full | ( | const qn::NetworkStruct< T > & | sn | ) |
The facade's headline call: analysis, recommendation, insights, metrics.
Definition at line 217 of file workflow_manager.h.
References analyze_workflow(), analyze_workflow_full(), calculate_performance_metrics(), get_optimization_insights(), line::wf::WorkflowAnalysisResult< T >::optimizationInsights, line::wf::WorkflowAnalysisResult< T >::patternAnalysis, line::wf::WorkflowAnalysisResult< T >::performanceMetrics, recommend_solver_with_workflow_analysis(), line::wf::WorkflowAnalysisResult< T >::solverRecommendation, and wf_from_struct().
Referenced by analyze_workflow_full(), and quick_analysis().
| std::vector< std::pair< WfSolver, BenchmarkRow > > line::wf::benchmark_solvers | ( | const std::vector< WfSolver > & | solvers, |
| const std::function< Matrix< T >(WfSolver)> & | runner ) |
Time each solver and aggregate its queue lengths.
| solvers | the solvers to try, in order |
| runner | runs one solver and returns its QN; it may throw, and a throw becomes a failed row exactly as the Java's catch does |
Definition at line 284 of file workflow_manager.h.
References benchmark_solvers().
Referenced by benchmark_solvers().
| BranchDiversity< T > line::wf::calculate_branch_diversity | ( | const BranchPattern< T > & | pattern | ) |
Shannon entropy of the branch probabilities, the same entropy normalized by log(n), the Gini coefficient of the probability vector, and the reciprocal of the largest probability.
Definition at line 219 of file wf_branch_detector.h.
References line::wf::BranchDiversity< T >::balance, calculate_branch_diversity(), line::wf::BranchDiversity< T >::entropy, line::wf::BranchDiversity< T >::gini, line::InputError::InputError(), line::wf::BranchDiversity< T >::normalizedEntropy, line::num_abs(), and line::wf::BranchPattern< T >::probabilities.
Referenced by calculate_branch_diversity(), calculate_branch_efficiency(), extract_workflow_features(), get_branch_stats(), and get_optimization_recommendations().
| double line::wf::calculate_branch_efficiency | ( | const std::vector< BranchPattern< T > > & | branches | ) |
The mean NORMALIZED entropy over the branches, i.e.
how evenly they split.
Definition at line 176 of file workflow_manager.h.
References calculate_branch_diversity(), and calculate_branch_efficiency().
Referenced by calculate_branch_efficiency(), and calculate_performance_metrics().
| double line::wf::calculate_complexity_score | ( | std::size_t | nodes, |
| std::size_t | links, | ||
| const DetectedPatterns< T > & | p ) |
The weighted size-plus-pattern score behind the complexity level.
Definition at line 186 of file workflow_manager.h.
References line::wf::DetectedPatterns< T >::branches, calculate_complexity_score(), line::wf::DetectedPatterns< T >::loops, line::wf::DetectedPatterns< T >::parallels, and line::wf::DetectedPatterns< T >::sequences.
Referenced by calculate_complexity_score(), and generate_complexity_report().
|
inline |
The reference's placeholder: any loop at all costs half the efficiency.
It assumes a loop probability of 0.5 and never reads the link matrix, which its own comment calls "Simplified". Ported as written – a caller comparing the two codebases compares this number.
Definition at line 169 of file workflow_manager.h.
References calculate_loop_efficiency().
Referenced by calculate_loop_efficiency(), and calculate_performance_metrics().
|
inline |
Efficiency falls linearly past two-way parallelism, floored at 0.1.
Definition at line 154 of file workflow_manager.h.
References calculate_parallel_efficiency().
Referenced by calculate_parallel_efficiency(), and calculate_performance_metrics().
| WorkflowPerformanceMetrics line::wf::calculate_performance_metrics | ( | const WorkflowAnalysis< T > & | a, |
| const ExtendedSolverRecommendation< T > & | r ) |
The six metrics of the analysis result.
Definition at line 203 of file workflow_manager.h.
References line::wf::WorkflowPerformanceMetrics::branchEfficiency, calculate_branch_efficiency(), calculate_loop_efficiency(), calculate_parallel_efficiency(), calculate_performance_metrics(), calculate_sequence_efficiency(), line::wf::WorkflowPerformanceMetrics::complexityReduction, line::wf::ExtendedSolverRecommendation< T >::confidence, line::wf::WorkflowAnalysis< T >::detectedPatterns, line::wf::WorkflowPerformanceMetrics::loopEfficiency, line::wf::WorkflowPerformanceMetrics::parallelEfficiency, line::wf::WorkflowPerformanceMetrics::sequenceEfficiency, line::wf::WorkflowPerformanceMetrics::solverConfidence, and line::wf::WorkflowAnalysis< T >::statistics.
Referenced by analyze_workflow_full(), and calculate_performance_metrics().
|
inline |
avg sequence length capped at 5, the reference's saturation point.
Definition at line 145 of file workflow_manager.h.
References calculate_sequence_efficiency().
Referenced by calculate_performance_metrics(), and calculate_sequence_efficiency().
| ServiceParameters< T > line::wf::convolve_branches | ( | const std::vector< ServiceParameters< T > > & | params, |
| const std::vector< T > & | probsIn ) |
Probabilistic choice among the alternatives, on a block-diagonal generator.
Definition at line 274 of file wf_pattern_updater.h.
References line::wf::ServiceParameters< T >::alpha, convolve_branches(), line::Matrix< T >::Matrix(), and line::wf::ServiceParameters< T >::T_.
Referenced by convolve_branches(), and update_patterns().
| ServiceParameters< T > line::wf::convolve_loop | ( | const ServiceParameters< T > & | params, |
| const T & | loopProb ) |
Geometric repetition: the exit flow re-enters through alpha with probability loopProb.
Outside (0,1) the law is returned unchanged, as in the reference.
Definition at line 261 of file wf_pattern_updater.h.
References convolve_loop(), and line::wf::ServiceParameters< T >::T_.
Referenced by convolve_loop(), and update_patterns().
| ServiceParameters< T > line::wf::convolve_parallel | ( | const std::vector< ServiceParameters< T > > & | params | ) |
Maximum of the durations, i.e.
a fork whose join waits for every branch.
Definition at line 214 of file wf_pattern_updater.h.
References line::wf::ServiceParameters< T >::alpha, convolve_parallel(), and line::wf::ServiceParameters< T >::T_.
Referenced by convolve_parallel(), and update_patterns().
| ServiceParameters< T > line::wf::convolve_sequence | ( | const std::vector< ServiceParameters< T > > & | params | ) |
Convolution of the durations, i.e.
the service laws run one after another.
Definition at line 183 of file wf_pattern_updater.h.
References line::wf::ServiceParameters< T >::alpha, convolve_sequence(), and line::wf::ServiceParameters< T >::T_.
Referenced by convolve_sequence(), and update_patterns().
| WfSolver line::wf::create_optimal_solver | ( | const qn::NetworkStruct< T > & | sn | ) |
The chosen solver alone, i.e.
the reference's createOptimalSolver.
Definition at line 337 of file wf_auto_integration.h.
References create_optimal_solver(), and recommend_solver_with_workflow_analysis().
Referenced by create_optimal_solver(), and get_optimal_solver().
|
inline |
The reference's default benchmark set.
Definition at line 317 of file workflow_manager.h.
References default_benchmark_solvers(), FLUID, MVA, NC, and SSA.
Referenced by default_benchmark_solvers().
| DetectedPatterns< T > line::wf::detect_all_patterns | ( | const WorkflowRepresentation< T > & | w | ) |
Run the four detectors on one representation.
Definition at line 112 of file wf_analyzer.h.
References line::wf::DetectedPatterns< T >::branches, detect_all_patterns(), detect_branches(), detect_loops(), detect_parallel(), detect_sequences(), line::wf::WorkflowRepresentation< T >::forkNodes, line::wf::WorkflowRepresentation< T >::joinNodes, line::wf::WorkflowRepresentation< T >::linkMatrix, line::wf::DetectedPatterns< T >::loops, line::wf::DetectedPatterns< T >::parallels, line::wf::WorkflowRepresentation< T >::routerNodes, line::wf::DetectedPatterns< T >::sequences, and line::wf::WorkflowRepresentation< T >::serviceNodes.
Referenced by analyze_workflow(), and detect_all_patterns().
| std::vector< BranchPattern< T > > line::wf::detect_branches | ( | const Matrix< T > & | linkMatrix, |
| const std::vector< int > & | serviceNodes, | ||
| const std::vector< int > & | joinNodes ) |
| linkMatrix | (nedges x 3) edge list |
| serviceNodes | ids of the service nodes |
| joinNodes | ids of the join nodes |
Definition at line 136 of file wf_branch_detector.h.
References line::wf::BranchPattern< T >::branchNodes, detect_branches(), line::wf::BranchPattern< T >::forkNode, line::wf::BranchPattern< T >::hasJoinNode, line::wf::BranchPattern< T >::joinNode, line::num_abs(), and line::wf::BranchPattern< T >::probabilities.
Referenced by detect_all_patterns(), detect_branches(), and update_patterns().
| std::vector< int > line::wf::detect_loops | ( | const Matrix< T > & | linkMatrix, |
| const std::vector< int > & | serviceNodes, | ||
| const std::vector< int > & | routerNodes, | ||
| const std::vector< int > & | joinNodes = std::vector<int>() ) |
| linkMatrix | (nedges x 3) edge list |
| serviceNodes | ids of the service nodes |
| routerNodes | ids of the router nodes |
| joinNodes | ids of the join nodes; empty disables the SCC search, matching the two-argument Java overload |
Definition at line 142 of file wf_loop_detector.h.
References detect_loops(), and line::Matrix< T >::rows().
Referenced by detect_all_patterns(), detect_loops(), and update_patterns().
| std::vector< std::vector< int > > line::wf::detect_parallel | ( | const Matrix< T > & | linkMatrix, |
| const std::vector< int > & | serviceNodes, | ||
| const std::vector< int > & | forkNodes, | ||
| const std::vector< int > & | joinNodes ) |
| linkMatrix | (nedges x 3) edge list |
| serviceNodes | ids of the service nodes |
| forkNodes | ids of the fork nodes |
| joinNodes | ids of the join nodes |
Definition at line 149 of file wf_parallel_detector.h.
References detect_parallel().
Referenced by detect_all_patterns(), detect_parallel(), and update_patterns().
| std::vector< std::vector< int > > line::wf::detect_sequences | ( | const Matrix< T > & | linkMatrix, |
| const std::vector< int > & | serviceNodes ) |
| linkMatrix | (nedges x 3) edge list |
| serviceNodes | ids of the service nodes |
Definition at line 120 of file wf_sequence_detector.h.
References detect_sequences(), and line::Matrix< T >::rows().
Referenced by detect_all_patterns(), detect_sequences(), and update_patterns().
| ExtendedSolverRecommendation< T > line::wf::enhance_recommendation_with_workflow | ( | WfSolver | base, |
| const WorkflowFeatures< T > & | f, | ||
| const WorkflowAnalysis< T > & | a ) |
Amend the base recommendation with what the workflow analysis found.
The reasoning strings are user-facing and reproduced verbatim, so a caller grepping them sees the same text from either codebase.
Definition at line 228 of file wf_auto_integration.h.
References line::wf::ExtendedSolverRecommendation< T >::alternativeSolvers, line::wf::WorkflowFeatures< T >::avgBranchEntropy, line::wf::WorkflowFeatures< T >::avgLoopProbability, line::wf::ExtendedSolverRecommendation< T >::confidence, CTMC, enhance_recommendation_with_workflow(), FLUID, line::wf::WorkflowFeatures< T >::hasBranchPatterns, line::wf::WorkflowFeatures< T >::hasLoopPatterns, line::wf::WorkflowFeatures< T >::hasParallelPatterns, line::wf::WorkflowFeatures< T >::hasSequencePatterns, JMT, line::wf::WorkflowFeatures< T >::maxBranches, line::wf::WorkflowFeatures< T >::maxLoopProbability, line::wf::WorkflowFeatures< T >::maxParallelism, line::wf::WorkflowFeatures< T >::maxSequenceLength, MVA, NC, line::wf::WorkflowFeatures< T >::optimizedNodeCount, line::wf::WorkflowFeatures< T >::originalNodeCount, line::wf::ExtendedSolverRecommendation< T >::reasoning, line::wf::ExtendedSolverRecommendation< T >::recommendedSolver, SSA, and line::wf::ExtendedSolverRecommendation< T >::workflowFeatures.
Referenced by enhance_recommendation_with_workflow(), and recommend_solver_with_workflow_analysis().
| std::string line::wf::export_analysis | ( | const WorkflowAnalysisResult< T > & | a, |
| WfExportFormat | format = WfExportFormat::Summary ) |
Render the analysis.
The three layouts are byte-for-byte the reference's, including the header rule, the blank lines and the one-based numbering of the reasoning list: a consumer that parses this text is parsing a contract.
Definition at line 369 of file workflow_manager.h.
References line::wf::DetectedPatterns< T >::branches, Csv, export_analysis(), Json, line::wf::DetectedPatterns< T >::loops, line::wf::DetectedPatterns< T >::parallels, line::wf::WorkflowAnalysisResult< T >::patternAnalysis, line::wf::DetectedPatterns< T >::sequences, line::wf::WorkflowAnalysisResult< T >::solverRecommendation, Summary, and wf_solver_name().
Referenced by export_analysis(), and quick_analysis().
| WorkflowFeatures< T > line::wf::extract_workflow_features | ( | const WorkflowAnalysis< T > & | a | ) |
Flatten the analysis into the feature vector the heuristic reads.
Definition at line 157 of file wf_auto_integration.h.
References line::wf::WorkflowFeatures< T >::avgBranchEntropy, line::wf::WorkflowFeatures< T >::avgBranches, line::wf::WorkflowFeatures< T >::avgLoopProbability, line::wf::WorkflowFeatures< T >::avgParallelism, line::wf::WorkflowFeatures< T >::avgSequenceLength, line::wf::DetectedPatterns< T >::branches, calculate_branch_diversity(), line::wf::WorkflowAnalysis< T >::detectedPatterns, extract_workflow_features(), line::wf::WorkflowFeatures< T >::hasBranchPatterns, line::wf::WorkflowFeatures< T >::hasLoopPatterns, line::wf::WorkflowFeatures< T >::hasParallelPatterns, line::wf::WorkflowFeatures< T >::hasSequencePatterns, line::wf::DetectedPatterns< T >::loops, line::wf::WorkflowFeatures< T >::maxBranches, line::wf::WorkflowFeatures< T >::maxLoopProbability, line::wf::WorkflowFeatures< T >::maxParallelism, line::wf::WorkflowFeatures< T >::maxSequenceLength, line::wf::WorkflowFeatures< T >::numBranches, line::wf::WorkflowFeatures< T >::numLoops, line::wf::WorkflowFeatures< T >::numParallels, line::wf::WorkflowFeatures< T >::numSequences, line::wf::WorkflowFeatures< T >::optimizedLinkCount, line::wf::WorkflowFeatures< T >::optimizedNodeCount, line::wf::WorkflowFeatures< T >::originalLinkCount, line::wf::WorkflowFeatures< T >::originalNodeCount, line::wf::DetectedPatterns< T >::parallels, line::wf::DetectedPatterns< T >::sequences, and line::wf::WorkflowAnalysis< T >::statistics.
Referenced by extract_workflow_features(), and recommend_solver_with_workflow_analysis().
| bool line::wf::find_fork_join_for_parallel | ( | const Matrix< T > & | , |
| const std::vector< int > & | , | ||
| int * | , | ||
| int * | ) |
The fork and join bracketing a parallel pattern.
BOTH references return "none" unconditionally, so the parallel arm of update_patterns never fires. Reproduced deliberately; see the header note.
Definition at line 315 of file wf_pattern_updater.h.
References find_fork_join_for_parallel().
Referenced by find_fork_join_for_parallel(), and update_patterns().
| BranchAlternative< T > line::wf::find_least_probable_branch | ( | const BranchPattern< T > & | pattern | ) |
The alternative with the smallest probability.
Definition at line 308 of file wf_branch_detector.h.
References line::wf::BranchPattern< T >::branchNodes, find_least_probable_branch(), line::wf::BranchAlternative< T >::node, line::wf::BranchPattern< T >::probabilities, line::wf::BranchAlternative< T >::probability, and line::wf::BranchAlternative< T >::valid.
Referenced by find_least_probable_branch().
| BranchAlternative< T > line::wf::find_most_probable_branch | ( | const BranchPattern< T > & | pattern | ) |
The alternative with the largest probability.
Definition at line 294 of file wf_branch_detector.h.
References line::wf::BranchPattern< T >::branchNodes, find_most_probable_branch(), line::wf::BranchAlternative< T >::node, line::wf::BranchPattern< T >::probabilities, line::wf::BranchAlternative< T >::probability, and line::wf::BranchAlternative< T >::valid.
Referenced by find_most_probable_branch().
| ComplexityReport< T > line::wf::generate_complexity_report | ( | const qn::NetworkStruct< T > & | sn | ) |
The complexity report, with the reference's four bands on the score.
Definition at line 241 of file workflow_manager.h.
References analyze_workflow(), line::wf::ComplexityReport< T >::branches, line::wf::DetectedPatterns< T >::branches, calculate_complexity_score(), line::wf::PatternComplexityEntry::complexity, line::wf::ComplexityReport< T >::complexityLevel, line::wf::PatternComplexityEntry::count, line::wf::WorkflowAnalysis< T >::detectedPatterns, generate_complexity_report(), line::wf::ComplexityReport< T >::loops, line::wf::DetectedPatterns< T >::loops, line::wf::ComplexityReport< T >::optimizedMetrics, line::wf::ComplexityReport< T >::originalMetrics, line::wf::ComplexityReport< T >::overallComplexityScore, line::wf::ComplexityReport< T >::parallels, line::wf::DetectedPatterns< T >::parallels, line::wf::ComplexityReport< T >::sequences, line::wf::DetectedPatterns< T >::sequences, line::wf::WorkflowAnalysis< T >::statistics, line::wf::PatternComplexityEntry::totalNodes, and wf_from_struct().
Referenced by generate_complexity_report().
| std::vector< std::string > line::wf::generate_pattern_insights | ( | const DetectedPatterns< T > & | p | ) |
Pattern-level advice; the strings are the reference's, verbatim.
Definition at line 350 of file wf_auto_integration.h.
References line::wf::DetectedPatterns< T >::branches, generate_pattern_insights(), line::wf::DetectedPatterns< T >::loops, line::wf::DetectedPatterns< T >::parallels, and line::wf::DetectedPatterns< T >::sequences.
Referenced by generate_pattern_insights(), and get_optimization_insights().
| std::vector< std::string > line::wf::generate_performance_predictions | ( | const WorkflowAnalysis< T > & | a | ) |
Solve-time advice keyed off the collapse ratio and the pattern mix.
Definition at line 370 of file wf_auto_integration.h.
References line::wf::WorkflowAnalysis< T >::detectedPatterns, generate_performance_predictions(), and line::wf::WorkflowAnalysis< T >::statistics.
Referenced by generate_performance_predictions(), and get_optimization_insights().
| BranchStats< T > line::wf::get_branch_stats | ( | const std::vector< BranchPattern< T > > & | patterns | ) |
Count, total, mean/max/min alternatives, and the mean entropy and balance.
Definition at line 259 of file wf_branch_detector.h.
References line::wf::BranchStats< T >::avgBalance, line::wf::BranchStats< T >::avgBranches, line::wf::BranchStats< T >::avgEntropy, line::wf::BranchDiversity< T >::balance, calculate_branch_diversity(), line::wf::BranchDiversity< T >::entropy, get_branch_stats(), line::wf::BranchStats< T >::maxBranches, line::wf::BranchStats< T >::minBranches, line::wf::BranchStats< T >::numPatterns, and line::wf::BranchStats< T >::totalBranchNodes.
Referenced by analyze_workflow(), and get_branch_stats().
| ExpectedIterations< T > line::wf::get_expected_loop_iterations | ( | const T & | loopProbability | ) |
Mean number of visits of a geometric loop, 1/(1-p).
Definition at line 219 of file wf_loop_detector.h.
References get_expected_loop_iterations(), line::wf::ExpectedIterations< T >::infinite, and line::wf::ExpectedIterations< T >::value.
Referenced by get_expected_loop_iterations(), and get_loop_stats().
| T line::wf::get_loop_probability | ( | int | serviceNode, |
| const Matrix< T > & | linkMatrix, | ||
| const std::vector< int > & | routerNodes ) |
Probability on the router-to-service edge that closes the loop, 0 when the node is not on a simple loop.
Definition at line 192 of file wf_loop_detector.h.
References get_loop_probability(), and line::Matrix< T >::rows().
Referenced by get_loop_probability(), get_loop_stats(), and update_patterns().
| LoopStats< T > line::wf::get_loop_stats | ( | const std::vector< int > & | loopNodes, |
| const Matrix< T > & | linkMatrix, | ||
| const std::vector< int > & | routerNodes ) |
Count and moments of the loop probabilities and iteration counts.
Definition at line 232 of file wf_loop_detector.h.
References line::wf::LoopStats< T >::avgExpectedIterations, line::wf::LoopStats< T >::avgLoopProbability, get_expected_loop_iterations(), get_loop_probability(), get_loop_stats(), line::wf::ExpectedIterations< T >::infinite, line::wf::LoopStats< T >::maxExpectedIterations, line::wf::LoopStats< T >::maxLoopProbability, line::wf::LoopStats< T >::minLoopProbability, line::wf::LoopStats< T >::numLoops, and line::wf::ExpectedIterations< T >::value.
Referenced by analyze_workflow(), and get_loop_stats().
| WfSolver line::wf::get_optimal_solver | ( | const qn::NetworkStruct< T > & | sn | ) |
The chosen solver without the rest of the report.
Definition at line 417 of file workflow_manager.h.
References create_optimal_solver(), and get_optimal_solver().
Referenced by get_optimal_solver().
| OptimizationInsights line::wf::get_optimization_insights | ( | const qn::NetworkStruct< T > & | sn | ) |
All three advisory blocks for one model.
Definition at line 385 of file wf_auto_integration.h.
References analyze_workflow(), line::wf::WorkflowAnalysis< T >::detectedPatterns, generate_pattern_insights(), generate_performance_predictions(), get_optimization_insights(), get_optimization_recommendations(), line::wf::OptimizationInsights::patternInsights, line::wf::OptimizationInsights::performancePredictions, line::wf::OptimizationInsights::recommendations, and wf_from_struct().
Referenced by analyze_workflow_full(), and get_optimization_insights().
| std::vector< std::string > line::wf::get_optimization_recommendations | ( | const WorkflowAnalysis< T > & | a | ) |
The reference's recommendation strings, in its order.
They are user-facing text, so they are reproduced verbatim rather than paraphrased: a caller that greps them would otherwise see different output from the same analysis in two codebases.
Definition at line 206 of file wf_analyzer.h.
References line::wf::DetectedPatterns< T >::branches, calculate_branch_diversity(), line::wf::WorkflowAnalysis< T >::detectedPatterns, get_optimization_recommendations(), line::wf::DetectedPatterns< T >::loops, line::wf::DetectedPatterns< T >::parallels, line::wf::DetectedPatterns< T >::sequences, and line::wf::WorkflowAnalysis< T >::statistics.
Referenced by get_optimization_insights(), get_optimization_recommendations(), and get_workflow_recommendations().
| ParallelStats< T > line::wf::get_parallel_stats | ( | const std::vector< std::vector< int > > & | patterns | ) |
Count, total, mean and maximum degree of parallelism.
Definition at line 204 of file wf_parallel_detector.h.
References line::wf::ParallelStats< T >::avgParallelism, get_parallel_stats(), line::wf::ParallelStats< T >::maxParallelism, line::wf::ParallelStats< T >::numPatterns, and line::wf::ParallelStats< T >::totalParallelNodes.
Referenced by analyze_workflow(), and get_parallel_stats().
| DetectedPatterns< T > line::wf::get_pattern_analysis | ( | const qn::NetworkStruct< T > & | sn | ) |
The patterns alone.
Definition at line 229 of file workflow_manager.h.
References analyze_workflow(), get_pattern_analysis(), and wf_from_struct().
Referenced by get_pattern_analysis().
| SequenceStats< T > line::wf::get_sequence_stats | ( | const std::vector< std::vector< int > > & | sequences | ) |
Count, total, mean, maximum and minimum chain length.
Definition at line 169 of file wf_sequence_detector.h.
References line::wf::SequenceStats< T >::avgLength, get_sequence_stats(), line::wf::SequenceStats< T >::maxLength, line::wf::SequenceStats< T >::minLength, line::wf::SequenceStats< T >::numSequences, and line::wf::SequenceStats< T >::totalNodes.
Referenced by analyze_workflow(), and get_sequence_stats().
| UpdateStats< T > line::wf::get_update_stats | ( | const Matrix< T > & | originalMatrix, |
| const UpdatedWorkflow< T > & | w ) |
How much the collapse shrank the link matrix.
Definition at line 470 of file wf_pattern_updater.h.
References get_update_stats(), line::wf::UpdatedWorkflow< T >::linkMatrix, line::wf::UpdateStats< T >::linksReduced, line::wf::UpdateStats< T >::originalLinks, line::wf::UpdateStats< T >::reductionRatio, line::Matrix< T >::rows(), line::wf::UpdateStats< T >::serviceNodes, line::wf::UpdatedWorkflow< T >::serviceParameters, and line::wf::UpdateStats< T >::updatedLinks.
Referenced by analyze_workflow(), and get_update_stats().
| std::vector< std::string > line::wf::get_workflow_recommendations | ( | const qn::NetworkStruct< T > & | sn | ) |
The recommendation strings alone.
Definition at line 235 of file workflow_manager.h.
References analyze_workflow(), get_optimization_recommendations(), get_workflow_recommendations(), and wf_from_struct().
Referenced by get_workflow_recommendations().
| WorkflowComplexity< T > line::wf::optimized_complexity | ( | const UpdatedWorkflow< T > & | w | ) |
Complexity of the collapsed workflow.
The reference reports only three of the six fields here, so the rest stay at their defaults rather than being invented: after the collapse there is no service/control split left to report, the node kinds having been merged.
Definition at line 169 of file wf_analyzer.h.
References line::wf::WorkflowComplexity< T >::connectedNodes, line::wf::UpdatedWorkflow< T >::linkMatrix, optimized_complexity(), line::wf::UpdatedWorkflow< T >::serviceParameters, line::wf::WorkflowComplexity< T >::totalLinks, and line::wf::WorkflowComplexity< T >::totalNodes.
Referenced by analyze_workflow(), and optimized_complexity().
| std::string line::wf::quick_analysis | ( | const qn::NetworkStruct< T > & | sn | ) |
The reference's one-call summary.
Definition at line 411 of file workflow_manager.h.
References analyze_workflow_full(), export_analysis(), quick_analysis(), and Summary.
Referenced by quick_analysis().
| ExtendedSolverRecommendation< T > line::wf::recommend_solver_with_workflow_analysis | ( | const qn::NetworkStruct< T > & | sn | ) |
The entry point: analyse the workflow, then let it amend the base choice.
Definition at line 327 of file wf_auto_integration.h.
References analyze_workflow(), enhance_recommendation_with_workflow(), extract_workflow_features(), recommend_solver_with_workflow_analysis(), wf_base_recommendation(), wf_from_struct(), and wf_model_facts().
Referenced by analyze_workflow_full(), create_optimal_solver(), recommend_solver_with_workflow_analysis(), and validate_workflow_enhancement().
| UpdatedWorkflow< T > line::wf::update_patterns | ( | const Matrix< T > & | linkMatrix, |
| const std::vector< int > & | serviceNodes, | ||
| const std::vector< int > & | forkNodes, | ||
| const std::vector< int > & | joinNodes, | ||
| const std::vector< int > & | routerNodes, | ||
| const std::map< int, ServiceParameters< T > > & | serviceParams ) |
Collapse the four pattern families in the reference's order: sequences, parallels, loops, branches.
Each stage re-detects on the matrix the previous stage produced.
Definition at line 325 of file wf_pattern_updater.h.
References line::wf::BranchPattern< T >::branchNodes, convolve_branches(), convolve_loop(), convolve_parallel(), convolve_sequence(), detect_branches(), detect_loops(), detect_parallel(), detect_sequences(), find_fork_join_for_parallel(), line::wf::BranchPattern< T >::forkNode, get_loop_probability(), line::wf::BranchPattern< T >::hasJoinNode, line::wf::BranchPattern< T >::joinNode, line::wf::UpdatedWorkflow< T >::linkMatrix, line::wf::BranchPattern< T >::probabilities, line::Matrix< T >::rows(), line::wf::UpdatedWorkflow< T >::serviceParameters, update_patterns(), and line::lang::GlobalConstants::Zero.
Referenced by analyze_workflow(), and update_patterns().
| bool line::wf::validate_analysis | ( | const WorkflowAnalysis< T > & | a | ) |
The collapsed workflow is consistent and every detected pattern validates.
Definition at line 239 of file wf_analyzer.h.
References line::wf::WorkflowAnalysis< T >::detectedPatterns, line::wf::WorkflowAnalysis< T >::optimizedWorkflow, line::wf::WorkflowAnalysis< T >::originalWorkflow, validate_analysis(), validate_branch_pattern(), validate_loop_pattern(), validate_parallel_pattern(), validate_sequence(), and validate_updated_workflow().
Referenced by validate_analysis(), validate_workflow(), and validate_workflow_enhancement().
| bool line::wf::validate_branch_pattern | ( | const BranchPattern< T > & | pattern, |
| const Matrix< T > & | linkMatrix ) |
Probabilities sum to one within 1e-2 and every alternative is a fork successor.
Definition at line 194 of file wf_branch_detector.h.
References line::wf::BranchPattern< T >::branchNodes, line::wf::BranchPattern< T >::forkNode, line::num_abs(), line::wf::BranchPattern< T >::probabilities, and validate_branch_pattern().
Referenced by validate_analysis(), and validate_branch_pattern().
| bool line::wf::validate_loop_pattern | ( | int | loopNode, |
| const Matrix< T > & | linkMatrix, | ||
| const std::vector< int > & | routerNodes ) |
True when the node still has the service -> router -> service structure.
Definition at line 210 of file wf_loop_detector.h.
References validate_loop_pattern().
Referenced by validate_analysis(), and validate_loop_pattern().
| bool line::wf::validate_parallel_pattern | ( | const std::vector< int > & | pattern, |
| const Matrix< T > & | linkMatrix, | ||
| const std::vector< int > & | forkNodes, | ||
| const std::vector< int > & | joinNodes ) |
A pattern is valid when its nodes have exactly one common fork predecessor and exactly one common join successor.
Definition at line 182 of file wf_parallel_detector.h.
References line::Matrix< T >::rows(), and validate_parallel_pattern().
Referenced by validate_analysis(), and validate_parallel_pattern().
| bool line::wf::validate_sequence | ( | const std::vector< int > & | sequence, |
| const Matrix< T > & | linkMatrix ) |
Every consecutive pair of the chain must be an edge of the workflow.
Definition at line 155 of file wf_sequence_detector.h.
References line::Matrix< T >::rows(), and validate_sequence().
Referenced by validate_analysis(), and validate_sequence().
| bool line::wf::validate_updated_workflow | ( | const UpdatedWorkflow< T > & | w | ) |
Every node the collapsed matrix still references carries a service law.
The two references test OPPOSITE implications: Python asks that every referenced node have a law (ported here), the JAR that every law belong to a referenced node. Python's is the one that catches the failure mode the collapse can actually produce – a node left in the matrix whose law was erased with its pattern.
Definition at line 457 of file wf_pattern_updater.h.
References line::wf::UpdatedWorkflow< T >::linkMatrix, line::wf::UpdatedWorkflow< T >::serviceParameters, and validate_updated_workflow().
Referenced by validate_analysis(), and validate_updated_workflow().
| WorkflowValidation line::wf::validate_workflow | ( | const qn::NetworkStruct< T > & | sn | ) |
The model is well formed and both analyses validate.
Definition at line 328 of file workflow_manager.h.
References analyze_workflow(), line::wf::WorkflowValidation::hasRouting, line::wf::WorkflowValidation::issues, line::wf::WorkflowValidation::isValid, line::wf::WorkflowValidation::nodeCount, validate_analysis(), validate_workflow(), validate_workflow_enhancement(), and wf_from_struct().
Referenced by validate_workflow().
| bool line::wf::validate_workflow_enhancement | ( | const qn::NetworkStruct< T > & | sn | ) |
The reference's self-check: a usable recommendation over a valid analysis.
The Java swallows every exception and returns false; here the analysis is total over a well-formed struct, so a throw is a defect and is left to propagate rather than being reported as a failed validation.
Definition at line 402 of file wf_auto_integration.h.
References analyze_workflow(), line::wf::ExtendedSolverRecommendation< T >::confidence, line::wf::ExtendedSolverRecommendation< T >::reasoning, recommend_solver_with_workflow_analysis(), validate_analysis(), validate_workflow_enhancement(), and wf_from_struct().
Referenced by validate_workflow(), and validate_workflow_enhancement().
| WfSolver line::wf::wf_base_recommendation | ( | const WfModelFacts< T > & | f | ) |
The AUTO heuristic before the workflow features amend it.
Definition at line 147 of file wf_auto_integration.h.
References line::wf::WfModelFacts< T >::avgJobsPerChain, FLUID, line::wf::WfModelFacts< T >::hasMultiChain, line::wf::WfModelFacts< T >::hasProductForm, line::wf::WfModelFacts< T >::hasSingleChain, MVA, NC, line::wf::WfModelFacts< T >::totalJobs, and wf_base_recommendation().
Referenced by recommend_solver_with_workflow_analysis(), and wf_base_recommendation().
| WorkflowRepresentation< T > line::wf::wf_from_struct | ( | const qn::NetworkStruct< T > & | sn | ) |
Build a workflow representation from a NetworkStruct.
The link matrix is the class-aggregated node routing sn.rtnodes, one row per (source, target) pair carrying positive probability, with the probability summed over the class pairs and normalized per source. Node ids are 0-based, matching the reference's node indices.
Definition at line 266 of file wf_analyzer.h.
References line::wf::ServiceParameters< T >::alpha, line::mam::Map< T >::D0, line::lang::dist_to_map(), line::wf::WorkflowRepresentation< T >::forkNodes, line::wf::WorkflowRepresentation< T >::joinNodes, line::wf::WorkflowRepresentation< T >::linkMatrix, line::mam::map_pie(), line::Matrix< T >::Matrix(), line::wf::WorkflowRepresentation< T >::routerNodes, line::wf::WorkflowRepresentation< T >::serviceNodes, line::wf::WorkflowRepresentation< T >::serviceParameters, line::wf::ServiceParameters< T >::T_, wf_from_struct(), and line::lang::GlobalConstants::Zero.
Referenced by analyze_workflow_full(), generate_complexity_report(), get_optimization_insights(), get_pattern_analysis(), get_workflow_recommendations(), recommend_solver_with_workflow_analysis(), validate_workflow(), validate_workflow_enhancement(), and wf_from_struct().
| WfModelFacts< T > line::wf::wf_model_facts | ( | const qn::NetworkStruct< T > & | sn | ) |
Read the base facts off a NetworkStruct.
The job total SKIPS the infinite entries, which is how the Java avoids (int) Double.POSITIVE_INFINITY becoming MAX_VALUE and swamping the count: an open class contributes nothing to a population-based threshold.
Definition at line 132 of file wf_auto_integration.h.
References line::wf::WfModelFacts< T >::avgJobsPerChain, line::wf::WfModelFacts< T >::hasMultiChain, line::wf::WfModelFacts< T >::hasProductForm, line::wf::WfModelFacts< T >::hasSingleChain, line::wf::WfModelFacts< T >::totalJobs, and wf_model_facts().
Referenced by recommend_solver_with_workflow_analysis(), and wf_model_facts().
|
inline |
The reference's own spelling of each choice.
Definition at line 66 of file wf_auto_integration.h.
References CTMC, FLUID, JMT, MVA, NC, SSA, and wf_solver_name().
Referenced by export_analysis(), and wf_solver_name().
| WorkflowComplexity< T > line::wf::workflow_complexity | ( | const WorkflowRepresentation< T > & | w | ) |
Complexity of the workflow as declared.
Definition at line 141 of file wf_analyzer.h.
References line::wf::WorkflowComplexity< T >::avgDegree, line::wf::WorkflowComplexity< T >::connectedNodes, line::wf::WorkflowComplexity< T >::controlNodes, line::wf::WorkflowRepresentation< T >::forkNodes, line::wf::WorkflowRepresentation< T >::joinNodes, line::wf::WorkflowRepresentation< T >::linkMatrix, line::wf::WorkflowRepresentation< T >::routerNodes, line::wf::WorkflowComplexity< T >::serviceNodes, line::wf::WorkflowRepresentation< T >::serviceNodes, line::wf::WorkflowComplexity< T >::totalLinks, line::wf::WorkflowComplexity< T >::totalNodes, and workflow_complexity().
Referenced by analyze_workflow(), and workflow_complexity().