All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jbpt.petri.unfolding.AbstractProperCompletePrefixUnfolding Maven / Gradle / Ivy

Go to download

The jBPT code library is a compendium of technologies that support research on design, execution, and evaluation of business processes.

The newest version!
package org.jbpt.petri.unfolding;

import java.util.HashSet;
import java.util.Set;

import org.jbpt.petri.IFlow;
import org.jbpt.petri.IMarking;
import org.jbpt.petri.INetSystem;
import org.jbpt.petri.INode;
import org.jbpt.petri.IPlace;
import org.jbpt.petri.ITransition;

/**
 * Proper complete prefix unfolding.
 *  
 * @author Artem Polyvyanyy
 */
public abstract class AbstractProperCompletePrefixUnfolding, C extends ICondition, E extends IEvent, F extends IFlow, N extends INode, P extends IPlace, T extends ITransition, M extends IMarking> 
		extends AbstractCompletePrefixUnfolding
{
	public AbstractProperCompletePrefixUnfolding() {
		super();
	}

	public AbstractProperCompletePrefixUnfolding(INetSystem sys, CompletePrefixUnfoldingSetup setup) {
		super(sys, setup);
	}

	public AbstractProperCompletePrefixUnfolding(INetSystem sys) {
		super(sys);
	}

	/**
	 * Check healthy property
	 */
	@Override
	protected E checkCutoffB(E e, E corr) {
		Set ecs = new HashSet(e.getLocalConfiguration().getCut());
		Set ccs = new HashSet(corr.getLocalConfiguration().getCut());
		
		ecs.removeAll(e.getPostConditions());
		ccs.removeAll(corr.getPostConditions());
		
		if (ecs.equals(ccs)) return corr;
		
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy