Skip to main content
Version: 27.0

FlowObject.Port

Description​

Allows access to the properties of a specific FloWorks port.

Properties​

PropertyDescription
ratioReturns the ratio of this port in the Balanced Flow By Percentage setting.

Methods​

MethodDescription
closeClose this input or output port.
openOpen this input or output port.
selectOpen this input or output port and close all other ports.
disconnectDisconnect the object connected to this port.

Details​

FlowObject.Port.ratio​

double ratio

Description​

Returns the ratio of this port in the Balanced Flow By Percentage setting.

If the input or output type of this object is set to maintain a fixed ratio between all the ports, the ratio can be changed dynamically by setting this property. To check the current ratio of a port, check this property.

Note that FloWorks normalizes the values of the entire table based on the sum of all ports, so the ratios of all ports do not necessarily add up to 1 (100%). Also, getting or setting this value does not guarantee that the object is indeed set to use Balanced Flow; by default most objects use Preferred Flow order.

FlowObject.Port.close()​

void close( )

Description​

Close this input or output port.

This is the FloWorks-equivalent of the FlexSim commands closeip or closeop.

You should not use those FlexSim commands: calling obj.input.ports[i].close() and obj.output.ports[i].close() ensures that all flow rates in the network are recalculated while closeip and similar functions do not.

If you want to close all ports, use obj.input.ports.close() or obj.input.[close](flow-object-input-output.html#method-close)().

FlowObject.Port.open()​

void open( )

Description​

Open this input or output port.

This is the FloWorks-equivalent of the FlexSim commands openip or openop.

You should not use those FlexSim commands: calling obj.input.ports[i].open() and obj.output.ports[i].open() ensures that all flow rates in the network are recalculated while openip and similar functions do not.

If you want to open all ports, use obj.input.ports.open() or obj.input.[open](flow-object-input-output.html#method-open)().

FlowObject.Port.select()​

void select( )

Description​

Open this input or output port and close all other ports.

This is the FloWorks-equivalent of the FlexSim commands closeallip or closeallop followed by a single openip or openop command on the specified port.

You should not use those FlexSim commands: calling obj.input.ports[i].select() ensures that all flow rates in the network are recalculated.

FlowObject.Port.disconnect()​

void disconnect( )

Description​

Disconnect the object connected to this port.

In some models, you want to dynamically connect and disconnect ports.

After dynamically (i.e. during the model run, not before Reset) connecting or disconnecting ports a recalculation of the flow rates is required.

This recalculation is not triggered when you use the default FlexSim commands such as contextdragconnection.

Therefore FloWorks provides two commands: FlowObject.[connect](flow-object.html#method-connect) and FlowObject.(input/output).ports.disconnect.