LEPTON   Documentation Download Videos About

How to define the LEPTON configuration

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

Understanding configuration properties, files and profiles

Configuration properties

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:

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.

Configuration files

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;}"

Configuration profiles

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.

How to set LEPTON configuration properties

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:

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>]*

How to define nodes with different configuration properties

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.

Defining the nodes profiles

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).

Associating profiles to simulated or emulated nodes

There are two ways to define which nodes participate in a LEPTON execution:

In both cases, profiles may be associated to the nodes when they are created:

Associating profiles to real nodes

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.