1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # Pipeline Errors
//!
//! Error types for the 4-step model pipeline orchestrator.
//!
//! ## Variants
//!
//! - [`PipelineError::MissingResult`] -- a required intermediate result
//! is absent (e.g., mode choice did not produce an AUTO matrix).
//! - [`PipelineError::InvalidConfig`] -- the pipeline configuration is
//! inconsistent (e.g., zero feedback iterations).
use fmt;
/// Pipeline orchestration errors.
///
/// These errors indicate problems with the pipeline setup or
/// unexpected missing data between steps, not algorithm failures
/// (those are reported by the step-specific error types).
///
/// # Examples
///
/// ```
/// use macro_traffic_sim_core::pipeline::error::PipelineError;
///
/// let err = PipelineError::MissingResult("no AUTO OD matrix".to_string());
/// assert_eq!(err.to_string(), "missing result: no AUTO OD matrix");
/// ```
///
/// ```
/// use macro_traffic_sim_core::pipeline::error::PipelineError;
///
/// let err = PipelineError::InvalidConfig("feedback_iterations must be > 0".to_string());
/// assert_eq!(err.to_string(), "invalid config: feedback_iterations must be > 0");
/// ```