ChangeFlowProduct( treenode flowObject, int newproduct )
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.product = newProduct;
Example
ChangeFlowProduct( current, 2 );
ChangeTeEdgeSpeed( treenode taskExecuter, double newspeed[, int useAcceleration] )
Description
Changes the speed of a task executer travelling an network edge.
Example
ChangeTeEdgeSpeed( taskExecuter, 0, 1 )
CloseAllFlowIp(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.ports.close();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
CloseAllFlowIp( tank );
CloseAllFlowOp(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports.close();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
CloseAllFlowOp( tank );
CloseFlowInput(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.close();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
CloseFlowInput( tank );
CloseFlowIp(treenode flowObject, int port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.ports[portNumber].open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Close the last input port
CloseFlowIp( tank, nrip( tank ) );
CloseFlowOp(treenode flowObject, int port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports[portNumber].close();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Close the last output port
CloseFlowOp( tank, nrop( tank ) );
CloseFlowOutput(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.close();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
CloseFlowOutput( tank );
ConnectFlowObjectToOtherObject(treenode FromFlowObject, treenode ToFlowObject[, int isActiveConnection])
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.connect( model.find( "OtherFlowObject" ) );
Example
treenode from = node( "FlowSource1", model() );
treenode to = node( "FlowTank2", model() );
// Create a connection from the source to the tank
// and automatically start the flow, if possible.
ConnectFlowObjectToOtherObject( from, to );
Ends an impact factor event, which temporarily decreased or increased the maximum flow of a FloWorks object.
The impact factor event applies a multiplicative factor to the maximum flow rate, which can completely stop or reduce the flow because of a failure mode; but by setting a factor larger than 1 this function can also be used to model increased productivity due to e.g. seasonal fluctuations.
This function is called automatically from the "up" trigger of a FloWorks Impact Event, you usually only need to call it manually if you explicitly used the StartImpactFactorEvent command.
Note that multiple events may be active on a flow object at any time, and multiple flow objects may be impacted by an event, so you may need to call this command more than once.
Calculates the earliest possible start time for a sequence on a workability object,
at or after the current time plus the given offset (defaults to 0).
The workability object can be specified by name, or by a direct reference.
The sequence can be specified by name or by index (starting at 1).
If the workability could not be determined, the function returns -1.
Example
GetEarliestStartForSequence("Weather", 1)
GetFlowContent( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double content = flowTank.content;
Example
// Assume vessel is a FloWorks Vessel and get its tank's content.
int vesselTankContent = GetFlowContent( first( vessel ) );
GetFlowControl( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use Object flowControl = flowObject.flowControl;
Example
GetFlowControl( FluidObject );
GetFlowInput( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double inputAmount = flowObject.input.amount;
Example
GetFlowInput( first( vessel ) )
GetFlowInputRate( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double inputRate = flowObject.input.rate;
Example
// Assume vessel is a FloWorks Vessel and get its loading rate.
GetFlowInputRate( first( vessel ) )
GetFlowInputTriggerAmount( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double inputTriggerAmount = flowObject.input.triggerAmount;
Example
// Delay the input trigger by 100 m3
double newTriggerAmount = GetFlowInputTriggerAmount( involved ) + 100;
SetFlowInputTriggerAmount( involved, newTriggerAmount );
GetFlowMaxContent( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double maxContent = flowTank.maxContent;
Example
// Assume vessel is a FloWorks Vessel and get its capacity.
int vesselTankContent = GetFlowMaxContent( first( vessel ) );
GetFloWorksLicense()
Description
Returns the current FloWorks license.
Example
int hasLicense = GetFloworksLicense() == LICENSE_TYPE_STANDARD );
GetFlowOutput( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double outputAmount = flowObject.output.amount;
Example
GetFlowOutput( first( vessel ) )
GetFlowOutputRate( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double outputRate = flowObject.output.rate;
Example
// Assume vessel is a FloWorks Vessel and get its unloading rate.
GetFlowOutputRate( first( vessel ) )
GetFlowOutputTriggerAmount( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use double outputTriggerAmount = flowObject.output.triggerAmount;
Example
// Delay the output trigger by 100 m3
double newTriggerAmount = GetFlowOutputTriggerAmount( involved ) + 100;
SetFlowOutputTriggerAmount( involved, newTriggerAmount );
GetFlowProductId( string productName )
Description
Finds the numeric ID of a product by name.
Example
int productId = GetFlowProductId( "Raw Material XYZ" );
if(productId > 0) {
flowObject.product = productId;
}
GetFlowProductType( treenode flowObject )
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.product;
Example
int storedProduct = GetFlowProductType( flowTank );
Deprecated.
This command has been deprecated. Instead, you should use flowObject.stats.utilization;
Example
GetFlowUtilization( current );
GetLevel( treenode/string levelTriggeredEvent[, num atTime] )
Description
Calculates the level value of the level triggered event.
If atTime is passed, the level at the given time is returned, otherwise the current value is calculated.
The event object can be specified by name, or by a direct reference.
If the level cannot be determined, for example because you are reading past the end of a non-repeating table, the flag value -999999 is returned.
Example
GetLevel( "MyLevelTriggeredEvent" )
GetNumberPrecision()
Description
Returns the precision for displaying floating point numbers, according to FlexSim settings.
It is mostly useful for converting numbers to text using the numtostring command.
Example
int precision = GetNumberPrecision();
pt( "Pi is approximately ");
pt( numtostring( pi(), precision, precision ) );
pr();
Loads a recipe for a specific product from the Products Table into the Flow Mixer recipe table. The mixer's Product Source trigger is used to decide which ports will be pulled from.
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports.open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
OpenAllFlowIp( tank );
OpenAllFlowOp(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports.open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
OpenAllFlowIp( tank );
OpenFlowInput(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
OpenFlowInput( tank );
OpenFlowIp(treenode flowObject, int port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.ports[portNumber].open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Open the last input port
OpenFlowIp( tank, nrip( tank ) );
OpenFlowOp(treenode flowObject, int port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports[portNumber].open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Open the last output port
OpenFlowOp( tank, nrip( tank ) );
OpenFlowOutput(treenode flowObject)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.open();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
OpenFlowOutput( tank );
SelectFlowIp(treenode flowObject, int... port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.input.ports[portNumber].select();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Open the first input port, close all other ports
SelectFlowIp( tank, 1 );
// Open only the first and last input port, close all other input ports
// (Only when the object has more than one input port)
SelectFlowIp( tank, 1, nrip( tank ) );
SelectFlowOp(treenode flowObject, int... port)
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports[portNumber].select();
Note that some objects, such as the Flow Mixer, may use commands like this to manage their flow, it is safer to use flowObject.output.close(); than flowObject.output.ports.close();.
Example
treenode tank = node( "FlowTank1", model() );
// Open the first output port, close all other ports
SelectFlowOp( tank, 1 );
// Open only the first and last output port, close all other output ports
// (Only when the object has more than one output port)
SelectFlowOp( tank, 1, nrop( tank ) );
SetArrowStyle( treenode flowObject, int arrowStyle )
Description
Sets the arrow style variable for the given FloWorks object, and removes or adds the arrows, depending on the given style.
The following arrow styles are supported:
1: IN connections, using preferably a single arrow from OUT to IN.
2: IN connections, using preferably a short arrow only connected to IN.
3: OUT connections, using preferably a single arrow from OUT to IN.
4: Both (1) and (3)
5: Both (2) and (3)
6: OUT connections, using preferably a short arrow only connected to OUT.
7: Both (1) and (6)
8: Both (2) and (6)
Sets the speed of the flow conveyor.
Setting the speed to 0 will stop the conveyor and close inputs and outputs.
Setting the speed to a negative value will reverse the direction of the conveyor.
Deprecated.
This command has been deprecated. Instead, you should use flowTank.maxContent = newMaximumContent;
Example
// Set the maximum content of the vessel tank to 1000 m3.
SetFlowMaxContent( first( vessel ), 1000 );
SetFlowNrOfTriggerLevels( treenode flowObject, int NrOfLevels )
Description
Set the number of trigger levels of a content-holding flow object such as a tank.
After setting the number of trigger levels, you can use the SetFlowTriggerLevel command to set the level at which these triggers fire.
Only use this to initialise the object.
Do not use during runtime.
SetOutflowRatioValue( treenode flowObject, int portnumber, double newValue, bool recalculateSystem )
Description
Deprecated.
This command has been deprecated. Instead, you should use flowObject.output.ports[portNumber].ratio = newValue;
Example
// Set the ratio of output port 2 to 33%, and recalculate.
SetOutflowRatioValue( current, 2, 33, 1 );
ShowFluidCTD( treenode current )
Description
Deprecated.
This command has been deprecated, do not use it.
Example
ShowFluidCTD( c )
StartFlowMixerRecipe( treenode mixer )
Description
Start the next recipe on a flow mixer in non-repeating mode.
Returns 0 if the recipe has started successfully.
Example
StartFlowMixerRecipe( mixer );
StartImpactFactorEvent( treenode flowObject, treenode eventObject, double impactFactor, int isInputInfluenced, int isOutputInfluenced )
Description
Start an impact factor event, which temporarily decreases or increases the maximum flow of a FloWorks object.
The impact factor event applies a multiplicative factor to the maximum flow rate, which can completely stop or reduce the flow because of a failure mode; but by setting a factor larger than 1 this function can also be used to model increased productivity due to e.g. seasonal fluctuations.
This function is called automatically from the "down" trigger of a FloWorks Impact Event, you do not usually need to call it manually.
Stops loading of the specified transporter at the given loading point.
This function can only be called if loading duration is set manually (loading time function returned 0).
Otherwise loading will stop automatically after the given time.