117
p-Median Cluster Analysis Based on General-Purpose Solvers Boris Goldengorin, Dmitry Krushinsky University of Groningen, The Netherlands Joint work with Bader F. Albdaiwi and Viktor Kuzmenko

p-Median Cluster Analysis Based on General-Purpose Solvers (1)

  • Upload
    ssa-kpi

  • View
    1.018

  • Download
    1

Embed Size (px)

DESCRIPTION

AACIMP 2010 Summer School lecture by Boris Goldengorin. "Applied Mathematics" stream. "The p-Median Problem and Its Applications" course. Part 1. More info at http://summerschool.ssa.org.ua

Citation preview

Page 1: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

p-Median Cluster Analysis Based

on General-Purpose Solvers

Boris Goldengorin, Dmitry Krushinsky

University of Groningen, The Netherlands

Joint work with

Bader F. Albdaiwi and Viktor Kuzmenko

Page 2: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

22

Outline of the talk

• Two Main PMP formulations

• Pseudo-Boolean polynomial

• Mixed Boolean pseudo-Boolean Model

(MBpBM)

• Experimental results

• Concluding Remarks

• Directions for Future Research

Page 3: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

33

The p-Median Problem (PMP)

I = {1,…,m} – a set of m facilities (location points),

J = {1,…,n} – a set of n users (clients, customers or demand points)

C = [cij] – a m×n matrix with distances (measures of similarities or

dissimilarities) travelled (costs incurred)

nmnjn

iniji

nj

ccc

ccc

ccc

.........

..................

.........

..................

.........

1

1

1111

clients

location p

oin

ts

- location point (cluster center)

- Client (cluster points)

Costs Matrix

Page 4: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

44

The PMP: combinatorial formulation

The p-Median Problem (PMP) consists of determining p locations

(the median points) such that 1 ≤ p ≤ m and the sum of distances (or

transportation costs) over all clients is minimal.

- location point

- client

- opened facility

p = 3

1 mp

co

mp

lex

ity

)!(!

!

pmp

mC p

m

Page 5: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

55

The PMP: combinatorial formulation

JjpI, |S|S

ijSi

C cSf min min)(

I – set of locations

J – set of clients

cij – costs for serving j-th client from i-th location

p – number of facilities to be opened

Page 6: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

66

The PMP: Applications

• Facilty location

• Cluster analysis

• Quantitative psychology

• Telecommunications industry

• Sales force territories design

• Political and administrative districting

• Optimal diversity management

• Cell formation in group technology

• Vehicle routing

• Topological design of computer and communication networks

Page 8: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

8

A comparative study of similarity measures for manufacturing cell

formationS. Oliveira a, J.F.F. Ribeiro, S.C. Seok

Journal of Manufacturing Systems 27 (2008) 19--25

However, the similarity measure uses only

limited information between machines and parts:

either the number of parts producedby the pair

of machines or the number of machines

producing the pair of parts. Various similarity

measures (coefficients) have been introduced to

measure the similarities between machines and

parts for manufacturing cells problems.

Page 9: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

9

The PMP: Applications• Facility location

- consumer (client)

- possible location of supplier (server)

- supplier (server), e.g. supermarket, bakery, laundry, etc.

Page 10: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

10

The PMP: Applications• Facility location

- consumer (client)

- possible location of supplier (server)

- supplier (server), e.g. supermarket, bakery, laundry, etc.

Page 11: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

11

The PMP: Applications• Cluster analysis

cluster

1

cluster

2

cluster

3cluster

4

―best‖ representatives – p-medians

Input:

- finite set of objects

- measure of similarity

Output

Page 12: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

12

The PMP: Applications

• Quantitative psychology

patients symptoms

(behavioural patterns) type 1

mentality

features

type 2

mentality

features

―leaders‖ or typical representatives

Page 13: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

13

The PMP: Applications

• Telecommunications industry

Page 14: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

14

The PMP: Applications

• Sales force territories design

possible

outlets for

some

product

...

...

3

2

1

...321

m

n

customers

(groups of customers)

entries of the costs

matrix account for

customers’ attitudes

and spatial distance

Goal: select p best outlets for promoting the product

Page 15: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

15

The PMP: Applications

• Political and administrative districting

districts,

cities,

regions...

...

3

2

1

...321

m

n

districts,

cities,

regions

degree of relationship:

political, cultural,

infrastructural

connectedness

Page 16: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

16

The PMP: Applications• Optimal diversity management

– given a variety of products (each having some

demand, possibly zero)

– select p products such that:

• every product with a nonzero demand can be

replaced by one of the p selected products

• replacement overcosts are minimized

Page 17: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

17

The PMP: Applications• Optimal diversity management

– Example: wiring designs, p=3configurations

with zero

demand

Page 18: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

18

The PMP: Applications• Cell formation in group technology

functional layout cellular layout

- machines

- products routes

cell 1 cell 2

see also video at

http://www.youtube.com/watch?v=q_m0_bVAJbA

drilling

thermal processing

Page 19: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

19

The PMP: Applications

• Vehicle routing

depot- clients

/ storage

- vehicle

routes

Page 20: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

20

The PMP: Applications

• Topological design of computer and

communication networks

Page 21: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

21

The PMP: Applications

• Topological design of computer and

communication networks

Page 22: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

22

The PMP: Applications

• Topological design of computer and

communication networks

Page 23: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

23

Publications, more than 500

Elloumi, 2010;

Brusco and K¨ohn, 2008;

Belenky, 2008;

Church, 2003; 2008;

Avella et al, 2007;

Beltran et al, 2006;

Reese, 2006 (Overview, NETWORKS)

ReVelle and Swain, 1970;

Senne et al, 2005.

Page 24: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2424

The PMP: Boolean Linear Programming

Formulation (ReVelle and Swain, 1970)

s.t.

- each client is served by exactly one facility

- p opened facilities

- prevents clients from being served

by closed facilities

min1 1

ij

m

i

n

j

ij xc

pym

i

i

1

Jjxm

i

ij , 11

JjIiyx iij ,

}1,0{, iij yx

xij = 1, if j-th client is served by i-th facility; xij = 0, otherwise

Page 25: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2525

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

4 2 1 :client1 31

21

11 DDD

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

Page 26: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2626

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

Page 27: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2727

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

closed are distance within sites all if ,1

opened is distance within site oneleast at if ,0kj

kjk

jD

Dz

Decision variables

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

111121 )(...)(min jjj K

j

K

j

K

jjjjjijSi

zDDzDDDc

S - set of opened plants

Page 28: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2828for each client i - sorted distances

- iff all the sites within are

closed

s.t.

The PMP: alternative formulation, Cornuejols et al. 1980

min)(),(

1

1

1

11n

j

K

k

ki

ki

kii

i

zDDDf yz

- p opened facilitiespy

m

i

i

1

,1 ,...,1,...,1

:

niKk

Ddj

jki

ikiij

yz

niz iKi ,...,1 ,0

niKk

ki

iz ,...,1

,...,1 ,0

mjy j ,...,1 },1,0{

- either at least one facility is open within

or

kiD

1kiz

- for every client it is an opened facility in some

neighbourhood

1kiz

kiD

iKii DD ,...,1

Page 29: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

2929

The PMP: alternative formulation, Cornuejols et al. 1980

Example, p=2

(Elloumi,2010)

28134

33321

53212

43561

C

Objective:

352515143323133222122111

352515

14

332313

322212

2111

52328

)45()34()23(2 :client5

)38(3 :client4

)35()23()12(1 :client3

)36()23()12(1 :client2

)24()12(1 :client1

zzzzzzzzzzzz

zzz

z

zzz

zzz

zz

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

+ +

+ +

13 coefficients

only distinct (in a

column)

distances are

meaningful

Page 30: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3030

The PMP: alternative formulation, Cornuejols et al. 1980

Example

28134

33321

53212

43561

C

Objective:

352515143323

133222122111

52

328

zzzzzz

zzzzzz

Constraints:

jKkjjkz

zz

zzz

yyyyz

yyyyz

yyyyz

yyyz

yyyz

yyyz

yyyyz

yyz

yyyyz

yyz

yyz

yyyz

yz

yyyz

yz

yz

yyz

pyyyy

,...,1 ;5,...,1

4524

434231

432145

432143

432142

43135

43233

43232

432131

4325

432124

4223

3222

32121

415

32114

413

212

3111

4321

0

0,0

0,0,0

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

4,...,1}1,0{ iiy

13 coefficients, 23 linear constr., 12 non-negativity constr., 4 Boolean

Page 31: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

31

.eliminated becan variabledefinesthat

1 constraint and )1(by dsubstitute becan Variable solution. feasible

anyfor holds 1 then }{singleton a is if ,client any For :R1 Rule

1

11

11

j

ijij

ijij

z

yzyz

yzyVj

The p-Median Problem:a tighter formulation, Elloumi 2010

6 3 2 1 :2client 32

32

22

12 DDDD

28134

33321

53212

43561

C

)1(

open is

2facility

)0(

open is within

facility some

212

12

yz

D

212 1 yz

}:{ : within facilities ofset Let k

jijk

jk

jk

j DciVDV

Informally:

if for client j some neighbourhood

k contains only one facility i then

there is a simple relation between

corresponding variables ikj yz 1

Page 32: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

32

.eliminated becan variabledefines

that constraint and by replaced becan Variable

solution. feasibleany for holds then any for If :R2 Rule1

k'j'

Di:c

k'-j'j

k'j'

kj

k'j'

k'j'

kj

k'i'

kj

z

zyzzz

zzVk', Vj',k,j,

k'j'ij'

The p-Median Problem:a tighter formulation, Elloumi 2010

28134

33321

53212

43561

C

{1,2,3,4} {1,2,3}

8 3 :4client

}4321{ }321{ }31{

4 2 1 :1client

24

14

24

14

31

21

11

31

21

11

VV

DD

,,,V,,V,V

DDD

14

21 zz

Informally:

if two clients have equal

neighbourhoods then the

corresponding z-variables are

equivalent and in the objective

function terms containing them

can be added.

Page 33: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

33

. constraint eliminatecan

we,0 as Finally, .such that facilities of sets the toequal is

such that facilities ofset thecase, in this Further, .that

deduce toapplied becan R2 Rule then any for If :R3 Rule

1

11

11

j'K

j'ij'

j'j'

j'jj'

jj'j

j'j

Di:c

-Kj'i

K

j'

K

j'

K

j

K

j'ij'

K

jij

K

j'

K

j

K

j'

K

j

zyz

zzDci

Dcizz

Vj', Vj,

The p-Median Problem:a tighter formulation, Elloumi 2010

}432{1, }432{ {2,4} {4}

5 3 2 1 :3client

}432{1, }432{ }32{ }2{

6 3 2 1 :2client

33

33

23

13

33

33

23

13

32

32

22

12

32

32

22

12

,,V,,VVV

DDDD

,,V,,V,VV

DDDD

331

43 zyz

after applying Rule R2 becomes

redundant and can be eliminated

Page 34: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3434

The PMP: a tighter formulation, Elloumi 2010

A possible definition of variables : kjz

j

Dci

ikj Kknjyz

kjij

,...,1 ;,...,1 ,)1(

:

Or recursively:

j

Dci

ikj

kj

Dci

ij

,...,Kknjyzz

njyz

kjij

jij

2 ;,...,1 ,)1(

;,...,1 ,)1(

:

1

:

1

1

11221

3111

32121

3111 1 toequivalent is

1

1 e.g.

zyz

yyz

yyyz

yyz

Thus:

Page 35: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3535for each client j - sorted distances

s.t.

The PMP: a tighter formulation, Elloumi 2010

min)(),(

1

1

1

11n

j

K

k

kj

kj

kjj

j

zDDDf yz

py

m

i

i

1

n 1,...,j ,1

:

1

kjij Dci

ij yz

njz jK

j ,...,1 ,0

nj

Kkkj

jz

,...,1

,...,1 ,0

miyi ,...,1 },1,0{jK

jj DD ,...,1

,,...,1

,...,21

:

nj

Kkkj

Dci

ikj

jkjij

zyz

,1,...,1

,...,1

:

nj

Kk

Dci

ikj

jkjij

yz

Cornuejols et al. 1980

Page 36: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3636

PMP Example with p=2 borrowed from S. Elloumi,

J Comb Optim 2010,19:69–83

28134

33321

53212

43561

C

Objective:

3525233222211142 57)1(2)1(8 zzzzzzzyy

Constraints:

22432

2322

214

11221

3111

4321

1

1

zyz

yyz

zy

zyz

yyz

pyyyy

4,...,1

352

25135

4325

4223

321

}1,0{

0

1

1

jj

ki

y

z

zy

zyz

yyz

yyz

zy

10 (13) coefficients

11 (23) linear constr.

7 (12) non-negativity

constr.

4 Boolean constr.

Page 37: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3737

The PMP: pseudo-Boolean formulation(Historical remarks)

• Hammer, 1968 for the Simple Plant Location Problem (SPLP) called

also Uncapacitated Faciltiy Location Problem. His formulation

contains both literals and their complements, but at the end of this

paper Hammer has considered an inversion of literals;

• Beresnev, 1971 for the SPLP applied to the so called standardi-

zation (unification) problem. He has changed the definition of

decision variables, namely for an opened site a Boolean variable is

equal to 0, and for a closed site a Boolean variable is equal to 1.

This is exactly what is done by Cornuejols et al. 1980 and later on

by Elloumi 2010 but as we will show by means of computational

experiments with a larger number of decision variables and

constraints. Beresnev’s formulation contains complements only for

linear terms and all nonlinear terms are without complements.

Page 38: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3838

The PMP and SPLP differ in the following details

• SPLP involves fixed cost for location a facility at the given site, while

the PMP does not;

• Unlike the PMP, SPLP does not have a constraint on the number of

opened facilities;

• Typical SPLP formulations separate the set of potential facilities

(sites location, cluster centers) from the set of demand points

(clients);

• In the PMP the sets of sites location and demand points are

identical, i.e. I=J;

• The SPLP with a constraint on the number of opened facilities is

called either Capacitated SPLP or Generalized PMP.

Page 39: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

3939

28134

33321

53212

43561

C

The PMP: pseudo-Boolean formulationNumerical Example: m=5, n=4, p=2

28134

33321

53212

43561

C

If two locations are opened at sites 1 and 3, i.e S ={1,3}

1133311

}:min{)(

5

1j

ijC SicSf

5 clients

4 locations

2 facilities

4

3

2

1

54321

Page 40: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4040

PMP: pseudo-Boolean formulation

1C

4

1

2

1

5

4

3

2

3213111

min

min

min

min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

c

c

yyyyyyc

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

28134

33321

53212

43561

C

4

2

3

1

2

1

0

1

1C 1 1C

Page 41: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4141

5

4

3

2

3213111

min

min

min

min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

c

c

yyyyyyc

4

2

3

1

2

1

0

1

PMP: pseudo-Boolean formulation

1C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

4

1

2

1

28134

33321

53212

43561

C

1C 1 1C

equal distances lead to

terms with zero coefficients

that can be dropped

i.e. only distinct distances

are meaningful (like in

Cornuejols’ and Elloumi’s

model)4

1

2

1

1C

Page 42: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4242

5

4

3

2

3213111

min

min

min

min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

c

c

yyyyyyc

PMP: pseudo-Boolean formulation

1C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

4

1

2

1

28134

33321

53212

43561

C

4

2

3

1

2

1

0

1

1C 1 1C

Page 43: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4343

5

4

3

2

3213111

min

min

min

min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

c

c

yyyyyyc

2

1

0

1

4

2

3

1

PMP: pseudo-Boolean formulation

1C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

4

1

2

1

1C 1 1C

28134

33321

53212

43561

C

Page 44: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4444

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation

2C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

5

4

3

4323222

3213111

min

min

min

3111min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

c

yyyyyyc

yyyyyyc

3

2

1

6

2C 2 2C

1

4

3

2

3

1

1

1

Page 45: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4545

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation

3C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

1

3

2

5

3C 3 3C

1

3

2

4

2

1

1

1

5

4

4324243

4323222

3213111

min

min

2111min

3111min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

yyyyyyc

yyyyyyc

yyyyyyc

Page 46: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4646

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation

4C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

8

3

3

3

4C 4 4C

4

3

2

1

5

0

0

3

5

3212114

4324243

4323222

3213111

min

5003min

2111min

3111min

2101min

iSi

iSi

iSi

iSi

iSi

c

yyyyyyc

yyyyyyc

yyyyyyc

yyyyyyc

Page 47: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4747

PMP: pseudo-Boolean formulation

5C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

2

3

5

4

5C 5 5C

28134

33321

53212

43561

C

2

1

3

4

1

1

1

2

4314345

3212114

4324243

4323222

3213111

1112min

5003min

2111min

3111min

2101min

yyyyyyc

yyyyyyc

yyyyyyc

yyyyyyc

yyyyyyc

iSi

iSi

iSi

iSi

iSi

Page 48: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4848

PMP: pseudo-Boolean formulation

5

1

min)(j

ijSi

C cB y

BC(y) can be constructed

in polynomial time

BC(y) has polynomial size

(number of terms)

4314345

3212114

4324243

4323222

3213111

1112min

5003min

2111min

3111min

2101min

yyyyyyc

yyyyyyc

yyyyyyc

yyyyyyc

yyyyyyc

iSi

iSi

iSi

iSi

iSi+

+ +

+

Page 49: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

4949

431434

321211

432424

432322

321311

1112

5003

2111

3111

2101

yyyyyy

yyyyyy

yyyyyy

yyyyyy

yyyyyy

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation

two possible

permutation

matrices24124

13342

32233

41421

1

1 2 43 5

but

a unique polynomial

=

+ +

+ +

+ +

+ +

)(yCB=

24124

12342

33231

41423

1

1 2 43 5

431434

321311

432424

432322

321313

1112

5003

2111

3111

2101

yyyyyy

yyyyyy

yyyyyy

yyyyyy

yyyyyy

Page 50: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5050

PBP: combining similar terms

=

4324313214342323142 5171111218 yyyyyyyyyyyyyyyyyyy

20 terms

17 nonzero terms

10 terms

PBP formulation allows compact representation of the problem !

In the given example 50% reduction is achieved!

431434

321211

432424

432322

321311

1112

5003

2111

3111

2101

yyyyyy

yyyyyy

yyyyyy

yyyyyy

yyyyyy+ +

+ +

This procedure is equivalent to application of Elloumi’s Rule R2

Page 51: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5151

PBP: combining similar terms

Page 52: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5252

Truncated polynomial BC,p=2 (y) (7 terms):

PBP: truncation

If p=2 each cubic term

contains at least one zero

variable

Observation:

The degree of the pseudo-Boolean

polynomial is at most m-p

Initial polynomial BC (y) (10 terms):

Truncation allows further

reduction of the problem size!

p = 2

4324313214342323142 5171111218 yyyyyyyyyyyyyyyyyyy

4342323142 1111218 yyyyyyyyyy

Page 53: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5353

PBP: truncation

p = 2

p = 3

p = 4

If p=m/2+1 then memory

needed to store the polynomial

is halved!

full polynomial

truncated

polynomialp = m/2+1

MEMORY

431434

321211

432424

432322

321311

1112

5003

2111

3111

2101

yyyyyy

yyyyyy

yyyyyy

yyyyyy

yyyyyy+ +

+ +

Page 54: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5454

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation

3C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

1

3

2

5

3C 3 3C

1

3

2

4

2

1

1

1

5

4

4324243

4323222

3213111

min

min

2111min

3111min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

yyyyyyc

yyyyyyc

yyyyyyc

Page 55: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5555

23121

33221

33211

33221

3C

28134

33321

53212

43561

C

Truncation and preprocessing

Initial matrix p-truncated matrix, p=3

Thus, truncation allows reduction of search space!

Corollary

Instances with p=p0>m/2 are easier to solve then those with

p=m-p0<m/2, even though the numbers of feasible solutions are the

same for both cases.

If i-th row contains all maximum

elements, then corresponding

location can be excluded from

consideration ( yi can be set to 0).

In truncated matrix

this is more likely

to happen

y3=1

4

3

2

1

Page 56: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

56

Pseudo-Boolean formulation:

outcomes

• Compact but nonlinear problem

• Equivalent to a nonlinear knapsack (NP-hard)

• Goal: obtain a model suitable for general-purpose MILP solvers, e.g.:– CPLEX

– XpressMP

– MOSEK

– LPSOL

– CLP

Page 57: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5757

MBpBM: linearization

4342323142 28 y y y y y y y y y y

876542 28 z z z z y y

Example of the pseudo-Boolean

polynomial:

Linear function of new variables:

438427326315

4321

, , ,

, , , ,

yyzyyzyyzyyz

yyyy

28134

33321

53212

43561

C p = 2

Compare: in Elloumi’s model variables y2 and y4 were introduced into

objective via Rule R1.

Page 58: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5858

MBpBM: constraints

l

k

kk

l

k

k ylyzyz

11

}1,0{ ,1 Simple fact:

Example:

8...5

4...1

438438

427427

326326

315315

0

}10{

1

1

1

1

kk

kk

z

,y

yyzyyz

yyzyyz

yyzyyz

yyzyyz

nonnegativity is

sufficient !

Page 59: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

5959

MBpBM: reduction

Lema:Let Ø be a pair of embedded sets of Boolean variables yi.

Then, the two following systems of inequalities are equivalent:

Obtained reduced constraints are similar to Elloumi’s constraints

derived from recursive definition of his z-variables.

Page 60: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

60

MBpBM: reduction

• set covering problem

965431 yyyyyy

431 yyy

31 yy

54 yy 96 yy

531 yyy631 yyy

931 yyy

Page 61: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

61

MBpBM: reduction

• set covering problem

965431 yyyyyy

431 yyy

31 yy

54 yy 96 yy

531 yyy631 yyy

931 yyy

NP-hard!

2965431965431 yyyyyyyyyyyy

Page 62: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6262

Example, p=2; S. Elloumi, J Comb Optim 2010,19:69–83

28134

33321

53212

43561

C

Objective:

876542 28 zzzzyy

Constraints:

438

427

326

315

4321

1

1

1

1

2

yyz

yyz

yyz

yyz

yyyy

4,...,1

8,...,5

}1,0{

0

ii

ii

y

z

7 coefficients.

5 linear constr.

4 non-negativity

constr.

4 Boolean constr.

In Elloumi’s model these figures are, correspondingly, 10 (13), 11 (23), 7(12)

and 4

Page 63: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

63

Comparison of the models

876542 28 zzzzyy

438

427

326

315

4321

1

1

1

1

2

yyz

yyz

yyz

yyz

yyyy

4,...,1

8,...,5

}1,0{

0

ii

ii

y

z

3525233222211142 57)1(2)1(8 zzzzzzzyy

352

25135

4325

4223

321

22432

2322

214

11221

3111

4321

1

1

1

1

2

zy

zyz

yyz

yyz

zy

zyz

yyz

zy

zyz

yyz

yyyy

4,...,1

3,...,1 ; 5,...,1

}1,0{

0

ii

kjkj

y

z

our MBpBM Elloumi’s NF

Page 64: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

64

MBpBM: preprocessing

• every term (product of variables) corresponds to a subspace of solutions with all these variables equal to 1

• like in Branch-and-Bound:

– compute an upper bound by some heuristic

– for each subspace define a procedure for computing a lower bound (over a subspace)

– if the constrained lower bound exceeds global upper bound then exclude the subspace from consideration

Page 65: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6565

28134

33321

53212

43561

C

PMP: pseudo-Boolean formulation implies a decomposition

of the search space into at most n(m-p) subspaces

3C

+ +

+ +

5

1

min)(j

ijSi

C cB y

Iii pmy,

CBy

y min )(

1

3

2

5

3C 3 3C

1

3

2

4

2

1

1

1

5

4

4324243

4323222

3213111

min

min

2111min

3111min

2101min

iSi

iSi

iSi

iSi

iSi

c

c

yyyyyyc

yyyyyyc

yyyyyyc

Page 66: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6666

MBpBM: preprocessing (example)

heuristic)greedy (by 9

2

UBf

p

Objective:

876542 28 zzzzyy

Constraints:

4,...,1

8,...,5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jj

jj

y

z

yyz

yyz

yyz

yyz

yyyy

28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz

Page 67: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6767

MBpBM: preprocessing (example)

28134

33321

53212

43561

C

011)(

heuristic)greedy (by 9

2

43834 yyzff

f

p

UB

UB

y

Objective:

876542 28 zzzzyy

Constraints:

4,...,1

8,...,5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jj

jj

y

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy438

427

326

315

yyz

yyz

yyz

yyz

thus, z8 can be deleted

from the model

consider some term

ri

defT

i Tyy r iff 1

Page 68: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6868

MBpBM: preprocessing (example)

012)(

011)(

heuristic)greedy (by 9

2

42724

32834

yyzff

yyzff

f

p

UB

UB

UB

y

y

Objective:

876542 28 zzzzyy

Constraints:

4,...,1

7,...,5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jj

jj

y

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz consider next term

thus, z7 can be deleted

from the model

ri

defT

i Tyy r iff 1

Page 69: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

6969

MBpBM: preprocessing (example)

010)(

012)(

011)(

heuristic)greedy (by 9

2

32623

42724

43834

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

y

y

y

Objective:

876542 28 zzzzyy

Constraints:

4,...,1

6,...,5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jj

jj

y

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz and so on …

ri

defT

i Tyy r iff 1

Page 70: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7070

9)(

010)(

012)(

011)(

heuristic)greedy (by 9

2

13

32623

42724

43834

y

y

y

y

f

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

MBpBM: preprocessing (example)Objective:

876542 28 zzzzyy

Constraints:

4,...,1

5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jjy

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz and so on …

ri

defT

i Tyy r iff 1

Page 71: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7171

010)(

9)(

010)(

012)(

011)(

heuristic)greedy (by 9

2

44

13

32623

42724

43834

yff

f

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

UB

y

y

y

y

y

MBpBM: preprocessing (example)Objective:

876542 28 zzzzyy

Constraints:

4,...,1

5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jjy

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz and so on …

ri

defT

i Tyy r iff 1

Page 72: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7272

9)(

010)(

9)(

010)(

012)(

011)(

heuristic)greedy (by 9

2

2

44

13

32623

42724

43834

y

y

y

y

y

y

f

yff

f

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

UB

MBpBM: preprocessing (example)Objective:

876542 28 zzzzyy

Constraints:

4,...,1

5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jjy

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz and so on …

ri

defT

i Tyy r iff 1

Page 73: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7373

MBpBM: preprocessing (example)Objective:

876542 28 zzzzyy

Constraints:

4,...,1

5

438

427

326

315

4321

}1,0{

0

1

1

1

1

2

jjy

z

yyz

yyz

yyz

yyz

yyyy

876542 28 zzzzyy

unnecessary

restrictions !

28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz

9)(

010)(

9)(

010)(

012)(

011)(

heuristic)greedy (by 9

2

2

44

13

32623

42724

43834

y

y

y

y

y

y

f

yff

f

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

UB

Page 74: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7474

MBpBM: preprocessing (example)Objective:

876542 28 zzzzyy

Constraints:

4,...,1

5

32

31

321

}1,0{

0

10

10

20

jjy

z

yy

yy

yyy

528 zy28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz

9)(

010)(

9)(

010)(

012)(

011)(

heuristic)greedy (by 9

2

2

44

13

32623

42724

43834

y

y

y

y

y

y

f

yff

f

yyzff

yyzff

yyzff

f

p

UB

UB

UB

UB

UB

Page 75: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7575

MBpBM: preprocessing (example)

2p

Objective:

Constraints:

0

}1,0{

0

1

1

2

4

4,...,1

5

32

31

321

y

y

z

yy

yy

yyy

jj

528 zy

3 (10) coefficients

3 (11) linear constr.

1 (7) non-negativity constr.

3 Boolean (1 fixed to 0)

28134

33321

53212

43561

C

438

427

326

315

yyz

yyz

yyz

yyz

Note: the number of Boolean variables was 4 in all considered

models and in MBpBM it is 3.

Page 76: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7676

Preprocessing from linear to

nonlinear terms

• The preprocessing should be done

starting from linear terms...

• ... as cutting some term T cuts also all

terms for which T was embedded

Page 77: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7777

MBpBM: preprocessing (impact)

our results

results from P. Avella and A. Sforza, Logical reduction tests

for the p-median problem, Ann. Oper. Res. 86, 1999, pp. 105–115.

Page 78: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7878

Computational resultsOR-library instances

[3] Avella P., Sassano A., Vasil’ev I.: Computational study of large-scale p-median problems. Math. Prog., Ser. A, 109, 89-114 (2007)

[12] Church R.L.: BEAMR: An exact and approximate model for the p-median problem. Comp. & Oper. Res., 35, 417-426 (2008)

[15] Elloumi S.: A tighter formulation of the p-median problem. J. Comb. Optim., 19, 69–83 (2010)

Page 79: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

7979

Computational results, m=900

Results for different number of medians for two OR instances

Page 80: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

8080

Computational resultsResults for different numbers of medians in BN1284

[3] Avella P., Sassano A., Vasil’ev I.: Computational study of large-scale p-median

problems. Math. Prog., Ser. A, 109, 89-114 (2007)

Page 81: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

81

Computational resultsRunning times (sec.) for 15 largest OR-library instances

Page 82: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

82

Computational resultsRunning times (sec.) for RW instances

Page 83: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

83

Results for

our

complex

instances

Page 84: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

8484

Concluding remarks

• a new Mixed Boolean Pseudo-Boolean

linear programming Model (MBpBM) for

the p-median problem (PMP):

instance specific

optimal within the class of mixed

Boolean LP models

allows solving previously unsolved

instances with general purpose software

Page 85: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

8585

Future research directions

• compact models for other location

problems (e.g. SPLP or generalized PMP)

• revised data-correcting approach

• implementation and computational

experiments with preprocessed MBpBM

based on lower and upper bounds

Page 86: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

86

Next two lectures

• How many instances do we really solve

when solving a PMP instance

• Why some data lead to more complex

problems than other

• Two applications in details

Page 87: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

87

Literature• B. F. AlBdaiwi, B. Goldengorin, G. Sierksma. Equivalent instances of the simple

plant location problem. Computers and Mathematics with Applications, 57 812—820 (2009).

• B. F. AlBdaiwi, D. Ghosh, B. Goldengorin. Data Aggregation for p-Median Problems. Journal of Combinatorial Optimization 2010 (open access, in press) DOI: 10.1007/s10878-009-9251-8.

• Avella, P., Sforza, A.: Logical reduction tests for the p-median problem. Annals of Operations Research, 86, 105-115 (1999).

• Avella, P., Sassano, A., Vasil'ev, I.: Computational study of large-scale

p-median problems. Mathematical Programming, Ser. A, 109, 89-114

(2007).

• Beresnev, V.L. On a Problem of Mathematical Standardization Theory,

Upravliajemyje Sistemy, 11, 43–54 (1973), (in Russian).

• Church, R.L.: BEAMR: An exact and approximate model for the p-median problem. Computers & Operations Research, 35, 417-426 (2008).

• Cornuejols, G., Nemhauser, G., Wolsey, L.A.: A canonical representation of simple plant location problems and its applications. SIAM Journal on Matrix Analysis and Applications (SIMAX), 1(3), 261-272 (1980).

Page 88: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

88

• Elloumi, S.: A tighter formulation of the p-median problem. Journal of Combinatorial Optimization, 19, 69-83 (2010).

• Goldengorin, B., Krushinsky, D.: Towards an optimal mixed-Boolean LP model for the p-median problem (submitted to Annals of Operations Research).

• Goldengorin, B., Krushinsky, D.: Complexity evaluation of benchmark instances for the p-median problem (submitted to Mathematical and Computer Modelling ).

• Hammer, P.L.: Plant location -- a pseudo-Boolean approach. Israel

Journal of Technology, 6, 330-332 (1968).

• Reese, J.: Solution Methods for the p-Median Problem: An Annotated

Bibliography. Networks 48, 125-142 (2006)

• ReVelle, C.S., Swain, R.: Central facilities location. Geographical Analysis,

2, 30-42 (1970)

Literature (contd.)

Page 89: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

8989

Thank you!

Questions?

Page 90: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

90

Application to Cell Formation

Machine-part

incidence matrix

Dissimilarity measure for machines

machines theofeither need that parts ofnumber

and machinesboth need that parts ofnumber ),(

jijid

Example 1:

functional

grouping

The task is to group machines into clusters (manufacturing cells)

such that to to minimize intercell communication.

10010

00101

01110

00101

11010

parts

machin

es

1 2 3 4 5

5

4

3

2

1

Page 91: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

91

Application to Cell Formation

Cost matrix for the PMP

is a machine-machine

dissimilarity matrix:

000.175.000.133.0

00.1075.0000.1

75.075.0075.050.0

00.1075.0000.1

33.000.150.000.10

machines

machin

es

),(:],[ jidjic

Example 1: functional grouping (contd.)

In case of

two cells

the solution

is:11000

11000

00101

10011

00111

parts

machin

es

2 4 5 1 3

2

4

5

3

1

intercell communication is

caused by only part # 3

that is processed in both

cells

Page 92: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

92

Application to Cell Formation

000.175.000.133.0

00.1075.0000.1

75.075.0075.050.0

00.1075.0000.1

33.000.150.000.10

C

Example 1: functional grouping (contd.)

531515

432422

321313

432422

432511

25.042.033.0

25.075.00

025.05.0

25.075.00

25.016.033.0)(

yyyyyy

yyyyyy

yyyyyy

yyyyyy

yyyyyyBC y

4325313142515312, 5.075.025.05.158.033.05.033.0)( yyyyyyyyyyyyyyyB pC y

Linearization:

109876531 5.075.025.05.158.033.05.033.0),( zzzzzyyyf zy

where:

318

43210427

5319516

yyz

yyyzyyz

yyyzyyz

Page 93: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

93

Application to Cell FormationExample 1: functional grouping (contd.)

10..6

5..1

43210

5319

318

427

516

54321

109876531

0

}1,0{

2

2

1

1

1

25

..

min5.075.025.05.158.033.05.033.0

ii

ii

z

y

yyyz

yyyz

yyz

yyz

yyz

yyyyy

ts

zzzzzyyy

MBpBM

5..1

432

531

31

42

51

54321

531

}1,0{

20

20

10

10

10

25

.

min33.05.033.0

iiy

yyy

yyy

yy

yy

yy

yyyyy

ts

yyy

1

0

1

1

0

*y

MBpBM with reduction based on bounds

Page 94: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

94

Application to Cell Formation

Machine-worker

incidence matrix

Dissimilarity measure for machines

machines theofeither operatecan that workersofnumber

and machinesboth operatecan that workersofnumber ),(

jijid

Example 2:

workforce

expences

The task is to group machines into clusters (manufacturing cells) such that:

1) every worker is able to operate every machine in his cell and cost of additional

cross-training is minimized;

2) if a worker can operate a machine that is not in his cell then he can ask for

additional payment for his skills; we would like to minimize such overpayment.

11001000

00101100

10010110

00100011

01010001

workers

machin

es

1 2 3 4 5 6 7 8

5

4

3

2

1

Page 95: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

95

Application to Cell Formation

Cost matrix for the PMP

is a machine-machine

dissimilarity matrix:

080.083.000.180.0

80.0083.080.000.1

83.083.0083.083.0

00.180.083.0080.0

80.000.183.080.00

machines

machin

es

),(:],[ jidjic

Example 2: workforce expences (contd.)

In case of

three cells

the solution

is:10010100

10101000

01010001

01100010

00011111

workers

ma

chin

es

2 3 5 8 1 4 6 7

1

5

2

4

3

1 worker needs

additional training

7 non-clustered

elements that

represent the skills that

are not used (potential

overpayment)

Page 96: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

96

Application to Cell FormationExample 2: workforce expences (contd.)

080.083.000.180.0

80.0083.080.000.1

83.083.0083.083.0

00.180.083.0080.0

80.000.183.080.00

C

5431541515

5432542424

4321321313

4321421212

5321521211

17.003.0080.0

17.003.0080.0

00083.0

17.003.0080.0

17.003.0080.0)(

yyyyyyyyyy

yyyyyyyyyy

yyyyyyyyyy

yyyyyyyyyy

yyyyyyyyyyBC y

543213, 8.08.083.08.08.0)( yyyyyB pC y

The objective is already a linear function !

Page 97: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

97

Application to Cell FormationExample 2: workforce expences (contd.)

MBpBM

0

0

0

1

1

*y

5..1

54321

54321

}1,0{

35

..

min8.08.083.08.08.0

iiy

yyyyy

ts

yyyyy

Page 98: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

98

Application to Cell FormationExample 3: from Yang,Yang (2008)*

105 parts

45 m

achin

es

(uncapacitated)

functional grouping

105 parts

45 m

achin

esgrouping efficiency:

Yang, Yang* 87.54%

our result 87.57%

(solved within 1 sec.)

* Yang M-S., Yang J-H. (2008) Machine-part cell formation in group technology using a modified

ART1 method. EJOR, vol. 188, pp. 140-152

Page 99: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

9999

Thank you!

• Questions?

Page 100: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

100100

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

4 2 1 :client1 31

21

11 DDD

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

Page 101: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

101101

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

Page 102: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

102102

The PMP: alternative formulation, Cornuejols et al. 1980

28134

33321

53212

43561

C

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

closed are distance within sites all if ,1

opened is distance within site oneleast at if ,0kj

kjk

jD

Dz

Decision variables

Let for each client j - sorted (distinct) distances (Kj – number

of distinct distances for j-th client)

jK

jj DD ,...,1

111121 )(...)(min jjj K

j

K

j

K

jjjjjijSi

zDDzDDDc

S - set of opened plants

Page 103: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

103103for each client i - sorted distances

- iff all the sites within are

closed

s.t.

The PMP: alternative formulation, Cornuejols et al. 1980

min)(),(

1

1

1

11n

j

K

k

ki

ki

kii

i

zDDDf yz

- p opened facilitiespy

m

i

i

1

,1 ,...,1,...,1

:

niKk

Ddj

jki

ikiij

yz

niz iKi ,...,1 ,0

niKk

ki

iz ,...,1

,...,1 ,0

mjy j ,...,1 },1,0{

- either at least one facility is open within

or

kiD

1kiz

- for every client it is an opened facility in some

neighbourhood

1kiz

kiD

iKii DD ,...,1

Page 104: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

104104

The PMP: alternative formulation, Cornuejols et al. 1980

Example

(Elloumi,2009)

28134

33321

53212

43561

C

Objective:

352515143323133222122111

352515

14

332313

322212

2111

52328

)45()34()23(2 :client5

)38(3 :client4

)35()23()12(1 :client3

)36()23()12(1 :client2

)24()12(1 :client1

zzzzzzzzzzzz

zzz

z

zzz

zzz

zz

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

+ +

+ +

13 coefficients

only distinct

(in a column)

distances are

meaningful

Page 105: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

105105

The PMP: alternative formulation, Cornuejols et al. 1980

Example

28134

33321

53212

43561

C

Constraints:

1

1

1

:client1

423131

23121

3111

yyyyz

yyyz

yyz

4 2 1 :client1 31

21

11 DDD

if plants 1 and 3 are closed

then all plants within distance D11=1 are closed

and

)0,0( 31 yy

111zpla

nts

1 2

3 4

Page 106: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

106106

The PMP: alternative formulation, Cornuejols et al. 1980

Example

(Elloumi,2009)

28134

33321

53212

43561

C

Objective:

352515143323133222122111

352515

14

332313

322212

2111

52328

)45()34()23(2 :client5

)38(3 :client4

)35()23()12(1 :client3

)36()23()12(1 :client2

)24()12(1 :client1

zzzzzzzzzzzz

zzz

z

zzz

zzz

zz

5 4 3 2 :client5

8 3 :client4

5 3 2 1 :client3

6 3 2 1 :client2

4 2 1 :client1

45

35

25

15

24

14

43

33

23

13

42

32

22

12

31

21

11

DDDD

DD

DDDD

DDDD

DDD

+ +

+ +

13 coefficients

only distinct

(in a column)

distances are

meaningful

Page 107: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

107107

The PMP: alternative formulation, Cornuejols et al. 1980

Example

28134

33321

53212

43561

C

Objective:

352515143323

133222122111

52

328

zzzzzz

zzzzzz

Constraints:

jKkjjkz

zz

zzz

yyyyz

yyyyz

yyyyz

yyyz

yyyz

yyyz

yyyyz

yyz

yyyyz

yyz

yyz

yyyz

yz

yyyz

yz

yz

yyz

pyyyy

,...,1 ;5,...,1

4524

434231

432145

432143

432142

43135

43233

43232

432131

4325

432124

4223

3222

32121

415

32114

413

212

3111

4321

0

0,0

0,0,0

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

4,...,1}1,0{ iiy

13 coefficients, 23 linear constr., 12 non-negativity constr., 4 Boolean

Page 108: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

108108

The PMP: a tighter formulation, Elloumi 2009

A possible definition of variables : kjz

j

Dci

ikj Kknjyz

kjij

,...,1 ;,...,1 ,)1(

:

Or recursively:

j

Dci

ikj

kj

Dci

ij

,...,Kknjyzz

njyz

kjij

jij

2 ;,...,1 ,)1(

;,...,1 ,)1(

:

1

:

1

1

11221

3111

32121

3111 1 toequivalent is

1

1 e.g.

zyz

yyz

yyyz

yyz

Thus:

Page 109: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

109109for each client j - sorted distances

s.t.

The PMP: a tighter formulation, Elloumi 2009

min)(),(

1

1

1

11n

j

K

k

kj

kj

kjj

j

zDDDf yz

py

m

i

i

1

n 1,...,j ,1

:

1

kjij Dci

ij yz

njz jK

j ,...,1 ,0

nj

Kkkj

jz

,...,1

,...,1 ,0

miyi ,...,1 },1,0{jK

jj DD ,...,1

,,...,1

,...,21

:

nj

Kkkj

Dci

ikj

jkjij

zyz

,1,...,1

,...,1

:

nj

Kk

Dci

ikj

jkjij

yz

Cornuejols et al. 1980

Page 110: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

110110

.eliminated becan variabledefinesthat

1 constraint and )1(by dsubstitute becan Variable solution. feasible

anyfor holds 1 then }{singleton a is if ,client any For :R1 Rule

1

11

11

j

ijij

ijij

z

yzyz

yzyVj

The PMP: a tighter formulation, Elloumi 2009

6 3 2 1 :2client 32

32

22

12 DDDD

28134

33321

53212

43561

C

)1(

open is

2facility

)0(

open is within

facility some

212

12

yz

D

212 1 yz

}:{ : within facilities ofset Let k

jijk

jk

jk

j DciVDV

Informally:

if for client j some neighbourhood

k contains only one facility i then

there is a simple relation between

corresponding variables ikj yz 1

Page 111: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

111111

.eliminated becan variabledefines

that constraint and by replaced becan Variable

solution. feasibleany for holds then any for If :R2 Rule1

k'j'

Di:c

k'-j'j

k'j'

kj

k'j'

k'j'

kj

k'i'

kj

z

zyzzz

zzVk', Vj',k,j,

k'j'ij'

The PMP: a tighter formulation, Elloumi 2009

28134

33321

53212

43561

C

{1,2,3,4} {1,2,3}

8 3 :4client

}4321{ }321{ }31{

4 2 1 :1client

24

14

24

14

31

21

11

31

21

11

VV

DD

,,,V,,V,V

DDD

14

21 zz

Informally:

if two clients have equal

neighbourhoods then the

corresponding z-variables are

equivalent and in the objective

function terms containing them

can be added.

Page 112: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

112112

. constraint eliminatecan

we,0 as Finally, .such that facilities of sets the toequal is

such that facilities ofset thecase, in this Further, .that

deduce toapplied becan R2 Rule then any for If :R3 Rule

1

11

11

j'K

j'ij'

j'j'

j'jj'

jj'j

j'j

Di:c

-Kj'i

K

j'

K

j'

K

j

K

j'ij'

K

jij

K

j'

K

j

K

j'

K

j

zyz

zzDci

Dcizz

Vj', Vj,

The PMP: a tighter formulation, Elloumi 2009

}432{1, }432{ {2,4} {4}

5 3 2 1 :3client

}432{1, }432{ }32{ }2{

6 3 2 1 :2client

33

33

23

13

33

33

23

13

32

32

22

12

32

32

22

12

,,V,,VVV

DDDD

,,V,,V,VV

DDDD

331

43 zyz

after applying Rule R2 becomes

redundant and can be eliminated

Page 113: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

113113

Example (from Elloumi, 2009)

28134

33321

53212

43561

C

Objective:

3525233222211142 57)1(2)1(8 zzzzzzzyy

Constraints:

22432

2322

214

11221

3111

4321

1

1

zyz

yyz

zy

zyz

yyz

pyyyy

4,...,1

352

25135

4325

4223

321

}1,0{

0

1

1

jj

ki

y

z

zy

zyz

yyz

yyz

zy

10 (13) coefficients

11 (23) linear constr.

7 (12) non-negativity

constr.

4 Boolean constr.

Page 114: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

114114for each client i - sorted distances

s.t.

The PMP: a tighter formulation, Elloumi 2009

min)(),(

1

1

1

11n

j

K

k

ki

ki

kii

i

zDDDf yz

py

m

i

i

1

,1 ,...,1,...,1

:

niKk

Ddj

jki

ikiij

yz

niz iKi ,...,1 ,0

niKk

ki

iz ,...,1

,...,1 ,0

mjy j ,...,1 },1,0{

iKii DD ,...,1

,1 ,...,1,...,2

:

niKk

Ddj

jki

ikiij

yz

additional constraints

+ reduction rules

(next slide)

Page 115: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

115115

The p-Median Problem:a tighter formulation Elloumi 2009

Page 116: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

116116

MBpBM: preprocessing

0 constraint a add and

objective thefrom excludecan weand

0 solution optimalevery for then

)( holds monomial somefor if I.e.

solution. optimalan not is

11 satisfying every then

holds : somefor if

boundupper (global) some

1

ri

rT

ri

Tyi

r

r

UB

Tyir

ii

UBm

ii

UB

y

T

T

ffyT

y'y'

f)f(pmy

f

y

y

yy

ri

defT

i Tyy r iff 1

Page 117: p-Median Cluster Analysis Based on General-Purpose Solvers (1)

117117

6)(

4)(

0)( 1)(

1

6 ,4 ,Let

3

2

1

11

432211

T

T

UBT

T

UB

f

f

yfff

f

yTyTyT

y

y

yy

MBpBM: preprocessingClaim:

strict. bemust )( inequality The UBTff ry

Counter-example (p=2):

: violatedisassertion previous the)( if that showcan We UBTff ry

045

992

801

660

334

213

142

421 4241214212, 231641)( yyyyyyyyyB pC y

cost

matrix

permuta-

tion

But in the unique optimal solution y1=1 !

suppose

0

1

0

1

opty