pydcop run

Running a (dynamic) DCOP

Synopsis

pydcop run --algo <algo> [--algo_params <params>]
             [--distribution <distribution>]
             [--replication_method <replication method>]
             [--ktarget <resiliency_level>]
             [--mode <mode>]
             [--collect_on <collect_mode>]
             [--period <p>]
             [--run_metrics <file>]
             [--end_metrics <file>]
             --scenario <scenario_file>
             <dcop_files>

Description

The run command run a dcop, it is generally used for dynamic dcop where various events can occur during the life of the system.

Most options are basically the same than the options of the pydcop solve command. The main differences are the optional options for resilent DCOP : --ktarget and --replication method and the scenario that contains events. See Scenario file format for information on the scenario file format.

When using the run command, you should use the global --timeout option. Note that the --timeout is used as a timeout for the solve process only. Bootstrapping the system and gathering metrics take additional time, which is not accounted for in the timeout. This means that the run command may take more time to return than the time set with the global --timeout option.

You can always stop the process manually with CTRL+C. Here again, the system may take a few seconds to stop.

See also

Commands: pydcop solve, pydcop distribute

Tutorials: Analysing results and Dynamic DCOPs

Options

--algo <dcop_algorithm> / -a <dcop_algorithm>

Name of the dcop algorithm, e.g. ‘maxsum’, ‘dpop’, ‘dsa’, etc.

--algo_params <params> / -p <params>

Optional parameter for the DCOP algorithm, given as string name:value. This option may be used multiple times to set several parameters. Available parameters depend on the algorithm, check algorithms documentation.

--distribution <distribution> / -d <distribution>

Either a distribution algorithm (oneagent, adhoc, ilp_fgdp, etc.) or the path to a yaml file containing the distribution (see yaml format). If not given, oneagent is used.

--mode <mode> / -m

Indicated if agents must be run as threads (default) or processes. either thread or process

--collect_on <collect_mode> / -c

Metric collection mode, one of value_change, cycle_change, period. See Analysing results for details.

--period <p>

When using --collect_on period, the period in second for metrics collection. See Analysing results for details.

--run_metrics <file>

File to store store metrics. See Analysing results for details.

--replication_method <replication method>

Optional replication method. Defaults to replication method, which is the only replication method currently implemented in pyDCOP.

--ktarget <resiliency_level>

Optional replication level (aka number of replicas for each computation). Defaults to 3

--scenario <scenario_files>

Path to the files containing the scenario. yaml definition for the format.

<dcop_files>

One or several paths to the files containing the dcop. If several paths are given, their content is concatenated as used a the yaml definition for the DCOP.

Examples

Runnig the DCOP from the file dcop.yaml, using the initial ditribution from dist.yaml

pydcop -v 2 run --algo dsa  \
                --distribution dist.yaml \
                --scenario scenario.yaml \
                --collect_on period \
                --period 1 \
                --run_metrics run_dcop.csv \
                dcop.yaml