- java.lang.Object
- com.anylogic.engine.Port<InMessageType,
- com.anylogic.engine.FlowchartPort<InMessageType,
- Type Parameters:
InMessageType
- the type of messages being received by the portOutMessageType
- 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:
-
Port
Serialized Form
Constructor | Description |
---|---|
FlowchartPort |
Modifier and Type | Method | Description |
---|---|---|
abstract long | count() |
Returns the number of agents passed through this port so far
|
FlowchartBlock | getAgent() |
Returns the agent that owns the port.
|
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. |
FlowchartBlock | getFlowchartBlockRepresentative |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
boolean | isCannotAccept() |
Returns
true if this (input) port can't accept agents at the current time. |
abstract boolean | isError() |
Returns
true if there is an error with this port,
e.g. |
boolean | isPortStateAnimated() |
Returns
true if states of port are shown (usually by colored outline). |
boolean | isReadyToExit() |
Returns
true if there is some agent ready to exit this (output) port. |
abstract void | markError() |
Marks this port as having error
|
String | toString() |
Returns formatted number of agents passed through this port so far
|
public FlowchartPort(FlowchartBlock ao)
public FlowchartBlock getAgent()
Description copied from class:
Port
Returns the agent that owns the port.
- Overrides:
getAgent
in classPort<InMessageType,
OutMessageType> - Returns:
- The agent owning this port.
- Since:
- 8.0
public FlowchartBlock getFlowchartBlockRepresentative()
Returns the flowchart block which is the representative block for this port.
The returned value differs from
The returned value differs from
getAgent()
in case when this is the port
of the block from internal flowchart of some other flowchart-block.@AnyLogicInternalAPI public FlowchartBlock getFlowchartBlockRepresentative(Agent agent)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
@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
public abstract void markError()
Marks this port as having error
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
public boolean isReadyToExit()
Returns
true
if there is some agent ready to exit this (output) port.- Since:
- 8.0
public boolean isCannotAccept()
Returns
true
if this (input) port can't accept agents at the current time.- Since:
- 8.0
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
public String toString()
Returns formatted number of agents passed through this port so far
- Overrides:
toString
in classPort<InMessageType,
OutMessageType> - Returns:
- formatted
count()