pydcop.distribution
A distribution method is used to decide which agent hosts each computation.
Distribution methods are implemented in pydcop.distribution
.
object.py
defines objects that are used by all distribution methods
(Distribution` and `DistributionHints
).
A distribution method computes the allocation
of a set computations to a set of agents.
See DCOP computation distribution for more details on the distribution concept.
pyDCOP currently provides the following distribution methods :
- pydcop.distribution.oneagent
- pydcop.distribution.adhoc
- pydcop.distribution.gh_cgdp
- pydcop.distribution.gh_secp_cgdp
- pydcop.distribution.gh_secp_fgdp
- pydcop.distribution.heur_comhost
- pydcop.distribution.ilp_compref
- pydcop.distribution.ilp_compref_fg
- pydcop.distribution.ilp_fgdp
- pydcop.distribution.oilp_cgdp
- pydcop.distribution.oilp_secp_cgdp
- pydcop.distribution.oilp_secp_fgdp
Implementing a distribution method
To implement a new distribution method, one must:
create a new module in
pydcop.distribution
, named after the distribution methoddefine the following methods in this file:
distribute
, which returns a Distribution object
distribution_cost
, which return the cost of a distribution. If your distribution algorithm does define a notion of cost, you can simply return 0 (like theoneagent
distribution)additionally, for dynamic distribution, you can also provide these methods:
distribute_remove
distribute_add