• No se han encontrado resultados

Música y poesía en Dichterliebe

In document Palabra y Música (página 176-189)

4 Ausente presente

4. Música y poesía en Dichterliebe

In this work [58], we extend the idea of DRFH and develop the distributed dominant

resource fairness (DDRF) algorithm, which is a decentralized solution based on task forwarding. In DDRF, resource agents (robots) communicate with each other to acquire specific global information, including the total allocations of resource requesters, the total

resource capacity in the multi-robot system, and the contact information for other resource agents. Each resource agent has a set of Primary Resource Requesters that share the resources on that resource agent. A resource requester can be a primary resource requester

for no more than one single resource agent. However, different tasks of a resource

requester can be executed by different resource agents. In addition, a resource agent keeps a list of known resource requesters whose resource allocations it knows. We define a fitness function to match the task demands with the resource capacity of a resource agent.

The fitness function is a heuristic for task placement that maximizes the resource utilization of resource requesters. During the resource allocation, resource agents try to allocate resources to their primary resource requesters if they observe that their primary

resource requesters have the lowest dominant resource share among the known resource requesters. If a resource agent notices that the fitness value of a received task is smaller than a pre-defined threshold, the resource agent forwards that task to its neighboring

resource agents using direct communication.

When a resource requester enters a multi-robot system, it contacts one of these resource agents and becomes a primary resource requester of that resource agent. In our

simulations, all resource requesters enter the multi-robot system during initialization and contact random resource agents. Therefore, a resource agent starts with a subset of

requesters as its primary resource requesters. A resource agent can also communicate with

some fixed neighboring resource agents (friends), and it shares the values of lowest global dominant resource shares among the resource agent’s known resource requesters with them. If a resource agent observes that any global dominant resource share of any of its

primary resource requesters is equal to or lower than the lowest value shared by all its neighboring resource agents, the resource agent will try to allocate the resource demands of a task for that primary resource requester. First, the resource agent checks whether it

exceeds a specific threshold defined by the resource agent. If the task does not pass the

check, the resource agent forwards the task to a random neighbor and removes the resource requester from its list of primary resource requesters. When another resource agent receives the forwarded task, it must decide whether to accept the task or forward it

again. If the task is forwarded more times than a pre-defined limit, a random resource agent or a resource agent that has the highest fitness value for that task along the

forwarding path will accept the task placement. After a resource agent accepts a task, the

resource requester who submitted that task becomes a primary resource requester of the accepting resource agent.

Algorithm 8 shows how a resource agent determines resource allocation.

Resource M anagement always tries to allocate resources for a task belonging to one of

its primary resource requesters. Here, r∗ represents the dominant resource and P Up

represents the list of primary resource requesters of p. Because a resource requester can

hold the primary position for only one resource agent, no other resource agent can initiate another attempt to allocate resources to that resource requester before one of that resource requester’s tasks is successfully placed. Consequently, all the resource agents wait for the

tasks of resource requesters with the lowest dominant resource share to be placed before attempting to allocate resources to other resource requesters.

To preserve fairness, our algorithm matches tasks to resource agents for better

resource utilization. Intuitively, we want to match the task demand vector for resources with those of the resource agents’ available resources. Assigning tasks to robots with which they are well matched will incur less fragmentation and ensure less waste of

tasks can be executed. Therefore, we use cosine similarity as the heuristic to search for an

optimal solution of equation 6.1. Assuming that the available resources on a resource agent p are Available(p, r) = cpr −

P

i∈UAip,r, we define the fitness function of a

resource agent p and the tasks from a resource requester u as follows:

F itness(p, u) = P r∈RDu,rAvailable(p, r) pP r∈R(Available(p, r))2 pP r∈R(Du,r)2 (6.2)

Upon receiving a message requesting resources for a forwarded task, the resource agent runs the first-fit algorithm if a task has been forwarded fewer than step limit times. That is, a resource agent tries to allocate resources for the task when the fitness value is

above a threshold defined by the resource agent and the resource agent’s available resources meet the task demands. If the allocation is successful, the resource agent adds the resource requester to its list of primary resource requesters. Otherwise, it forwards the

task to its friends. However, when the number of times the task has been forwarded exceeds the step limit, the resource agent runs a best-fit algorithm that attempts to assign the task to the resource agent with the highest fitness value along the forwarding path.

Additionally, whenever a resource agent receives a task, the resource agent adds the information of the submitting resource requester to its list of known resource requesters.

In document Palabra y Música (página 176-189)