Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25 2012, Curitiba, Parana, Brazil

28
Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25 2012, Curitiba, Parana, Brazil Jean L. Pierobom Myriam R. Delgado, PhD Celso A. A. Kaestner, PhD PARTICLE SWARM PARTICLE SWARM OPTIMIZATION APPLIED OPTIMIZATION APPLIED TO THE DINAMYC TO THE DINAMYC ALLOCATION PROBLEM ALLOCATION PROBLEM

description

Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25 2012, Curitiba, Parana, Brazil. PARTICLE SWARM OPTIMIZATION APPLIED TO THE DINAMYC ALLOCATION PROBLEM. Jean L. Pierobom Myriam R. Delgado, PhD Celso A. A. Kaestner, PhD. Introduction. - PowerPoint PPT Presentation

Transcript of Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25 2012, Curitiba, Parana, Brazil

Page 1: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25 2012, Curitiba, Parana, Brazil

Jean L. PierobomMyriam R. Delgado, PhDCelso A. A. Kaestner, PhD

PARTICLE SWARM PARTICLE SWARM OPTIMIZATION APPLIED OPTIMIZATION APPLIED

TO THE DINAMYC TO THE DINAMYC ALLOCATION PROBLEMALLOCATION PROBLEM

Page 2: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

2

Introduction

o This paper proposes a modification of the Particle Swarm Optimization (PSO) algorithm to solve a real-world application of the Dynamic Task Assignment Problem (DTAP).

o In a previous work, non-dynamic instances of Task Assignment Problem (TAP) were solved using the Particle Swarm Optimization with Permutations (PSO-P).

o In this paper, the algorithm is improved by adding some methods that enable it to deal with dynamic fitness landscapes. The new approach is called Dynamic Particle Swarm Optimization with Permutations (DPSO-P).

Page 3: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

3

Problem description

o The problem considered in this paper is the Cab-Customer Allocation Problem (CCAP).

o CCAP can be categorized as a Dynamic TAP.

o CREIO QUE UMA DEFINIÇÃO RÁPIDA DO TAP SERIA INTERESSANTE

o The problem consists in allocating N cabs (service offer agents) to M customers (demand service agents) in a way that the total distance traveled by the cabs to get the customers is minimal.

Page 4: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

4

A Problem instance

Page 5: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

5

Problem formulation

o Let A be the allocation function that maps a set V of service offer agents (taxis) to a set P of demand service agents (customers):

where A(i) = j if the offer agent i is allocated to demand agent j.

Page 6: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

6

Problem formulation

o Let C(A) be the cost function of a solution A: where distance(i; j) is the geographic distance between two points in the city; in this case, the distance between the agents i and j, and j = A(i):

o In the previous work, we use the Euclidean distance between geographical locations. In this paper we employ the minimal paths over the Open Street Map using the Dijkstra algorithm.

o The problem is to find the optimal solution with minimal cost in the set , i.e.:

Page 7: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

7

Real scenario changes(1 of 4)

o The decision variables of CCAP/TAP are subject to changes during the optimization.

(a) a new customer comes (the customer is “waiting”);

Page 8: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

8

Real scenario changes(2 of 4)

(b) the cab positions change because they are moving to the allocated customer;

Page 9: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

9

Real scenario changes(3 of 4)

(c) when the cab arrives to the customer position a pair (cab, customer) is created, and these elements must be eliminated from the optimization scenario (the cab is “occupied”);

Page 10: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

10

Real scenario changes(4 of 4)

(d) when the pair (cab, customer) arrives to its destination the service ends, and a new service offer agent appears (the cab becomes “free”).

Page 11: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

11

The proposed approach

o In this paper, the allocation function A for the Dynamic TAP considers |V| = |P| = N.

o Two FIFO queues are then used; one for service offer agents (O) and other for service demand agents (D). This approach minimizes the agent waiting time as it avoids undesirable conditions.

o As the offer agents can meet only one demand agent at a time, and a demand agent must be served by one (and only one) offer agent, N is calculated after each detected change, as follows:

where and are the total of elements at episode in queues and , respectively.

Page 12: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

12

DPSO-P principlesParticle encoding

o The DPSO-P encodes particles as position permutations.

o The particle’s position is represented by a vector of integer numbers whose indexes identify the service offer agents and whose values represent the demand agents.

o In the example below, cab 1 would be allocated to customer 4, cab 2 would be allocated to customer 3, and so on.

Page 13: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

13

DPSO-P principlesParticle velocity

o The particle velocity is normalized into [0, 1], with each element indicating the probability of a swap operation. The particle movement is illustrated below:

Page 14: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

14

DPSO-P principlesInertia adjustment

o In the DPSO-P algorithm, the inertia suffers a decay given by:

where T is the average number of iterations between detected changes.

At the first step of simulation, T is fixed according to the problem size, because there are no changes yet; after this, T is adjusted at each occurred change. The inertia decay thus occurs along time windows.

Page 15: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

15

Change detection

o A random monitored particle solution is created to support the change detection;

o The method used to detect changes is that suggested in

Carlisle and Dozier (2000), it chooses a random particle and checks if its fitness has changed even if the particle position has not changed.

o Experiments have shown that this method is able to detect any change to the addressed problem, including those considered smooth.

Page 16: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

16

Response to changes

o The proposed algorithm tries to detect changes and apply the approaches A and B to react to them. Additionally, the approach C is applied to maintain diversity in the swarm.

– Approach A: restart to random positions a portion of the swarm, whenever a change is detected (Eberhart and Shi, 2000) (Hu and Eberhart, 2002). The particles chosen to be reset are those with the worst fitness value;

– Approach B: reset pbest memory of all particles in the swarm, whenever a change is detected (Eberhart and Shi, 2000);

– Approach C: uses a perturbation operator on particles position (Esquivel and Coello, 2004). At each iteration there is a chance of applying randomly swap operations.

Page 17: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

17

ExperimentsTest set

o Experiments are conducted to simulate the CCAP/TAP dynamics;

o The simulation process considers a series of episode transitions;

o Each instance is generated with changes being produced from initial to final episodes.

Page 18: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

18

ExperimentsRunning information

o The program was coded in Java;

o Employs 100 particles;

o Run up along transitions of all successor episodes for each instance considered;

o The inertia adjustment from 0.9 to 0.4 (Eberhart and Shi, 2000);

o The values of c1 = c2 = 1.49445 (Eberhart and Shi, 2000);

o AQUI ESTÁ CONFUSO ESTE c1, c2 com C1, C2 e C3

Page 19: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

19

ExperimentsComparison approach – robust PSO

o For small instances (N = 10), the optimal solution for each episode is identified by the exhaustive search described in [11].

o For other cases (N = 100), used a robust PSO to identify a reference solution for each tested instance.

– In this work, the robust PSO runs over 10,000 iterations and has swarm composed of 10,000 particles, allowing a better exploitation of the search space of the problem.

Page 20: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

20

ExperimentsPerformance measures

o Fitness error (Blackwell, 2007):

o Average accuracy (Weicker, 2002):

o Average stability (Weicker, 2002):

Page 21: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

21

Optimal solution

Page 22: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

22

Obtained results

o The algorithm was executed only once for each tested approach;

o However, the algorithm runs for a considerable number of episodes and the performance indicators represent averages of values obtained at the end of each time window.

Page 23: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

23

Obtained results

Page 24: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

24

Obtained results

Page 25: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

25

Conclusions

o The proposed DPSO-P algorithm used permutations to encode particles and adopted some approaches to respond to changes, namely:

– (A) randomizes a portion of the swarm whenever any change is detected;

– (B) resets all particles memory;

– (C) applies a perturbation operator with a certain probability.

o These approaches were also combined, to improve the results.

Page 26: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

26

Conclusions

o The experiments show that, in the case of smaller instances, diversifying a portion (10%) of the swarm can be efficient.

o In the case of larger instances, this approach is also efficient, but it can be improved using a perturbation operator on particle positions, to maintain diversity in the swarm;

o The obtained results allow us to conclude that the combination of traditional methods enables the PSO to track the optimal solution after the occurrence of changes in decision variables of the problem;

o The information about the problem size and change scale can be used to determine the appropriate approach to be used.

Page 27: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

27

Future works

o The approach can be extended to consider |V| ≠ |P| (different number of cabs and customer, which is now treated with simple queues). This extension can be treated internally by the model - using non square matrices - or adding a filter based on queues priority.

o Other similar applications can be handled in the same way, for example:

– optimization times of busses and subways;

– allocation of police vehicles for the care of occurrences;

– allocation of technical assistance for technical support.

Page 28: Brazilian Symposium on Neural Networks (SBRN’2012), October 20-25  2012, Curitiba, Parana, Brazil

Brazilian Symposium on Neural Networks (SBRN’2012), October 20 to 25, 2012, Curitiba, Parana, Brazil

Jean L. PierobomProf.ª Dra. Myriam R. DelgadoProf. Dr. Celso A. A. Kaestner

PARTICLE SWARM PARTICLE SWARM OPTIMIZATION APPLIED OPTIMIZATION APPLIED

TO THE DINAMYC TO THE DINAMYC ALLOCATION PROBLEMALLOCATION PROBLEM