Model
Description
A class containing data and functions for the model.
Methods
find | Finds a node in the model's subtree by its path. |
Static Properties
dateTime | The current date and time in FlexSim time. |
nextStopDateTime | The date and time in FlexSim time of the next stop time. |
nextStopTime | The simulation time of the next stop time. |
parameters | Provides access to the model's parameters. |
performanceMeasures | Provides access to the model's performance measures. |
startDateTime | The model's start date and time in FlexSim time. |
statisticalTime | The current simulation time with respect to when stats were last reset. |
time | The current simulation time. |
warmupDateTime | The warmup date and time in FlexSim time. |
warmupTime | The total warmup time. |
Static Methods
getDateTime | Returns a date and time in FlexSim time from the given simulation time. |
getTime | Returns the simulation time from the given FlexSim time. |
Details
Model.find()
treenode find( string path ) |
Parameters
path | The path, starting at the model node, that addresses the target node. |
Returns
treenode | If the addressed node exists, the method returns that node, otherwise NULL. |
Description
Finds a node in the model's subtree by its path.
This is the same as calling treenode.find() on the model node: model().find("ObjectName")
treenode obj = Model.find("ObjectName");
Model.parameters
static readonly parameters
Description
Provides access to the model's parameters.
Getting a parameter value
Model.parameters.Parameter1
Model.parameters["Parameter1"].value
Getting a parameter value, passing in up to three arguments
// Passed-in values are available as param(1), param(2), and param(3)
Model.parameters["Parameter1"].evaluate(param1, param2, param3)
Setting a parameter value
Model.parameters.Parameter1 = 5;
Model.parameters["Parameter1"].value = 5;
List parameter tables
Model.parameters.tableNames // Array[1]: [Parameters]
List parameters
Model.parameters.names() // Array[1]: [Parameter1]
Model.parameters.names("Parameters") // Array[1]: [Parameter1]
Model.performanceMeasures
static readonly performanceMeasures
Description
Provides access to the model's performance measures.
Getting a performance measure value
Model.performanceMeasures.Parameter1
Model.performanceMeasures["Parameter1"].value
List performance measure tables
Model.performanceMeasures.tableNames // Array[1]: [PerformanceMeasures]
List performance measures
Model.performanceMeasures.names() // Array[1]: [PerformanceMeasure1]
Model.performanceMeasures.names("PerformanceMeasures") // Array[1]: [PerformanceMeasure1]
Model.statisticalTime
static readonly double statisticalTime
Description
The current simulation time with respect to when stats were last reset.
If the model has a warmup time, this will return the difference between the simulation time and the warmup time. statisticalTime = time - warmupTimedouble statTime = Model.statisticalTime;
Model.getDateTime()
static DateTime getDateTime( double modelTime ) |
Parameters
modelTime | The simulation time. |
Returns
DateTime | The DateTime represented by the simulation time. |
Description
Returns a date and time in FlexSim time from the given simulation time.
DateTime dateTime = Model.getDateTime(100);
Model.getTime()
static double getTime( DateTime dateTime ) |
Parameters
dateTime | The date and time in FlexSim time. |
Returns
double | The simulation time represented by the FlexSim time. |
Description
Returns the simulation time from the given FlexSim time.
DateTime date = DateTime("8:00:00 AM Wed 19 Jul 2017");
double theTime = Model.getTime(date);