The configuration of LEPTON influences its behavior in various domains:
A default configuration is provided that allows to use LEPTON without any extra parameters. Moreover, the comportement of LEPTON can be customized by changing its configuration
The configuration of LEPTON is defined by configuration properties. A
configuration property is represented by a key=value
pair where
key
is a predefined unique name and value
is a string
representation of a typed value (file or directory name, integer or
float value, textual value,...). Examples:
simul_area=car:0,0,1500,1500
min_speed=0.5
show=true
Variables represented by their names between ${
and }
can be used
in the values of configuration properties. Examples:
out_dgs=${log_dir}/simul.dgs
beta=${alpha}
The variables can be:
${HOME}
, ${USER}
, ${HOSTNAME}
${lepton_home}
, ${log_dir}
More informations about some properties are provided in specific how-tos (see the how-tos list). All available configuration properties and their default values are described here.
A configuration file contains lines composed of key=value
pairs
defining configuration properties. Each line contains at most one
property. Empty lines or comment lines starting with the #
character are ignored.
Properties representing textual values composed of multiple lines
have their values delimited by " "
and each line ending with
\
. Example:
stylesheet="graph {fill-mode : none;} \
node {fill-mode: plain; text-alignment: above; size: 8px; fill-color: black;} \
edge {shape: line; fill-mode: dyn-plain; size: 2px; fill-color: red;}"
A profile is a set of configuration properties and their values
together with a profile name. Several profiles related or not to the
same set of properties are defined in a profile file having the
following format: each profile is introduced by its name between
[
and ]
followed by its configuration. Configuration values
before the first profile name are common to all profiles. In the
following example, two profiles road_vehicle
and fast_pedestrian
have each specific values for the min_speed
and max_speed
properties, and the same values for the min_wait
and max_wait
properties:
min_wait=0
max_wait=0
[road_vehicle]
prefix=RV
min_speed=2
max_speed=5
[fast_pedestrian]
prefix=FP
min_speed=1
max_speed=2
Each profile should have a prefix
property that represents a prefix for the
names of the nodes having this profile.
While running LEPTON, the default configuration file is always loaded first. This configuration can be changed by overwritting some or all of its properties by passing them as command line arguments, either individually or grouped in configuration files:
lepton.sh start [<key>=<value>]* [conf=<config_file>]*
with:
<key>=<value>
: an individual custom property<config_file>
: a configuration file that contains <key>=<value>
pairs
(conf
is a predefined property key)Properties defined first are overwritten by the properties defined
after having the same keys. The default properties are loaded
first. The conf
properties are not overwritten: the configuration
files are loaded in the same order as their apparition in the command
line.
Default configuration properties can be unset by giving them an
empty value (<key>=
)
To display the actual configuration properties having non empty values:
lepton.sh info [<key>=<value>]* [conf=<config_file>]*
Some of the LEPTON configuration properties are related to the nodes (simulated or emulated): mobility pattern, graphical representation,... If all nodes have the same configuration, their properties are defined in the same ways as all other LEPTON properties. It is possible to define nodes having different configuration properties by associating different configuration profiles to each node or group of nodes.
To do so, a profile file is used to define the specific properties
related to each node profile (see above the format of a profile
file). This profile file is designed by the nodes_profiles
property in the LEPTON configuration (its default value is empty).
There are two ways to define which nodes participate in a LEPTON execution:
by setting the nodes
property, if the nodes mobility is defined
by the walk
or manual
properties
by using an input DGS file that contains events related to the creation of the nodes, and also their mobility and removal.
In both cases, profiles may be associated to the nodes when they are created:
by setting the nodes
property: if all nodes have the same
configuration, the nodes
property value is an integer
representing the total number of nodes. To define groups of nodes
having different profiles (and thus different configurations), the
value of the nodes
property is a ,
separated list of
prefix:nb
giving the number of nodes for each profile prefix. For
example, nodes=RV:20,FP:30
defines 20 nodes having the road_vehicle
profile
(prefix: RV
) and 30 nodes having the fast_pedestrian
profile (prefix: FP
).
by using an input DGS file: at each event representing a node
creation (an
event), a profile name can be associated to the
node: an <node_id> profile=<profile_name>
Another way to add nodes to a LEPTON execution is to use real nodes, connected through the LEPTON hub. For such nodes, a profile should be associated to a node if this node is given a name starting with the value of the prefix property of the profile.