ommx 2.5.2

Open Mathematical prograMming eXchange (OMMX)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::decision_variable::VariableID;

/// Error types that can occur during substitution operations.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum SubstitutionError {
    /// Error indicating that a recursive assignment was attempted.
    #[error("Recursive assignment detected: variable {var_id} cannot be assigned to a function that depends on itself")]
    RecursiveAssignment { var_id: VariableID },

    /// Error indicating that a cycle was detected in the assignment graph.
    #[error("Cyclic assignment detected: circular dependency found in variable assignments")]
    CyclicAssignmentDetected,
}