de.uni.freiburg.iig.telematik.sepia.overlap.OverlapResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SEPIA Show documentation
Show all versions of SEPIA Show documentation
SEPIA provides implementations for various types of Petri nets. Along Place/Transition-nets, it supports Petri nets with distinguishable token colors and defines coloured workflow nets, where coloured tokens are interpreted as data elements used during process execution. To support information flow analysis of processes, SEPIA defines so-called IF-Nets, tailored for security-oriented workflow modeling which enable users to assign security-levels (HIGH, LOW) to transitions, data elements and persons/agents participating in the process execution.
The newest version!
package de.uni.freiburg.iig.telematik.sepia.overlap;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.sequences.MGTraversalResult;
import de.uni.freiburg.iig.telematik.sepia.replay.ReplayResult;
import de.uni.freiburg.iig.telematik.sewol.log.LogEntry;
public class OverlapResult {
private double fitness = 0.0;
private double precision = 0.0;
private MGTraversalResult traversalResult = null;
private ReplayResult replayResult = null;
public OverlapResult(MGTraversalResult traversalResult, ReplayResult replayResult) {
super();
this.traversalResult = traversalResult;
this.replayResult = replayResult;
// System.out.println("Log sequences:");
// for(Object logSequence: logSequences){
// System.out.println(logSequence);
// }
// System.out.println("Fitting sequences:");
// for(Object fittingSequence: replayResult.getFittingSequences()){
// System.out.println(fittingSequence);
// }
// System.out.println("Complete sequences:");
// for(Object completeSequence: traversalResult.getCompleteSequences()){
// System.out.println(completeSequence);
// }
// System.out.println("Complete fitting sequences:");
// for(Object completeFittingSequence: fittingCompleteSequences){
// System.out.println(completeFittingSequence);
// }
fitness = replayResult.getFittingSequences().size() / (replayResult.getNumSequences() + 0.0);
// if(fitness != 1){
// System.out.println("Difference sequences (fitness):");
// for(Object differenceSequence: replayResult.getNonFittingSequences()){
// System.out.println(differenceSequence);
// }
// }
// System.out.println("Model sequences:");
// for(List modelSequence: traversalResult.getCompleteSequences())
// System.out.println(modelSequence);
int nonFittingCompleteSequences = traversalResult.getCompleteSequences().size() - replayResult.getNonFittingSequences().size();
precision = 1.0 - (nonFittingCompleteSequences / (traversalResult.getCompleteSequences().size() + 0.0));
// if(precision != 1){
// System.out.println("Difference sequences (precision):");
// for(Object differenceSequence: nonFittingCompleteSequences){
// System.out.println(differenceSequence);
// }
// }
}
public double getFitness() {
return fitness;
}
public double getPrecision() {
return precision;
}
public MGTraversalResult getTraversalResult() {
return traversalResult;
}
public ReplayResult getReplayResult() {
return replayResult;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy