pydcop orchestrator¶
pydcop orchestrator
runs an orchestrator.
Synopsis¶
pydcop orchestrator --algo <algo> [--algo_params <params>]
--distribution <distribution>
[--address <ip_addr>] [--port <port>]
[--uiport <uiport>]
[--collect_on <collect_mode>] [--period <p>]
[--run_metrics <file>]
[--end_metrics <file>]
<dcop_files>
Description¶
Runs an orchestrator, which waits for agents, deploys on them the computations
required to solve the DCOP with the requested algorithm and collects
selected values from agents. Agents must be run separately using the
agent
command (see. pydcop agent).
The orchestrator
command support the global --timeout
argument and can
also be stopped using CTRL+C
.
When the orchestrator stops, it request all agents to stop and displays the current DCOP solution (with associated cost) in yaml.
See also
Commands: pydcop agent, pydcop solve
Tutorials: Analysing results and Deploying on several machines
Output¶
This commands outputs the end results of the solve process. A detailed description of this output is described in the Analysing results tutorial.
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. If not given,oneagent
is used.--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.
--end_metrics <file>
End metrics (i.e. when the solve process stops) will be appended to this file (in csv).
--address <ip_address>
Optional IP address the orchestrator will listen on. If not given we try to use the primary IP address.
--port <port>
Optional port the orchestrator will listen on. If not given we try to use port 9000.
--uiport <port>
Optional port the orchestrator’s ui-server (only needed when using the GUI). If not given no ui-server is started.
<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
Running an orchestrator for 5 seconds (on default IP and port),
to solve a graph coloring DCOP with maxsum
.
Computations are distributed
using the adhoc
algorithm:
pydcop --timeout 5 orchestrator -a maxsum -d adhoc graph_coloring.yaml
Running an orchestrator that collects metrics every 0.2 second and run the MGM algorithm on agents for 20 cycles:
pydcop -v 3 orchestrator --algo mgm --algo_param stop_cycle:20 \
--collect_on period --period 0.2 \
--run_metrics ./orch_metrics_period.csv \
--address 192.168.1.2 --port 10000 \
graph_coloring_3agts.yaml