diff --git a/manual/manual.tex b/manual/manual.tex index bef74b2febc1ab1572161a52889145b5a3a877b8..0c488ec8dc23ae44fcb9f829340a0bfd23ac0740 100644 --- a/manual/manual.tex +++ b/manual/manual.tex @@ -63,7 +63,7 @@ \title{Ebi - a stochastic process mining tool\\{\small\version}\\Manual} \author{The BPM group at RWTH Aachen University\\ -Sander J.J. Leemans, Tian Li} +Sander J.J. Leemans, Tian Li, Leonhard Mühlmeyer} \date{\today} \DeclareMathOperator{\logdiv}{logdiv} diff --git a/src/ebi_framework/ebi_output.rs b/src/ebi_framework/ebi_output.rs index 09e5e32ae26f5311fd7262080ec55d27edff7b3e..b3a6fa8299ef378bfb3b42243cf60ddc0c0c2dd2 100644 --- a/src/ebi_framework/ebi_output.rs +++ b/src/ebi_framework/ebi_output.rs @@ -539,11 +539,12 @@ mod tests { #[test] fn all_exporters() { - for (object, importer, _, _) in crate::tests::get_all_test_files() { + for (object, importer, _, f) in crate::tests::get_all_test_files() { if let EbiInput::Object(object, _) = object { for file_handler2 in EBI_FILE_HANDLERS { for exporter in file_handler2.object_exporters { if exporter.get_type() == importer.clone().unwrap().get_type() { + println!("file {} importer {:?} exporter {}", f, importer, exporter); let mut c = Cursor::new(Vec::new()); exporter .export(EbiOutput::Object(object.clone()), &mut c) diff --git a/src/ebi_objects/directly_follows_model.rs b/src/ebi_objects/directly_follows_model.rs index 95e69ad72d86b966d0d52df14c17e301277d6d1c..f3df83f9d15224f72c3b19842ede2979262fcce6 100644 --- a/src/ebi_objects/directly_follows_model.rs +++ b/src/ebi_objects/directly_follows_model.rs @@ -79,7 +79,7 @@ pub struct DirectlyFollowsModel { impl DirectlyFollowsModel { /** - * Creates a new stochastic directly follows model without any states or edges. This has the empty stochastic language, until a state or an empty trace is added. + * Creates a new directly follows model without any states or edges. This has the empty language, until a state or an empty trace is added. */ pub fn new(activity_key: ActivityKey) -> Self { Self { diff --git a/src/ebi_objects/stochastic_directly_follows_model.rs b/src/ebi_objects/stochastic_directly_follows_model.rs index 43c97a366151b6db7c0a5596d8a7d67e8be1e9fb..871e7879c8034ae12e42723a1c62eab11263ab4b 100644 --- a/src/ebi_objects/stochastic_directly_follows_model.rs +++ b/src/ebi_objects/stochastic_directly_follows_model.rs @@ -49,7 +49,7 @@ pub const FORMAT_SPECIFICATION: &str = "A stochstic directly follows model is a The next line contains the number of edges, followed by, for each edge, a line with first the index of the source activity, then the `>` symbol, then the index of the target activity, then a `w`, and then the weight of the transition. For instance: - \\lstinputlisting[language=ebilines, style=boxed]{../testfiles/a-b_star.dfm} + \\lstinputlisting[language=ebilines, style=boxed]{../testfiles/aa-ab-ba.sdfm} Note that a directly follows model expresses a language and may have duplicated activity labels."; @@ -70,7 +70,12 @@ pub const EBI_STOCHASTIC_DIRECTLY_FOLLOWS_MODEL: EbiFileHandler = EbiFileHandler EbiTraitImporter::Graphable(ebi_trait_graphable::import::<StochasticDirectlyFollowsModel>), ], object_importers: &[ - EbiObjectImporter::DirectlyFollowsModel(StochasticDirectlyFollowsModel::import_as_object), + EbiObjectImporter::StochasticDirectlyFollowsModel( + StochasticDirectlyFollowsModel::import_as_object, + ), + EbiObjectImporter::DirectlyFollowsModel( + StochasticDirectlyFollowsModel::import_as_directly_follows_model, + ), EbiObjectImporter::LabelledPetriNet( StochasticDirectlyFollowsModel::import_as_labelled_petri_net, ), @@ -118,6 +123,11 @@ impl StochasticDirectlyFollowsModel { } } + pub fn import_as_directly_follows_model(reader: &mut dyn BufRead) -> Result<EbiObject> { + let dfg = Self::import(reader)?; + Ok(EbiObject::DirectlyFollowsModel(dfg.into())) + } + pub fn import_as_labelled_petri_net(reader: &mut dyn BufRead) -> Result<EbiObject> { let dfg = Self::import(reader)?; Ok(EbiObject::LabelledPetriNet(dfg.into())) diff --git a/testfiles/aa-ab-ba.sdfm b/testfiles/aa-ab-ba.sdfm new file mode 100644 index 0000000000000000000000000000000000000000..80522c8f0bb6118b9f854c6e2080c361633ebb3e --- /dev/null +++ b/testfiles/aa-ab-ba.sdfm @@ -0,0 +1,23 @@ +stochastic directly follows model +# empty traces weight +0 +# number of nodes +2 +#node 0 +a +#node 1 +b +# number of start nodes +2 +0w2/5 +1w3/5 +# number of end nodes +2 +0w4/5 +1w1/5 +# number of edges +3 +# edges +0>0w1/5 +0>1w1/5 +1>0w3/5