AnyLogic
Expand
Font size
Type Parameters:
InMessageType - the type of messages being received by the port
OutMessageType - the type of messages being sent by the port
All Implemented Interfaces:
com.anylogic.engine.internal.Child, Serializable
Direct Known Subclasses:
FlowchartMappedPort

public abstract class FlowchartPort<InMessageType,OutMessageType>
extends Port<InMessageType,OutMessageType>
Special Port class for flowchart blocks. See also Port
Since:
7.0
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
PortSerialized Form

Constructor Summary

ConstructorDescription
FlowchartPort(FlowchartBlock ao) 

Method Summary

Modifier and TypeMethodDescription
abstract longcount()
Returns the number of agents passed through this port so far
FlowchartBlockgetAgent()
Returns the agent that owns the port.
FlowchartBlockgetFlowchartBlockRepresentative()
Returns the flowchart block which is the representative block for this port.
The returned value differs from getAgent() in case when this is the port of the block from internal flowchart of some other flowchart-block.
FlowchartBlockgetFlowchartBlockRepresentative(Agent agent)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
booleanisCannotAccept()
Returns true if this (input) port can't accept agents at the current time.
abstract booleanisError()
Returns true if there is an error with this port, e.g.
booleanisPortStateAnimated()
Returns true if states of port are shown (usually by colored outline).
booleanisReadyToExit()
Returns true if there is some agent ready to exit this (output) port.
abstract voidmarkError()
Marks this port as having error
StringtoString()
Returns formatted number of agents passed through this port so far

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Details

FlowchartPort

public FlowchartPort(FlowchartBlock ao)

Method Details

getAgent

public FlowchartBlock getAgent()
Description copied from class: Port
Returns the agent that owns the port.
Overrides:
getAgent in class Port<InMessageType,OutMessageType>
Returns:
The agent owning this port.
Since:
8.0

getFlowchartBlockRepresentative

public FlowchartBlock getFlowchartBlockRepresentative()
Returns the flowchart block which is the representative block for this port.
The returned value differs from getAgent() in case when this is the port of the block from internal flowchart of some other flowchart-block.

getFlowchartBlockRepresentative

@AnyLogicInternalAPI
public FlowchartBlock getFlowchartBlockRepresentative(Agent agent)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

isPortStateAnimated

@AnyLogicInternalLibraryAPI
public boolean isPortStateAnimated()
Returns true if states of port are shown (usually by colored outline). Port state may be one of following: "open for receive", "busy", "ready to transmit" etc.
Returns:
true if port states are shown, false otherwise
Since:
8.0

markError

public abstract void markError()
Marks this port as having error

isError

public abstract boolean isError()
Returns true if there is an error with this port, e.g. "the agent at the head of the queue has spent a non-zero time at this port".
Returns:
true if there is an error with this port

isReadyToExit

public boolean isReadyToExit()
Returns true if there is some agent ready to exit this (output) port.
Since:
8.0

isCannotAccept

public boolean isCannotAccept()
Returns true if this (input) port can't accept agents at the current time.
Since:
8.0

count

public abstract long count()
Returns the number of agents passed through this port so far
Returns:
the number of agents passed through this port so far

toString

public String toString()
Returns formatted number of agents passed through this port so far
Overrides:
toString in class Port<InMessageType,OutMessageType>
Returns:
formatted count()