AnyLogic
Expand
Font size

Fluid Library ports

An output port of a Fluid Library block can be connected to at most one input port and vice versa. One-to-many connections are not allowed; you should use FluidMerge, FluidSplit, FluidSelectInput, or FluidSelectOutput to model those. This of course does not apply to the input port of AgentToFluid and the output port of FluidToAgent — they are normal Process Modeling Library ports.

A port can be left unconnected, in this case the flow rate through the port is always zero.

Functions

Both input and output ports of the Fluid Library blocks have the following functions:

Function Description
double rate() Returns the current flow rate through this port.
double minRate() Returns the historical minimum of the flow rate through this port.
double maxRate() Returns the historical maximum of the flow rate through this port.
double averageRate() Returns the average flow rate through the port throughout the total operating time. It Is calculated as amountPassed() / total time.
double amountPassed() Returns the total amount passed through the port since the start of the simulation.
void resetStats() Resets statistics collected for this block, including the statistics collected for its ports.
Object batch() Returns the current batch being transmitted through or just appeared at this port.
Color color() Returns the color of the current batch.
boolean isConnected() Tests if the port is currently connected (has a peer port).
boolean isError() Tests if the port has signaled error.
How can we improve this article?