pydcop.distribution.ilp_compref
Distribution optimizing for communication and agents hosting costs
for AAMAS 2018
We use an interger linear program to find and optimal distribution of computation over the agents. The objective is a weighted sum of the communication costs and the hosting costs.
Communication cost depends on the message size between two computations in the computation graph and on a route cost factor that characterize the cost of sending a message over a route between two agents.
Note: this distribution methods honors the agent’s capacity constraints but does no use the distribution hints (if some are given, they are just ignored).
- capacity_fonc(agents_def: Iterable[AgentDef]) Callable[[str], float]
- Parameters:
agents_def –
- Returns:
a function that gives the agent’s capacity given it’s name
- distribute(computation_graph: ComputationGraph, agentsdef: Iterable[AgentDef], hints: DistributionHints | None = None, computation_memory=None, communication_load=None, timeout=None) Distribution
Generate a distribution for the given computation graph.
- Parameters:
computation_graph – a ComputationGraph
agentsdef – agents’ definitions
hints – a DistributionHints
computation_memory – a function that takes a computation node and its
Link node as arguments and return the memory footprint for this node :param communication_load: a function that takes a Link as an argument
and return the communication cost of this edge
- footprint_fonc(cg: ComputationGraph, computation_memory: Callable[[ComputationNode, Iterable[Link]], float]) Callable[[str], float]
- Parameters:
cg – the computation graph
computation_memory – a function giving a memory footprint from a
computation node and a set of link in the computation graph :return: a function that returns the memory footprint of a computation given it’s name