use serde::{Deserialize, Serialize};
use std::fmt;
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DiscoveryAlgorithm {
#[doc = "SIMD Streaming DFG"]
algo_streaming_dfg,
#[doc = "DFG Discovery"]
algo_dfg,
#[doc = "Fast Discovery"]
algo_fast_discovery,
#[doc = "OCEL I/O"]
algo_ocel_io,
#[doc = "Streaming Conformance"]
algo_streaming_conformance,
#[doc = "Incremental DFG"]
algo_incremental_dfg,
#[doc = "Correlation Miner"]
algo_correlation_miner,
#[doc = "Token Replay Conformance"]
algo_conformance,
#[doc = "Heuristic Miner"]
algo_heuristic_miner,
#[doc = "OCEL Flatten"]
algo_ocel_flatten,
#[doc = "Alpha++ Discovery"]
algo_alpha_plus_plus,
#[doc = "Prediction Engine"]
algo_prediction,
#[doc = "Inductive Miner"]
algo_inductive_miner,
#[doc = "Anomaly Detection"]
algo_anomaly,
#[doc = "Performance Spectrum"]
algo_performance_spectrum,
#[doc = "OC Performance Analysis"]
algo_oc_performance,
#[doc = "Concept Drift Detection"]
algo_drift,
#[doc = "DECLARE Conformance"]
algo_declare_conformance,
#[doc = "Advanced Discovery Suite"]
algo_advanced,
#[doc = "OC Conformance Check"]
algo_oc_conformance,
#[doc = "OC-Petri Net Discovery"]
algo_oc_petri_net,
#[doc = "Alignment-Based Conformance"]
algo_alignments,
#[doc = "Genetic Algorithm Discovery"]
algo_genetic,
#[doc = "ILP Optimization Discovery"]
algo_ilp,
}
impl DiscoveryAlgorithm {
pub fn id(&self) -> &'static str {
match self {
Self::algo_streaming_dfg => "algo-streaming-dfg",
Self::algo_dfg => "algo-dfg",
Self::algo_fast_discovery => "algo-fast-discovery",
Self::algo_ocel_io => "algo-ocel-io",
Self::algo_streaming_conformance => "algo-streaming-conformance",
Self::algo_incremental_dfg => "algo-incremental-dfg",
Self::algo_correlation_miner => "algo-correlation-miner",
Self::algo_conformance => "algo-conformance",
Self::algo_heuristic_miner => "algo-heuristic-miner",
Self::algo_ocel_flatten => "algo-ocel-flatten",
Self::algo_alpha_plus_plus => "algo-alpha-plus-plus",
Self::algo_prediction => "algo-prediction",
Self::algo_inductive_miner => "algo-inductive-miner",
Self::algo_anomaly => "algo-anomaly",
Self::algo_performance_spectrum => "algo-performance-spectrum",
Self::algo_oc_performance => "algo-oc-performance",
Self::algo_drift => "algo-drift",
Self::algo_declare_conformance => "algo-declare-conformance",
Self::algo_advanced => "algo-advanced",
Self::algo_oc_conformance => "algo-oc-conformance",
Self::algo_oc_petri_net => "algo-oc-petri-net",
Self::algo_alignments => "algo-alignments",
Self::algo_genetic => "algo-genetic",
Self::algo_ilp => "algo-ilp",
}
}
pub fn label(&self) -> &'static str {
match self {
Self::algo_streaming_dfg => "SIMD Streaming DFG",
Self::algo_dfg => "DFG Discovery",
Self::algo_fast_discovery => "Fast Discovery",
Self::algo_ocel_io => "OCEL I/O",
Self::algo_streaming_conformance => "Streaming Conformance",
Self::algo_incremental_dfg => "Incremental DFG",
Self::algo_correlation_miner => "Correlation Miner",
Self::algo_conformance => "Token Replay Conformance",
Self::algo_heuristic_miner => "Heuristic Miner",
Self::algo_ocel_flatten => "OCEL Flatten",
Self::algo_alpha_plus_plus => "Alpha++ Discovery",
Self::algo_prediction => "Prediction Engine",
Self::algo_inductive_miner => "Inductive Miner",
Self::algo_anomaly => "Anomaly Detection",
Self::algo_performance_spectrum => "Performance Spectrum",
Self::algo_oc_performance => "OC Performance Analysis",
Self::algo_drift => "Concept Drift Detection",
Self::algo_declare_conformance => "DECLARE Conformance",
Self::algo_advanced => "Advanced Discovery Suite",
Self::algo_oc_conformance => "OC Conformance Check",
Self::algo_oc_petri_net => "OC-Petri Net Discovery",
Self::algo_alignments => "Alignment-Based Conformance",
Self::algo_genetic => "Genetic Algorithm Discovery",
Self::algo_ilp => "ILP Optimization Discovery",
}
}
pub fn module(&self) -> &'static str {
match self {
Self::algo_streaming_dfg => "simd_streaming_dfg",
Self::algo_dfg => "discovery",
Self::algo_fast_discovery => "fast_discovery",
Self::algo_ocel_io => "ocel_io",
Self::algo_streaming_conformance => "streaming_conformance",
Self::algo_incremental_dfg => "incremental_dfg",
Self::algo_correlation_miner => "correlation_miner",
Self::algo_conformance => "conformance",
Self::algo_heuristic_miner => "more_discovery",
Self::algo_ocel_flatten => "ocel_flatten",
Self::algo_alpha_plus_plus => "more_discovery",
Self::algo_prediction => "prediction",
Self::algo_inductive_miner => "more_discovery",
Self::algo_anomaly => "anomaly",
Self::algo_performance_spectrum => "performance_spectrum",
Self::algo_oc_performance => "oc_performance",
Self::algo_drift => "prediction_drift",
Self::algo_declare_conformance => "declare_conformance",
Self::algo_advanced => "advanced_algorithms",
Self::algo_oc_conformance => "oc_conformance",
Self::algo_oc_petri_net => "oc_petri_net",
Self::algo_alignments => "alignments",
Self::algo_genetic => "genetic_discovery",
Self::algo_ilp => "ilp_discovery",
}
}
pub fn performance_tier(&self) -> &'static str {
match self {
Self::algo_streaming_dfg => "FastTier",
Self::algo_dfg => "FastTier",
Self::algo_fast_discovery => "FastTier",
Self::algo_ocel_io => "FastTier",
Self::algo_streaming_conformance => "FastTier",
Self::algo_incremental_dfg => "FastTier",
Self::algo_correlation_miner => "FastTier",
Self::algo_conformance => "FastTier",
Self::algo_heuristic_miner => "MediumTier",
Self::algo_ocel_flatten => "MediumTier",
Self::algo_alpha_plus_plus => "MediumTier",
Self::algo_prediction => "MediumTier",
Self::algo_inductive_miner => "MediumTier",
Self::algo_anomaly => "MediumTier",
Self::algo_performance_spectrum => "MediumTier",
Self::algo_oc_performance => "MediumTier",
Self::algo_drift => "MediumTier",
Self::algo_declare_conformance => "MediumTier",
Self::algo_advanced => "MediumTier",
Self::algo_oc_conformance => "MediumTier",
Self::algo_oc_petri_net => "SlowTier",
Self::algo_alignments => "SlowTier",
Self::algo_genetic => "SlowTier",
Self::algo_ilp => "SlowTier",
}
}
pub fn feature_gate(&self) -> &'static str {
match self {
Self::algo_streaming_dfg => "streaming_basic",
Self::algo_dfg => "",
Self::algo_fast_discovery => "",
Self::algo_ocel_io => "ocel",
Self::algo_streaming_conformance => "streaming_full",
Self::algo_incremental_dfg => "",
Self::algo_correlation_miner => "",
Self::algo_conformance => "",
Self::algo_heuristic_miner => "",
Self::algo_ocel_flatten => "ocel",
Self::algo_alpha_plus_plus => "",
Self::algo_prediction => "ml",
Self::algo_inductive_miner => "",
Self::algo_anomaly => "ml",
Self::algo_performance_spectrum => "discovery_advanced",
Self::algo_oc_performance => "ocel",
Self::algo_drift => "ml",
Self::algo_declare_conformance => "conformance_basic",
Self::algo_advanced => "discovery_advanced",
Self::algo_oc_conformance => "ocel",
Self::algo_oc_petri_net => "ocel",
Self::algo_alignments => "conformance_full",
Self::algo_genetic => "discovery_advanced",
Self::algo_ilp => "discovery_advanced",
}
}
pub fn all() -> &'static [Self] {
&[
Self::algo_streaming_dfg,
Self::algo_dfg,
Self::algo_fast_discovery,
Self::algo_ocel_io,
Self::algo_streaming_conformance,
Self::algo_incremental_dfg,
Self::algo_correlation_miner,
Self::algo_conformance,
Self::algo_heuristic_miner,
Self::algo_ocel_flatten,
Self::algo_alpha_plus_plus,
Self::algo_prediction,
Self::algo_inductive_miner,
Self::algo_anomaly,
Self::algo_performance_spectrum,
Self::algo_oc_performance,
Self::algo_drift,
Self::algo_declare_conformance,
Self::algo_advanced,
Self::algo_oc_conformance,
Self::algo_oc_petri_net,
Self::algo_alignments,
Self::algo_genetic,
Self::algo_ilp,
]
}
}
impl fmt::Display for DiscoveryAlgorithm {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.label())
}
}