FlowObject.Port

Description

Allows access to the properties of a specific FloWorks port.

You cannot obtain an instance of this class directly, use it as follows:


FlowObject pump = model.find("FlowPump1");
pump.input.ports[1].close();
return pump.input.ports[1].ratio;
	  

Properties

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

Methods

close Close this input or output port.
disconnect Disconnect the object connected to this port.
open Open this input or output port.
select Open this input or output port and close all other ports.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

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.

Do no remove, this fixes the anchor on doc.flexsim.com

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().

Do no remove, this fixes the anchor on doc.flexsim.com

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 and FlowObject.(input/output).ports.disconnect.

Do no remove, this fixes the anchor on doc.flexsim.com

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().

Do no remove, this fixes the anchor on doc.flexsim.com

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.