ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.beans.petrinet
Class AblePetriTransition

java.lang.Object
  extended bycom.ibm.able.AbleObject
      extended bycom.ibm.able.beans.petrinet.AblePetriNode
          extended bycom.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

Field Summary
protected  com.ibm.able.statistics.AbleExponentialDistribution myDelayDistribution
           
protected  boolean myEnabledFlag
           
protected  AbleExpression myExpression
           
protected  double myFiringProbability
           
protected  double myMeanDelay
           
protected  AblePetriNet myPetriNet
           
protected  java.util.Random myRandom
           
 
Fields inherited from class com.ibm.able.beans.petrinet.AblePetriNode
myInputArcs, myOutputArcs
 
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
 
Constructor Summary
AblePetriTransition()
           
AblePetriTransition(java.lang.String theName)
           
 
Method Summary
 boolean getEnabled()
           
 AbleExpression getExpression()
           
 java.lang.String getExpressionText()
           
 double getFiringProbability()
           
 java.lang.String getGuardClauseText()
           
 double getMeanDelay()
           
 void init()
          Initialize and configure the bean.
 boolean isEnabled(double theRandomValue)
          Test to see if the transition could fire.
 void process()
          Performs the main, synchronous, standard processing function performed by this bean.
 void setExpressionText(java.lang.String text)
           
 void setFiringProbability(double theProbability)
           
 void setGuardClauseText(java.lang.String myGuardClause)
           
 void setMeanDelay(double theMeanDelay)
           
 java.lang.String toString()
           
 
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
 

Field Detail

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
Constructor Detail

AblePetriTransition

public AblePetriTransition()
                    throws AbleException

AblePetriTransition

public AblePetriTransition(java.lang.String theName)
                    throws AbleException
Method Detail

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.

ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005