file : <arglist> ;
A comprehensive family of file drivers is planned;
their syntax is:
<arglist> ::= <label> , <normal_arglist>
The following file drivers are supported at present:
<normal_arglist> ::= fixed step ,
{ count | <steps_number> } ,
<columns_number> ,
<initial_time> ,
<time_step>
[ , interpolation , { linear | const } ]
{ , [ pad zeroes , { yes | no } , ]
| [ bailout, { none | upper | lower | any } , ] }
" <file_name> "
The value at an arbitrary time is interpolated from the available data.
If the requested value is out of time bounds, zero is returned, unless pad zeroes is set to no, which means that the first or the last set of values is respectively used. As an alternative, if bailout is set to upper, lower or any, the simulation is stopped as soon as the time goes out of the respective ''time`` bounds.
If interpolation is linear (the default), a linear interpolation is used. Otherwise, if interpolation is const, the value at the beginning of the time step that includes the current time is used.
The file format is
# an arbitrary number of lines starting with `#' # # channel #1 channel #2 ... channel #n 1. 2. ... 100. ...
<normal_arglist> ::= variable step ,
<columns_number> ,
[ , interpolation , { linear | const } ]
{ , [ pad zeroes , { yes | no } , ]
| [ bailout, { none | upper | lower | any } , ] }
" <file_name> "
The file format is
# an arbitrary number of lines starting with `#' # # time channel #1 channel #2 ... channel #n 0. 1. 2. ... 100. ...Time values must grow monotonically.
<normal_arglist> ::= socket ,
<columns_number>
{ , local, " <file_name> "
| [ , port, <port_number> ] }
(AuthenticationMethod)<authentication>
The driver binds to a socket listening on port port_number
(defaults to 5555) or on the named pipe file_name; at the
beginning of each time step, in case of connection, the driver expects some
input data in text format, consisting in an authentication token
(if required).
The authentication token is usually in the form
user: <user_name> <new_line>
password: <user_password> <new_line>
Note: white-spaces may be significant in user_name,
and surely are in user_password.
label: <label> <new_line>
indicating the column being edited, followed by the desired changes;
the connection is terminated by a single mark followed by a newline:
. <new_line>
The permitted operations, at present, are:
value: <value> <new_line>
sets the value the drive will assume from the current step on
inc: { yes | no } <new_line>
tells whether to switch on or off the increment mode, resulting in
subsequent value commands being ``set'' rather than ``add''
imp: { yes | no } <new_line>
tells whether to switch on or off the impulse mode, resulting in subsequent
value commands to be applied for one step only.
<normal_arglist> ::= RTAI input ,
stream drive name , " <stream_name> " ,
[ create , { yes | no } , ]
[ host , " <host_name> " , ]
[ { [ non ] blocking } , [ ... ] ]
<columns_number> ;
where
Note: at present, these elements require that the simulation be run in real-time mode (see Section 4.1.5); future development will allow to emulate the use of these elements also when the simulation is not run in real-time, e.g. for modeling or model debugging purposes.
<normal_arglist> ::= stream,
name , " <stream_name> " ,
create , { yes | no } ,
[ { local , " <socket_name> " , |
[ port , <port_number> , ]
[ host , " <host_name> " , ] } ]
[ { [ no ] signal
| [ non ] blocking } , [ ... ] ]
[ input every , <steps> , ]
[ timeout , <timeout> , ]
[ echo , " <echo_file_name> "
[ , precision , <precision> ]
[ , shift , <shift> ] , ]
<columns_number>
The stream drive allows MBDyn to receive streamed inputs
from remote processes both during regular simulations and during
real-time simulations under RTAI.
If the simulation is run in real-time, it uses RTAI mailboxes,
otherwise regular UNIX sockets are used, either in the local or
in the internet namespace.
This drive type is intended to allow the development of real-time models by running regular simulations for the purpose of debugging the model and the control process without the overhead and the potential problems of running in real-time. Then the same model can be run in real-time without changing the details of the communication with the controller process.
The parameter columns_number determines how many channels will be used. A channel is a double typed number; a stream drive can read an arbitrary number of simultaneous channels.