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

com.netgrif.application.engine.petrinet.domain.arcs.InhibitorArc Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.3.3
Show newest version
package com.netgrif.application.engine.petrinet.domain.arcs;

import com.netgrif.application.engine.petrinet.domain.Place;

/**
 * If there is an arc a with a weight w=W(p,t) connecting a place p with a transition t,
 * then t can be enabled in a marking m if the following condition is satisfied:
*
m(p) < w
* More info */ public class InhibitorArc extends PTArc { /** * Returns true if source place has fewer tokens then arc weight. * * @return true if
*
m(p) < w
* false otherwise. */ @Override public boolean isExecutable() { if (this.reference != null) multiplicity = this.reference.getMultiplicity(); return ((Place) source).getTokens() < multiplicity; } /** * Does nothing. The token situation on p is not changed by the firing of t, i.e. m'(p) = m(p). */ @Override public void execute() { } /** * Does nothing. The token situation on p is not changed by the firing of t, i.e. m'(p) = m(p). */ @Override public void rollbackExecution(Integer tokensConsumed) { } @SuppressWarnings("Duplicates") @Override public InhibitorArc clone() { InhibitorArc clone = new InhibitorArc(); clone.setSourceId(this.sourceId); clone.setDestinationId(this.destinationId); clone.setMultiplicity(this.multiplicity); clone.setObjectId(this.getObjectId()); clone.setImportId(this.importId); clone.setReference(this.reference == null ? null : this.reference.clone()); return clone; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy