When the Driver application is executed, after a brief setup period it returns control to the user with a SME> prompt. The user may input the following simulation commands (sim-cmds) at the SME prompt to control and configure various aspects of the simulation.
These sim-cmds are used to start, stop, step, break, and exit the simulation.
s {e,c}
DESCRIPTION:
This sim-cmd steps the simulation forward by one exe-cmd or one event. Each event is composed of a sorted list of exe-cmds that are executed at the same (simulation) time (see section 4.3). Each exe-cmd updates the data structures of one variable.
ARGUMENT1 (optional char):
e :Step one event (default).
c :Step one exe-cmd.
r {endTime}
DESCRIPTION:
This sim-cmd is used to run the simulation until endTime is reached in simulation time. The endTime parameter is measured in simulation time units (i.e. same units as the argument x to the dt(x) config-cmd).
ARGUMENT1 ( optional float ):
endTime :Run Simulation until endTime is reached.
b {c,a,i,u,p,C,D} {0,1}
DESCRIPTION:
This sim-cmd is used to set break points in the simulation execution. The simulation retruns control to the user ( SME> prompt ) jut prior to executing a exe-cmd with a break point attached.
ARGUMENT1 ( optional char ):
c :Set a break point on the current exe-cmd.
a :Set breaks on all exe-cmds associated with the current variable.
i :Set break on init exe-cmds associated with current variable.
u :Set break on update exe-cmds associated with current variable.
p :Set break on pipe exe-cmds associated with current variable.
C :Clear breaks associated with current variable.
D :Clear breaks associated with current exe-cmd.
ARGUMENT2 ( optional bool (0,1): default = 1 ):
1 :Set break point(s) on the selected exe-cmd(s).
0 :Remove break point(s) on the selected exe-cmd(s).
S
DESCRIPTION:
This sim-cmd is used reset the simulation to its inital state. At this point, issuing a r sim-cmd will restart the simulation from the beginning.
X
DESCRIPTION:
This sim-cmd is used exit the simulation.
The following sim-cmds are used to choose the current Module, Variable, Event, or exe-cmd. These sim-cmds set the context for other sim-cmds.
m {<moduleName>}
DESCRIPTION:
This sim-cmd sets the current module to the module listed in the first argument.
ARGUMENT1 ( optional string, default = NULL ):
<moduleName>} :Name of a module in the simulation.
v {<moduleName>} {<variableName>}
DESCRIPTION:
This sim-cmd sets the current variable to the variable listed in the first two arguments.
ARGUMENT1 ( optional string, default = NULL ):
<moduleName> :Name of a module in the simulation.
ARGUMENT2 ( optional string, default = NULL ):
<variableName> :Name of a variable in module <moduleName>.
l {m,v,c,d}
DESCRIPTION:
This sim-cmd is used to generated a numbered list of module, variable, exe-cmd, or dependency objects. Items can be choosen from this list using the Choose (c) sim-cmd. An item that is choosen becomes current.
ARGUMENT1 ( optional char, default = previous value ):
m :List the modules in the simulation.
v :List the variables in the current module.
c :List the exe-cmds associated with the current variable.
d :List the variable dependencies associated with the current exe-cmd.
c [index]
DESCRIPTION:
This sim-cmd is used to choose a module, variable, command, or dependency object from the most recently generated list ( List Objects sim-cmd ). An item that is choosen becomes current.
ARGUMENT1 ( required int ):
index: Index of item in list to be choosen.
The following sim-cmds are used to retrieve data from the the current Model, Module, Variable, Event, or exe-cmd object.
q {s,t,m,i,c}
DESCRIPTION:
This sim-cmd is used to query the current variable for information classified as space, time, mode, initmode, and class (according to the first argument). With no arguments the name of the current variable is returned.
ARGUMENT1 ( optional float ):
s :Return Spatial mode.
t :Return temporal mode.
m :Return special mode.
i :Return init mode.
c: :Return class.
d {startIndex} {endIndex}
DESCRIPTION:
This sim-cmd is used to dump an array of floating-point data from the current variable. The array ordering follows the internal ordering of data for the variable. If a spatial grid is needed, use the dg sim-cmd.
ARGUMENT1 ( optional int, default=0 ):
Index of first data element.
ARGUMENT2 (optional int, default=100):
Index of final data element.
dg { rowIndex, colIndex }
DESCRIPTION:
This sim-cmd is used to dump a 25x25 array of floating-point data from the current variable. The array is spatially ordered, the first argument gives that coordinate of the upper-left corner of the array on the Frames grid.
ARGUMENT1 ( optional coordinates, default=(0,0) ):
Frame coordinates of the upper-left corner of the array (row,col).
dp [ rowIndex, colIndex ]
DESCRIPTION:
This sim-cmd is used to dump a floating-point value from the current variable at a specified point. The first argument gives the coordinate of the point on the Frames grid.
ARGUMENT1 ( required coordinates ):
Frame coordinates of the point to be printed(row,col).
dc
DESCRIPTION:
This sim-cmd is used to display the code executed by the current exe-cmd.
dv
DESCRIPTION:
This sim-cmd is used to display the the variables data in a viewer. (Note this command is only available if the SME is built with Java enabled). If the variable is spatial then the variables spatial data at the current timestep will be sent to a map viewer, if the variable is non-spatial then the variables timeseries data will be sent to a graph viewer.
V
DESCRIPTION:
This sim-cmd is used display data about the current variable.
The following sim-cmds are used configure various aspects of the simulation. They are used primarily by the SME java interface, but are listed here for completeness.
C [a,m,v,<externalName>] [config-cmd]
DESCRIPTION:
This command is used to pass config-cmds to one of the current objects in the simulation. The first argument determines the class of object to receive the config-cmd, and the second argument is any config-cmd that can be accepted by that class of objects (see section 7 for details).
ARGUMENT1 ( required string or char ):
a :Pass the config-cmd to the model object.
m :Pass the config-cmd to the current module object.
v :Pass the config-cmd to the current Variable object.
<externalName> : Pass the config-cmd to the external object named.
ARGUMENT2 ( required string ):
config-cmd : config-cmd as listed in section 7.
N [<hostName>] {<timeOut>} {<buffSize>} {<dataSize>} {<sync>}
DESCRIPTION:
This sim-cmd is used to pass network information to the Driver that is used when the socket connection is established between the interface and the Driver. This sim-cmd is used primarily by the SME interfaces.
k {pipeCmd}
DESCRIPTION:
This sim-cmd is used to delete a pipe command associated with the current variable. With no arguments all pipes associated with the current variable are deleted. The sim-cmd is used primarily by the SME interfaces.
ARGUMENT1 ( optional string ):
pipeCmd :Pipe command to be deleted (see SECTION 7).