com.ibm.able.beans.petrinet
Class AblePetriTransition
java.lang.Object
com.ibm.able.AbleObject
com.ibm.able.beans.petrinet.AblePetriNode
com.ibm.able.beans.petrinet.AblePetriTransition
- All Implemented Interfaces:
- AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, java.io.Serializable
- public class AblePetriTransition
- extends AblePetriNode
- implements java.io.Serializable
This class represents a Transition (event) in a High-Level Petri net
- See Also:
- Serialized Form
| Fields inherited from class com.ibm.able.AbleObject |
changed, chgSupport, comment, dataFlowEnabled, defaultName, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
| Methods inherited from class com.ibm.able.beans.petrinet.AblePetriNode |
addDestBufferConnection, addInputArc, addOutputArc, addSourceBufferConnection, getDestBufferConnections, getInputArcs, getName, getOutputArcs, getSourceBufferConnections, removeDestBufferConnection, removeInputArc, removeOutputArc, removeSourceBufferConnection, setInputArcs, setOutputArcs |
| Methods inherited from class com.ibm.able.AbleObject |
addAbleEventListener, addPropertyChangeListener, addPropertyConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, getPropertyConnectionManager, getSleepTime, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, quitAll, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeProperty, removePropertyChangeListener, removePropertyConnection, removeStateChangeListener, reset, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setProperties, setProperty, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
myExpression
protected AbleExpression myExpression
myEnabledFlag
protected boolean myEnabledFlag
myFiringProbability
protected double myFiringProbability
myMeanDelay
protected double myMeanDelay
myDelayDistribution
protected com.ibm.able.statistics.AbleExponentialDistribution myDelayDistribution
myRandom
protected java.util.Random myRandom
myPetriNet
protected AblePetriNet myPetriNet
AblePetriTransition
public AblePetriTransition()
throws AbleException
AblePetriTransition
public AblePetriTransition(java.lang.String theName)
throws AbleException
getEnabled
public boolean getEnabled()
setMeanDelay
public void setMeanDelay(double theMeanDelay)
getMeanDelay
public double getMeanDelay()
setFiringProbability
public void setFiringProbability(double theProbability)
getFiringProbability
public double getFiringProbability()
init
public void init()
throws AbleException
- Description copied from class:
AbleObject
- Initialize and configure the bean.
The bean's state changes to
AbleState.Initiated or
AbleState.Waiting.
If either the AbleEventProcessing or
TimerEventProcessing flags are enabled, this method calls
AbleObject.startEnabledEventProcessing()
to start a new thread for asynchronous or timer event processing.
An AbleProperty.ProcessingState PropertyChangeEvent is fired.
Beans overriding this method should call
super.init() after any customization and
before returning so that the thread is started if needed
and the PropertyChangeEvent is fired.
An application using asynchronous or timer event processing should
sleep until the event queue is functional by imbedding logic like this:
anAbleObject.init();
while (!AbleState.isReady(anAbleObject.getState())) {
try {
Thread.sleep(100l);
} catch (InterruptedException e1) {
}
}
- Specified by:
init in interface AbleBean- Overrides:
init in class AbleObject
- Throws:
AbleException - If an error occurs.- See Also:
AbleObject.startEnabledEventProcessing()
isEnabled
public boolean isEnabled(double theRandomValue)
throws AbleException
- Test to see if the transition could fire.
the number of tokens in every input place >= multiplicity
there are no inhibitor arcs currently active
no guard functions return FALSE
- Throws:
AbleException
process
public void process()
throws AbleException
- Description copied from class:
AbleObject
- Performs the main, synchronous, standard processing
function performed by this bean.
This base method implementation provides tracing only.
- Specified by:
process in interface AbleBean- Overrides:
process in class AbleObject
- Throws:
AbleException- See Also:
AbleObject.inputBuffer,
AbleObject.outputBuffer,
AbleBean.process()
toString
public java.lang.String toString()
getExpression
public AbleExpression getExpression()
getExpressionText
public java.lang.String getExpressionText()
- Returns:
setExpressionText
public void setExpressionText(java.lang.String text)
getGuardClauseText
public java.lang.String getGuardClauseText()
- Returns:
- Returns the myGuardClause.
setGuardClauseText
public void setGuardClauseText(java.lang.String myGuardClause)
- Parameters:
myGuardClause - The myGuardClause to set.
(C) Copyright IBM Corporation 1999, 2005