FlowTank

Inherits from FlowObject

Description

The main class for FloWorks content-holding objects, such as Tanks.

Properties

content Gets or sets the current content.
isEmpty Returns a value indicating whether the object is empty.
isFull Returns a value indicating whether the object is full.
maxContent Gets or sets the maximum content.
stats Allows access to a FloWorks object's statistics.

Details

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

FlowTank.content

double content

Description

Gets or sets the current content.

This property will return the current content of the object.

You can also use it to set the current content, however you should use this functionality with caution!

An error will occur if you try to set the current content lower than 0 or above the current maximum content.

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

FlowTank.isEmpty

readonly int isEmpty

Description

Returns a value indicating whether the object is empty.

This property returns 0 if the object has any content, and non-zero if it is empty.


if(tank.isEmpty) { 
  // ... 
} else { 
  // ...
}
	  
Do no remove, this fixes the anchor on doc.flexsim.com

FlowTank.isFull

readonly int isFull

Description

Returns a value indicating whether the object is full.

This property returns 0 if the content of the object is below the maximum content, and non-zero if it is empty.


if(tank.isFull) { 
  // ... 
} else { 
  // ...
}
	  
Do no remove, this fixes the anchor on doc.flexsim.com

FlowTank.maxContent

double maxContent

Description

Gets or sets the maximum content.

This property will return or change the maximum content of the object.

An error will occur if you try to set the maximum content lower than 0 or below the current actual content.

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

FlowTank.stats

readonly stats

Description

Allows access to a FloWorks object's statistics.

This property provides the following properties and methods:

input - returns the current cumulative inflow of the object.

output - returns the current cumulative outflow of the object.

content (for content-holding objects only) - returns the current content of this object.

state(Variant& profile = nullvar) - returns a state tracked variable. If no profile argument is given, or if it is 1, then the default FloWorks state profile is returned. If the profile argument is equal to 0, the default FlexSim state profile is returned (note that most FloWorks objects do not use this). Other state profiles can be returned by providing the profile number or name.


// Get the state of a pump
FlowObject obj = model().find("FlowPump1");
int curState = obj.stats.state().value;