Assigning People in Practice Robert Fourer Department of Industrial - - PowerPoint PPT Presentation

assigning people in practice
SMART_READER_LITE
LIVE PREVIEW

Assigning People in Practice Robert Fourer Department of Industrial - - PowerPoint PPT Presentation

Assigning People in Practice Robert Fourer Department of Industrial Engineering and Management Sciences Northwestern University Evanston, IL 60208-3119, U.S.A. 4er@iems.northwestern.edu CORS/INFORMS International Meeting Banff, May 16-19,


slide-1
SLIDE 1

1

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Assigning People in Practice

Robert Fourer

Department of Industrial Engineering and Management Sciences Northwestern University Evanston, IL 60208-3119, U.S.A.

4er@iems.northwestern.edu

CORS/INFORMS International Meeting Banff, May 16-19, 2004 WC02: Optimization Modelling in Practice II

slide-2
SLIDE 2

2

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Outline

Classical assignment

! Assigning professor to offices ! Adjusting the results

Modified assignment

! Assigning students to project groups ! Modeling the complications

“Balanced” assignment

! Tests of formulations using sample data ! Scaling up to full data

slide-3
SLIDE 3

3

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Classical Assignment

Q q P p X Q q X P p X X c j i X j i c places Q P

pq P p pq Q q pq P p Q q pq pq ij ij

∈ ∈ ≥ ∈ ≤ ∈ = = =

∑ ∑ ∑ ∑

∈ ∈ ∈ ∈

and each for , each for , 1 each for , 1 Subject to Minimize

  • therwise

place to assigned is person if 1 Define place to person assigning

  • f

cost ,

  • f

set a , people

  • f

set a , Given

slide-4
SLIDE 4

4

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

. . . same, but in AMPL

set P; # people set P; # people set Q; # places set Q; # places param c {P,Q} > 0; param c {P,Q} > 0; var X {P,Q} binary; var X {P,Q} binary; minimize Z: sum {p in P} sum minimize Z: sum {p in P} sum {q in Q} c[p,q] * X[p,q]; {q in Q} c[p,q] * X[p,q]; subject to P1 {p in P} subject to P1 {p in P}: sum {q in Q} X[p,q] = 1; : sum {q in Q} X[p,q] = 1; subject to Q1 {q in Q}: subject to Q1 {q in Q}: sum {p in P} X[p,q] <= 1; sum {p in P} X[p,q] <= 1;

slide-5
SLIDE 5

5

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

. . . same, but more readable

set PEOPLE; set PEOPLE; set PLACES; set PLACES; param pref {PEOPLE,PLACES} > 0; param pref {PEOPLE,PLACES} > 0; var Assign {PEOPLE var Assign {PEOPLE,PLACES} binary; ,PLACES} binary; minimize TotalPref: minimize TotalPref: sum {p in PEOPLE} sum {q in sum {p in PEOPLE} sum {q in PLACES} pref[p,q] PLACES} pref[p,q] * Assign[p,q]; * Assign[p,q]; subj to OnePlacePerPerso subj to OnePlacePerPerson {p in PEOPLE}: n {p in PEOPLE}: sum {q in PLACES} sum {q in PLACES} Assign[p,q] = 1; Assign[p,q] = 1; subj to OnePersonPerPlac subj to OnePersonPerPlace {q in PLACES}: e {q in PLACES}: sum {p in PEOPLE} sum {p in PEOPLE} Assign[p,q] <= 1; Assign[p,q] <= 1;

slide-6
SLIDE 6

6

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Data for Professors and Offices

set PEOPLE := Bassok Coullard set PEOPLE := Bassok Coullard Frey Hazen Hopp Hurter Frey Hazen Hopp Hurter Jones Mehrotra Rieders R Jones Mehrotra Rieders Rath Rubenstein Spearman ath Rubenstein Spearman Sun Tamhane Thompson Zazanis ; Sun Tamhane Thompson Zazanis ; set PLACES := 1021 10 set PLACES := 1021 1049 1053 1055 1083 1087 49 1053 1055 1083 1087 2009 2019 2053 2083 2087 2009 2019 2053 2083 2087 3021 3041 3083 3087 3021 3041 3083 3087 4083 4087 ; 4083 4087 ; param pref: 1021 1049 param pref: 1021 1049 1053 1055 1083 1087 2009 2 1053 1055 1083 1087 2009 2019 2053 2083 2087 := 019 2053 2083 2087 := Bassok 7 7 Bassok 7 7 7 7 7 7 7 7 7 7 7 7 7 6 7 7 7 6 5 Coullard 11 14 13 Coullard 11 14 13 12 16 15 10 12 16 15 10 11 9 8 11 9 8 7 Frey 4 4 Frey 4 4 4 3 4 4 4 3 4 4 4 4 1 4 4 4 1 4 4 Hazen 17 14 13 Hazen 17 14 13 12 15 16 12 15 16 6 11 9 7 6 11 9 7 8 Hopp 15 16 Hopp 15 16 17 4 10 11 17 4 10 11 5 12 13 8 5 12 13 8 9 Hurter 17 15 14 Hurter 17 15 14 16 11 10 4 16 11 10 4 13 9 7 13 9 7 8 8 Jones 5 4 Jones 5 4 14 15 16 17 14 15 16 17 1 11 10 12 13 1 11 10 12 13 Mehrotra 17 14 15 Mehrotra 17 14 15 9 7 8 10 9 7 8 10 11 12 3 11 12 3 4 Rieders 12 17 16 Rieders 12 17 16 15 14 13 15 14 13 7 8 11 10 7 8 11 10 9 ....... .......

slide-7
SLIDE 7

7

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

A First Assignment

ampl: ampl: model offices.mod; model offices.mod; ampl: ampl: data offices.dat; data offices.dat; ampl: ampl: solve; solve; MINOS 5.5: optima MINOS 5.5: optimal solution found. l solution found. 128 iterations, objective 49 128 iterations, objective 49 ampl: ampl: display Assign; display Assign; Assign [*,*] (tr) Assign [*,*] (tr) # $2 = Coullard # $2 = Coullard # $6 = Hurter # $6 = Hurter : Bassok '$2' : Bassok '$2' Frey Hazen Frey Hazen Hopp '$6' Jones := Hopp '$6' Jones := 1021 0 0 1 1021 0 0 1 0 0 0 0 -6.38388e-17 0 0 -6.38388e-17 1049 0 0 0 1049 0 0 0 0 0 0 0 0 0 0 0 1053 0 0 0 1053 0 0 0 0 0 0 0 0 0 0 0 1055 0 0 0 1055 0 0 0 0 0 1 0 0 1 0 0 1083 0 0 -7. 1083 0 0 -7.20534e-17 0 20534e-17 0 0 0 0 0 0 0 1087 0 0 8. 1087 0 0 8.21457e-18 0 21457e-18 0 0 0 0 0 0 0 2009 0 0 0 2009 0 0 0 0 0 0 0 0 0 0 0 2019 1 0 0 2019 1 0 0 0 0 0 0 0 0 0 0 2053 0 0 -5.562 2053 0 0 -5.56242e-17 0 42e-17 0 0 0 0 ....... 0 0 0 .......

slide-8
SLIDE 8

8

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(displayed legibly)

ampl: ampl: option display_1col 10

  • ption display_1col 10000, omit_zero_rows 1;

000, omit_zero_rows 1; ampl: ampl: option display_

  • ption display_eps .000001;

eps .000001; ampl: ampl: display {p in PEOPLE, q in PL display {p in PEOPLE, q in PLACES} pref[p,q] * Assign[p,q]; ACES} pref[p,q] * Assign[p,q]; pref[p,q]*Assign[p,q] := pref[p,q]*Assign[p,q] := Bassok 2019 7 Bassok 2019 7 Coullard 4083 2 Coullard 4083 2 Frey 1021 4 Frey 1021 4 Hazen 3083 3 Hazen 3083 3 Hopp 1055 4 Hopp 1055 4 Hurter 3041 1 Hurter 3041 1 Jones 3021 3 Jones 3021 3 Mehrotra 2083 3 Mehrotra 2083 3 Rath 1053 2 Rath 1053 2 Rieders 3087 3 Rieders 3087 3 Rubenstein 1049 1 Rubenstein 1049 1 Spearman 2009 1 Spearman 2009 1 Sun 4087 1 Sun 4087 1 Tamhane 1087 7 Tamhane 1087 7 Thompson 2053 2 Thompson 2053 2 Zazanis 2087 5 Zazanis 2087 5

slide-9
SLIDE 9

9

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

A Seniority-Weighted Assignment

param base >= 1; param base >= 1; param weight {PEOPLE} > 0; param weight {PEOPLE} > 0; param pref {PE param pref {PEOPLE,PLACES} > 0; OPLE,PLACES} > 0; var Assign {PE var Assign {PEOPLE,PLACES} binary; OPLE,PLACES} binary; minimize TotalPref: minimize TotalPref: sum {p in PEOPLE} sum {p in PEOPLE} base^weight[p] * base^weight[p] * sum {q in PLACES} pref[p,q] * Assign[p,q]; sum {q in PLACES} pref[p,q] * Assign[p,q]; param base := 10 ; param base := 10 ; param weight := param weight := Bassok 1 Bassok 1 Hopp 3 Rath Hopp 3 Rath 4 Sun 2 4 Sun 2 Coullard 3 Coullard 3 Hurter 4 Rieders Hurter 4 Rieders 1 Tamhane 4 1 Tamhane 4 Frey 4 Jones 4 Frey 4 Jones 4 Rubenstein 4 Thompson 4 Rubenstein 4 Thompson 4 Hazen 3 Mehrotra 2 Hazen 3 Mehrotra 2 Spearman 2 Zazanis 2 ; Spearman 2 Zazanis 2 ;

slide-10
SLIDE 10

10

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(results)

MINOS 5.5: optima MINOS 5.5: optimal solution found. l solution found. 128 iterations, objective 102330 128 iterations, objective 102330 ampl: display {p in PEOP ampl: display {p in PEOPLE, q in PLACES} pref[p,q] * Assign[p,q]; LE, q in PLACES} pref[p,q] * Assign[p,q]; pref[p,q]*Assign[p,q] := pref[p,q]*Assign[p,q] := Bassok 1087 7 Bassok 1087 7 Coullard 3087 Coullard 3087 3 Frey 2053 Frey 2053 1 Hazen 3083 3 Hazen 3083 3 Hopp 1055 4 Hopp 1055 4 Hurter 4083 Hurter 4083 2 Jones 2009 Jones 2009 1 Mehrotra 1083 Mehrotra 1083 7 Rath 1053 2 Rath 1053 2 Rieders 3021 Rieders 3021 6 Rubenstein 1049 1 Rubenstein 1049 1 Spearman 2083 Spearman 2083 2 Sun 2019 Sun 2019 8 Tamhane 4087 Tamhane 4087 1 Thompson 3041 Thompson 3041 1 Zazanis 2087 5 Zazanis 2087 5

slide-11
SLIDE 11

11

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

A Politically-Sensitive Assignment

set GIVEN within set GIVEN within {PEOPLE,PLACES}; {PEOPLE,PLACES}; ....... ....... subj to PoliticalDecisio subj to PoliticalDecisions {(p,q) in GIVEN}: ns {(p,q) in GIVEN}: Assign[p,q] = 1; Assign[p,q] = 1; set given := (Rubenste set given := (Rubenstein,1049) (Rath,1053) in,1049) (Rath,1053) (Frey,2019) ; (Frey,2019) ;

slide-12
SLIDE 12

12

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

A More Equitable Assignment

param worst integer <= param worst integer <= card {PLACES}; card {PLACES}; ....... ....... subj to NotTooAwful subj to NotTooAwful {p in PEOPLE, q in PL {p in PEOPLE, q in PLACES: pref[p,q] > worst}: ACES: pref[p,q] > worst}: Assign[p,q] = 0; Assign[p,q] = 0; ampl: ampl: let worst := 7; let worst := 7; ampl: solve; ampl: solve; MINOS 5.5: optimal MINOS 5.5: optimal solution found. solution found. 46 iterations, objective 130830 46 iterations, objective 130830 ampl: ampl: let worst := 6; let worst := 6; ampl: solve; ampl: solve; MINOS 5.5: infeasible problem. MINOS 5.5: infeasible problem. 4 iterations 4 iterations

slide-13
SLIDE 13

13

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #1

Use a small assignment model to generate assignments Then go with the one you prefer

slide-14
SLIDE 14

14

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #2

Generate the assignments for yourself Announce only the assignment you choose

slide-15
SLIDE 15

15

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Modified Assignment

Given

! Students and projects ! Preferences of students for projects ! Subgroups of students wanting the same project ! List of students who have cars

Assign

! 3 or 4 students per project ! At least one car per project ! Students in each subgroup to the same project

. . . with preference to students not in subgroups

slide-16
SLIDE 16

16

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Student Data

set STU ordered set STU ordered; param car {STU} binary; param car {STU} binary; param ngroup integer >= 0; param ngroup integer >= 0; set GRP = set GRP = 1..ngroup; 1..ngroup; set MEM {GRP} set MEM {GRP} ordered by STU

  • rdered by STU;

check {g1 in GRP, g2 in g1+1..ngroup}: check {g1 in GRP, g2 in g1+1..ngroup}: card (MEM[g1] inter MEM[g2]) = 0; card (MEM[g1] inter MEM[g2]) = 0; set SAMEGRP = set SAMEGRP = union {g in GRP} union {g in GRP} {s1 in MEM[g], s2 in MEM[ {s1 in MEM[g], s2 in MEM[g]: ord(s1) < ord(s2)}; g]: ord(s1) < ord(s2)};

slide-17
SLIDE 17

17

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Project Data

set PRJ; set PRJ; param cars_needed {PRJ param cars_needed {PRJ} integer >= 0; } integer >= 0; param min_team {PRJ} integer >= 0; param min_team {PRJ} integer >= 0; param max_team {p in PRJ} param max_team {p in PRJ} integer >= min_team[p]; integer >= min_team[p]; param rank {STU,PRJ} param rank {STU,PRJ} integer >= 0, <= card {PRJ}; integer >= 0, <= card {PRJ}; check {(s1,s2) in SA check {(s1,s2) in SAMEGRP, p in PRJ}: MEGRP, p in PRJ}: rank[s1,p] = rank[s2,p]; rank[s1,p] = rank[s2,p];

slide-18
SLIDE 18

18

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Objective

var Assign {STU,PRJ} binary; var Assign {STU,PRJ} binary; set GROUPED = union {g set GROUPED = union {g in GRP} MEM[g]; in GRP} MEM[g]; param group_weight >= 1; param group_weight >= 1; minimize Total_Rank: minimize Total_Rank: sum {s in STU, p in P sum {s in STU, p in PRJ} rank[s,p] * Assign[s,p] * RJ} rank[s,p] * Assign[s,p] * (if s in GROUPED then (if s in GROUPED then group_weight else 1); group_weight else 1);

slide-19
SLIDE 19

19

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

General Constraints

subject to Assign_Stud subject to Assign_Students {s in STU}: ents {s in STU}: sum {p in PRJ} Assign[s,p] = 1; sum {p in PRJ} Assign[s,p] = 1; subject to Assign_Proj subject to Assign_Projects {p in PRJ}: ects {p in PRJ}: min_team[p] <= sum {s in ST min_team[p] <= sum {s in STU} Assign[s,p] <= max_team[p]; U} Assign[s,p] <= max_team[p]; subject to Enough_ subject to Enough_Cars {p in PRJ}: Cars {p in PRJ}: sum {s in STU} car[s] * As sum {s in STU} car[s] * Assign[s,p] >= cars_needed[p]; sign[s,p] >= cars_needed[p]; subject to Preserve_Groups {(s subject to Preserve_Groups {(s1,s2) in SAMEGRP, p in PRJ}: 1,s2) in SAMEGRP, p in PRJ}: Assign[s1,p] = Assign[s2,p]; Assign[s1,p] = Assign[s2,p];

slide-20
SLIDE 20

20

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Ad Hoc Constraints

param cutoff >= 1, param cutoff >= 1, <= card {PRJ}; <= card {PRJ}; subject to Not_Too_Bad subject to Not_Too_Bad {s in STU, p in PRJ: ra {s in STU, p in PRJ: rank[s,p] > cutoff}: nk[s,p] > cutoff}: Assign[s,p] = 0; Assign[s,p] = 0; set PRJ_PREF wit set PRJ_PREF within {STU,PRJ}; hin {STU,PRJ}; subject to Project_Prefe subject to Project_Preference {(s,p) in PRJ_PREF}: rence {(s,p) in PRJ_PREF}: Assign[s,p] = 1; Assign[s,p] = 1;

slide-21
SLIDE 21

21

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Project and Student Data

param: PRJ: cars_neede param: PRJ: cars_needed min_team max_team := d min_team max_team := "Ameritech" 1 "Ameritech" 1 4 4 4 4 "DSC" 1 "DSC" 1 4 4 4 4 "Motorola" 1 "Motorola" 1 4 4 4 4 "NMH" 1 "NMH" 1 4 4 4 4 "S&C Elec" 1 "S&C Elec" 1 4 4 4 4 "TreeHouse" 1 "TreeHouse" 1 4 4 4 4 "UPS" 1 "UPS" 1 4 4 ; 4 4 ; param: STU: car := param: STU: car := Bhandari_Elsa 0 Bhandari_Elsa 0 Black_Andrew 1 Black_Andrew 1 Croke_Michael 0 Croke_Michael 0 Ellis_Mary_Beth 1 Ellis_Mary_Beth 1 Fernandez_Jason 0 Fernandez_Jason 0 Friedlander_Jeffrey 1 Friedlander_Jeffrey 1 Gambell_Anthony 1 Gambell_Anthony 1 Iwase_Yoshinori 0 Iwase_Yoshinori 0 Katen_Philip 1 Katen_Philip 1 ....... .......

slide-22
SLIDE 22

22

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Subgroup and Rank Data

param ngroup := 7 ; param ngroup := 7 ; set MEM[1] := Bhandari_Elsa set MEM[1] := Bhandari_Elsa Vargas_Lorena Wise_David ; Vargas_Lorena Wise_David ; set MEM[2] := Friedland_ set MEM[2] := Friedland_Jeffrey Katen_Philip Ke Jeffrey Katen_Philip Kemp_Charles Pain_Lucas ; mp_Charles Pain_Lucas ; set MEM[3] := Ellis set MEM[3] := Ellis_Mary_Beth Xu_Ping ; _Mary_Beth Xu_Ping ; set MEM[4] := Kim_Linda set MEM[4] := Kim_Linda Pan_Shaio-Tien Subudhayan Pan_Shaio-Tien Subudhayan_Suppachok Lee_Danny ; _Suppachok Lee_Danny ; set MEM[5] := Gambell_Anthony set MEM[5] := Gambell_Anthony McCune_Christopher McCune_Jason ; McCune_Christopher McCune_Jason ; set MEM[6] := Kim_Rita Black_An set MEM[6] := Kim_Rita Black_Andrew Shemluck_Matt Fernandez_Jason ; drew Shemluck_Matt Fernandez_Jason ; set MEM[7] := Sit set MEM[7] := Sit_Danny Wang_Jensen ; _Danny Wang_Jensen ; param rank: param rank: "Ameritech" "DSC" "Motorola" "NMH" "Ameritech" "DSC" "Motorola" "NMH" "S&C Elec" "TreeHouse" "UPS" := "S&C Elec" "TreeHouse" "UPS" := Bhandari_Elsa Bhandari_Elsa 1 4 5 6 2 7 3 1 4 5 6 2 7 3 Black_Andrew Black_Andrew 7 3 2 6 4 5 1 7 3 2 6 4 5 1 Croke_Michael Croke_Michael 5 1 2 6 3 7 4 5 1 2 6 3 7 4 Ellis_Mary_Beth Ellis_Mary_Beth 7 2 1 3 5 6 4 7 2 1 3 5 6 4 Fernandez_Jason Fernandez_Jason 7 3 2 6 4 5 1 7 3 2 6 4 5 1 Friedlander_Jeffrey Friedlander_Jeffrey 7 2 5 3 4 1 6 7 2 5 3 4 1 6 Gambell_Anthony Gambell_Anthony 1 7 6 3 4 2 5 1 7 6 3 4 2 5 Iwase_Yoshinori Iwase_Yoshinori 4 5 1 7 2 6 3 4 5 1 7 2 6 3 ....... .......

slide-23
SLIDE 23

23

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Miscellaneous Data

param group_weight 3 ; param group_weight 3 ; param cutoff := 4 ; param cutoff := 4 ; set PRJ_PREF := "McCune_ set PRJ_PREF := "McCune_Christopher" Ameritech ; Christopher" Ameritech ;

slide-24
SLIDE 24

24

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solution

ampl: option display_1col ampl: option display_1col 10000, omit_zero_rows 1; 10000, omit_zero_rows 1; ampl: option displa ampl: option display_eps .000001; y_eps .000001; ampl: solve; ampl: solve; MINOS 5.5: optima MINOS 5.5: optimal solution found. l solution found. 13 iterations, objective 101 13 iterations, objective 101 ampl: display {p in PRJ, ampl: display {p in PRJ, s in STU} Assign[s,p]; s in STU} Assign[s,p]; Assign[s,p] := Assign[s,p] := Ameritech Bhandari_Elsa Ameritech Bhandari_Elsa 0.333333 0.333333 Ameritech Gambell_Anthony Ameritech Gambell_Anthony 1 1 Ameritech McCune_Christop Ameritech McCune_Christopher 1 her 1 Ameritech McCune_Jason Ameritech McCune_Jason 1 1 Ameritech Vargas_Lorena Ameritech Vargas_Lorena 0.333333 0.333333 Ameritech Wise_David Ameritech Wise_David 0.333333 0.333333 DSC Bhandari_Elsa DSC Bhandari_Elsa 0.666667 0.666667 DSC Black_Andrew DSC Black_Andrew 0.25 0.25 DSC Croke_Michael DSC Croke_Michael 1 1 DSC Fernandez_Jas DSC Fernandez_Jason 0.25

  • n 0.25

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

slide-25
SLIDE 25

25

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(with integer variables)

CPLEX 9.0.0: optimal integer CPLEX 9.0.0: optimal integer solution; objective 116 solution; objective 116 22 MIP simplex iterations 22 MIP simplex iterations 0 branch-and-bound nodes 0 branch-and-bound nodes ampl: display {p in PRJ, s in ampl: display {p in PRJ, s in STU} rank[s,p] * Assign[s,p]; STU} rank[s,p] * Assign[s,p]; rank[s,p]*Assign[s,p] := rank[s,p]*Assign[s,p] := Ameritech Gambell_Anthony Ameritech Gambell_Anthony 1 1 Ameritech Iwase_Yoshinori Ameritech Iwase_Yoshinori 4 4 Ameritech McCune_Christop Ameritech McCune_Christopher 1 her 1 Ameritech McCune_Jason Ameritech McCune_Jason 1 1 DSC Bhandari_Elsa DSC Bhandari_Elsa 4 4 DSC Croke_Michael DSC Croke_Michael 1 1 DSC Vargas_Lorena DSC Vargas_Lorena 4 4 DSC Wise_David DSC Wise_David 4 4 NMH King_Nancy NMH King_Nancy 1 1 NMH Mehawich_M NMH Mehawich_Michael 1 ichael 1 NMH Starr_Cathy NMH Starr_Cathy 1 1 NMH Terrell_Eric NMH Terrell_Eric 3 3 ....... .......

slide-26
SLIDE 26

26

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #3

Assignment problems are seldom linear programs They require discrete optimization technologies

slide-27
SLIDE 27

27

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #4

Assignment models make intensive use of sets Their modeling language formulations make extensive use of set features

slide-28
SLIDE 28

28

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

“Balanced” Assignment

Setting

! meeting of employees from around the world at New York offices of a Wall Street firm

Given

! title, location, department, sex, for each of about 1000 people

Assign

! these people to around 25 dinner groups

So that

! the groups are as “diverse” as possible, ! but no one is unduly “isolated”

slide-29
SLIDE 29

29

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Plan of Attack

Year 1

! Dump it on a (human) database administrator ! Apply some ad hoc heuristics, by hand

Year 2

! Hire a consultant (me), to:

¬ build some optimization models ¬ test simple models on small subsets of data ¬ scale up to more complex models on the full data

Year 3, 4, 5, . . .

! Re-run with new complications

slide-30
SLIDE 30

30

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Minimum “Sameness” Model

set PEOPLE; # individual set PEOPLE; # individuals to be assigned s to be assigned set CATEG; set CATEG; param type {PEOPLE param type {PEOPLE,CATEG} symbolic; ,CATEG} symbolic; # categories by which # categories by which people are classified; people are classified; # type of each perso # type of each person in each category n in each category set SAMETYPE set SAMETYPE = {i1 in PEOPLE, i2 in = {i1 in PEOPLE, i2 in PEOPLE diff {i1}, PEOPLE diff {i1}, k in CATEG: typ k in CATEG: type[i1,k] = type[i2,k]}; e[i1,k] = type[i2,k]}; # # set of triples (i1,i2,k) set of triples (i1,i2,k) such that individuals such that individuals # # i1 and i2 have the i1 and i2 have the same type in category k same type in category k param numberGrps integer > 0; param numberGrps integer > 0; param minInGrp integer > 0; param minInGrp integer > 0; param maxInGrp integer param maxInGrp integer >= minInGrp; >= minInGrp; # number of groups; bo # number of groups; bounds on size of groups unds on size of groups

slide-31
SLIDE 31

31

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(quadratic objective)

var Assign var Assign {i in PEOPLE, j in {i in PEOPLE, j in 1..numberGrps} binary; 1..numberGrps} binary; # # Assign[i,j] is 1 if and only if Assign[i,j] is 1 if and only if # # person i is assigned to group j person i is assigned to group j minimize TotalSameness minimize TotalSameness: sum {(i1,i2,k) in SAMETYP sum {(i1,i2,k) in SAMETYPE, j in 1..numberGrps} E, j in 1..numberGrps} Assign[i1,j] * Assign[i2,j] Assign[i1,j] * Assign[i2,j]; # Product of variables # Product of variables is 1 iff both are 1 is 1 iff both are 1 subj to AssignAll {i in PEOPLE}: subj to AssignAll {i in PEOPLE}: sum {j in 1..number sum {j in 1..numberGrps} Assign[i,j] = 1; Grps} Assign[i,j] = 1; # Each person assign # Each person assigned to one group ed to one group subj to GroupSize subj to GroupSize {j in 1..numberGrps}: {j in 1..numberGrps}: minInGrp <= sum {i in PEOPL minInGrp <= sum {i in PEOPLE} Assign[i,j] <= maxInGrp; E} Assign[i,j] <= maxInGrp; # Each group has an acceptable size # Each group has an acceptable size

slide-32
SLIDE 32

32

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(linearized objectives)

minimize TotalSameness: minimize TotalSameness: sum {j in GRP} sum {i in PEOPLE} sum {j in GRP} sum {i in PEOPLE} Sameness[i,j] Sameness[i,j]; subj to SamenessDefn {i subj to SamenessDefn {i in PEOPLE, j in GRP}: in PEOPLE, j in GRP}: Sameness[i,j] >= sum {(i,i2 Sameness[i,j] >= sum {(i,i2,k) in SAMETYPE} ,k) in SAMETYPE} Assign[i2,j] Assign[i2,j]

  • maxSameness * (1 -

axSameness * (1 - Assign[i,j]); ssign[i,j]); minimize TotalSameness: minimize TotalSameness: sum {j in GRP} sum {( sum {j in GRP} sum {(i1,i2,k) in SAMETYPE} i1,i2,k) in SAMETYPE} Same[i1,i2,j] Same[i1,i2,j]; subj to SameDefn subj to SameDefn {i1 in PEOPLE, i2 in PEO {i1 in PEOPLE, i2 in PEOPLE, j in 1..numberGrps}: PLE, j in 1..numberGrps}: Same[i1,i2,j] >= Assign[i Same[i1,i2,j] >= Assign[i1,j] + Assign[i2,j] — 1,j] + Assign[i2,j] — 1;

Simple Linearization Concise Linearization

slide-33
SLIDE 33

33

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving as Continuous Quadratic

ampl: solve; ampl: solve; 1000 variables, all nonlinear 1000 variables, all nonlinear 110 constraints, all 110 constraints, all linear; 2000 nonzeros linear; 2000 nonzeros 1 nonlinear objective; 1 nonlinear objective; 1000 linear nonzeros. 1000 linear nonzeros. MINOS 5.4: ignori MINOS 5.4: ignoring integrality of ng integrality of 1000 variables 1000 variables MINOS times: MINOS times: read: 11.35 read: 11.35 solve: 279.73 solve: 279.73 excluding mino excluding minos setup: 279.67 s setup: 279.67 write: 0.02 write: 0.02 total: 291.10 total: 291.10 MINOS 5.4: optima MINOS 5.4: optimal solution found. l solution found. 349 iterations, objective 1744 349 iterations, objective 1744

. . . all variables turn out integer !!!

100 people, 10 groups

slide-34
SLIDE 34

34

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving as Continuous Quadratic

ampl: solve; ampl: solve; 1000 variables, all nonlinear 1000 variables, all nonlinear 110 constraints, all 110 constraints, all linear; 2000 nonzeros linear; 2000 nonzeros 1 nonlinear objective; 1 nonlinear objective; 1000 linear nonzeros. 1000 linear nonzeros. MINOS 5.5: ignori MINOS 5.5: ignoring integrality of ng integrality of 1000 variables 1000 variables MINOS times: MINOS times: read: 0.29 read: 0.29 solve: 3.10 solve: 3.10 excluding minos setup: 3.10 excluding minos setup: 3.10 write: 0.00 write: 0.00 total: 3.39 total: 3.39 MINOS 5.5: optima MINOS 5.5: optimal solution found. l solution found. 279 iterations, objective 1714 279 iterations, objective 1714

. . . all variables turn out integer !!!

100 people, 10 groups (more recent run)

slide-35
SLIDE 35

35

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving as Integer Quadratic

ampl: solve; ampl: solve; 1000 variables, all nonlinear 1000 variables, all nonlinear 110 constraints, all 110 constraints, all linear; 2000 nonzeros linear; 2000 nonzeros 1 nonlinear objecti 1 nonlinear objective; 1000 nonzeros. ve; 1000 nonzeros. ....... ....... 73900 73196 1573.190 73900 73196 1573.1903 383 1724.0000 3 383 1724.0000 1343.6630 454152 1343.6630 454152 22.06% 22.06% 74000 73296 1695.005 74000 73296 1695.0051 119 1724.0000 1 119 1724.0000 1343.6630 455487 1343.6630 455487 22.06% 22.06% * 74000+72612 * 74000+72612 0 1720.0000 0 1720.0000 1343.6630 455487 1343.6630 455487 21.88% 21.88% Times (seconds): Times (seconds): Input = 0.981 Input = 0.981 Solve = 6458.19 Solve = 6458.19 Output = 0.411 Output = 0.411 CPLEX 9.0.0: feasible integer CPLEX 9.0.0: feasible integer solution; objective 1720 solution; objective 1720 455487 MIP simplex iterations 455487 MIP simplex iterations 74000 branch-and-bound nodes 74000 branch-and-bound nodes

. . . is this convex ???

slide-36
SLIDE 36

36

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving the Simple Linearization

ampl: solve; ampl: solve; 96520 variables: 96520 variables: 1000 binary variables 1000 binary variables 95520 linear variables 95520 linear variables 95630 constraints, all l 95630 constraints, all linear; 288560 nonzeros inear; 288560 nonzeros 1 linear objectiv 1 linear objective; 95520 nonzeros. e; 95520 nonzeros. CPLEX 3.0: CPLEX 3.0: ....... .......

. . . wait forever with no solution !!!

slide-37
SLIDE 37

37

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving the Concise Linearization

ampl: solve; ampl: solve; 2000 variables: 2000 variables: 1000 binary variables 1000 binary variables 1000 linear variables 1000 linear variables 1110 constraints, all linear; 99520 nonzeros 1110 constraints, all linear; 99520 nonzeros 1 linear objectiv 1 linear objective; 1000 nonzeros. e; 1000 nonzeros. CPLEX 3.0: CPLEX 3.0: No MIP presolve or ag No MIP presolve or aggregator reductions. gregator reductions. Elapsed time = 30.30 sec. Elapsed time = 30.30 sec. ....... .......

. . . now branch-and-bound begins →

slide-38
SLIDE 38

38

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(continued)

Nodes Nodes Cuts/ Cuts/ Node Left Objective Node Left Objective IInf Best Integer Best Node IInf Best Integer Best Node 0 0 0.0000 0 0 0.0000 274 274 0.0000 0.0000 20 20 78.0862 20 20 78.0862 300 300 0.0000 0.0000 40 40 123.6578 40 40 123.6578 288 288 0.0000 0.0000 60 60 208.7162 60 60 208.7162 271 271 0.0000 0.0000 80 80 348.8889 80 80 348.8889 241 241 0.0000 0.0000 100 100 447.9946 100 100 447.9946 219 219 0.0000 0.0000 ........... ........... 260 260 1416.4902 260 260 1416.4902 53 53 0.0000 0.0000 280 280 1561.0237 280 280 1561.0237 34 34 0.0000 0.0000 300 300 1757.6146 300 300 1757.6146 8 8 0.0000 0.0000 * 305 305 1792.0000 * 305 305 1792.0000 0 1792.0000 0 1792.0000 0.0000 0.0000 320 316 32.0996 3 320 316 32.0996 310 1792.0000 10 1792.0000 0.0000 0.0000 .......... ..........

. . . continues for a long time with no improvement

slide-39
SLIDE 39

39

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Applying a Greedy Heuristic

param conflict; param min_ param conflict; param min_conflict; param min_group; conflict; param min_group; for {p in PEOPLE} { for {p in PEOPLE} { let min_conflict := Infinity; let min_conflict := Infinity; for {j in 1..numberGrps} { for {j in 1..numberGrps} { let conflict := sum {(p,i,k) let conflict := sum {(p,i,k) in SAMETYPE} Assign[i,j]; in SAMETYPE} Assign[i,j]; if conflict < m if conflict < min_conflict then { in_conflict then { let min_conflict := conflict; let min_conflict := conflict; let min_group := j; let min_group := j; } } let Assign[p,min_group] := 1; let Assign[p,min_group] := 1; } ampl: include bal ampl: include balAssignGreedy.run; AssignGreedy.run; TotalSameness = 1762 TotalSameness = 1762

slide-40
SLIDE 40

40

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Minimum “Variation” Model

set PEOPLE; # individ set PEOPLE; # individuals to be assigned uals to be assigned set CATEG; set CATEG; param type {PEOPLE,CATEG} param type {PEOPLE,CATEG} symbolic default ""; symbolic default ""; set TYPES {k in CATEG} set TYPES {k in CATEG} = setof {i in PEOPLE} type[i,k]; = setof {i in PEOPLE} type[i,k]; # categories by which # categories by which people are classified; people are classified; # type of each person # type of each person in each category in each category param numberGrps integer > 0; param numberGrps integer > 0; param minInGrp integer > 0; param minInGrp integer > 0; param maxInGrp integer param maxInGrp integer >= minInGrp; >= minInGrp; # number of groups; bo # number of groups; bounds on size of groups unds on size of groups

A similar approach: “Market Sharing: Assigning Retailers to Company Divisions,” in: H.P. Williams, Model Building in Mathematical Programming, 3rd edition, Wiley (1990), pp. 259–260. Thanks also to Collette Coullard.

slide-41
SLIDE 41

41

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(variables and objective)

var Assign var Assign {i in PEOPLE, j in {i in PEOPLE, j in 1..numberGrps} binary; 1..numberGrps} binary; # assignments of people to groups # assignments of people to groups var MinType var MinType {k in CATEG, t in TYPES[k]} {k in CATEG, t in TYPES[k]} <= floor (card {i in PEOPLE: ty <= floor (card {i in PEOPLE: type[i,k] = t} / numberGrps); pe[i,k] = t} / numberGrps); var MaxType var MaxType {k in CATEG, t in TYPES[k]} {k in CATEG, t in TYPES[k]} >= ceil (card {i in PEOPL >= ceil (card {i in PEOPLE: type[i,k] = E: type[i,k] = t} / numberGrps); t} / numberGrps); # min/max of each # min/max of each type over all groups type over all groups minimize TotalVariation minimize TotalVariation: sum {k in CATEG, t in TYPES[k]} sum {k in CATEG, t in TYPES[k]} (MaxType[k,t] - (MaxType[k,t] - MinType[k,t]) inType[k,t]); # Sum of variati # Sum of variation over all types

  • n over all types
slide-42
SLIDE 42

42

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(constraints)

subj to AssignAll {i in PEOPLE}: subj to AssignAll {i in PEOPLE}: sum {j in 1..number sum {j in 1..numberGrps} Assign[i,j] = 1; Grps} Assign[i,j] = 1; subj to GroupSize subj to GroupSize {j in 1..numberGrps}: {j in 1..numberGrps}: minInGrp <= sum {i in PEOPL minInGrp <= sum {i in PEOPLE} Assign[i,j] <= maxInGrp; E} Assign[i,j] <= maxInGrp; subj to subj to MinTypeDefn MinTypeDefn {j in 1..numberGrps, k in {j in 1..numberGrps, k in CATEG, t in TYPES[k]}: CATEG, t in TYPES[k]}: MinType[k,t] <= MinType[k,t] <= sum {i in PEOPLE: typ sum {i in PEOPLE: type[i,k] = t} Assign[i,j]; e[i,k] = t} Assign[i,j]; subj to subj to MaxTypeDefn MaxTypeDefn {j in 1..numberGrps, k in {j in 1..numberGrps, k in CATEG, t in TYPES[k]}: CATEG, t in TYPES[k]}: MaxType[k,t] >= MaxType[k,t] >= sum {i in PEOPLE: typ sum {i in PEOPLE: type[i,k] = t} Assign[i,j]; e[i,k] = t} Assign[i,j]; # Defining con # Defining constraints for straints for # min and max type variables # min and max type variables

slide-43
SLIDE 43

43

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving for Minimum Variation

1054 variables: 1054 variables: 1000 binary variables 1000 binary variables 54 linear variables 54 linear variables 560 constraints, all 560 constraints, all linear; 12200 nonzeros linear; 12200 nonzeros 1 linear objective; 54 nonzeros. 1 linear objective; 54 nonzeros. CPLEX 3.0: CPLEX 3.0: Nodes Nodes Cuts/ Cuts/ Node Left Objective Node Left Objective IInf Best Integer Best Node IInf Best Integer Best Node 0 0 17.0000 0 0 17.0000 299 299 17.0000 17.0000 10 10 17.0000 10 10 17.0000 322 322 17.0000 17.0000 20 20 17.0000 20 20 17.0000 332 332 17.0000 17.0000 30 30 17.0000 30 30 17.0000 328 328 17.0000 17.0000 40 40 17.0000 40 40 17.0000 329 329 17.0000 17.0000 50 50 17.0000 50 50 17.0000 329 329 17.0000 17.0000 60 60 17.0000 60 60 17.0000 339 339 17.0000 17.0000 70 70 17.0000 70 70 17.0000 344 344 17.0000 17.0000 80 80 17.0000 80 80 17.0000 342 342 17.0000 17.0000 ....... .......

slide-44
SLIDE 44

44

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(continued)

Nodes Nodes Cuts/ Cuts/ Node Left Objective Node Left Objective IInf Best Integer Best Node IInf Best Integer Best Node 250 250 43.6818 250 250 43.6818 74 74 17.0000 17.0000 260 260 46.5000 260 260 46.5000 58 58 17.0000 17.0000 * 265 263 * 265 263 47.0000 0 47.0000 0 47.0000 17.0000 47.0000 17.0000 270 266 17.0000 3 270 266 17.0000 314 47.0000 14 47.0000 17.0000 17.0000 280 276 17.0000 3 280 276 17.0000 351 47.0000 51 47.0000 17.0000 17.0000 290 286 17.0000 3 290 286 17.0000 340 47.0000 40 47.0000 17.0000 17.0000 300 296 17.0000 3 300 296 17.0000 337 47.0000 37 47.0000 17.0000 17.0000 310 306 17.0000 3 310 306 17.0000 341 47.0000 41 47.0000 17.0000 17.0000 ..... ..... 630 609 21.5208 2 630 609 21.5208 243 47.0000 43 47.0000 17.0000 17.0000 640 618 23.3028 2 640 618 23.3028 244 47.0000 44 47.0000 17.0000 17.0000 650 626 17.3796 2 650 626 17.3796 269 47.0000 69 47.0000 17.0000 17.0000 660 636 17.7981 2 660 636 17.7981 271 47.0000 71 47.0000 17.0000 17.0000 * 666 440 * 666 440 19.0000 0 19.0000 0 19.0000 17.0000 19.0000 17.0000 670 440 17.0000 1 670 440 17.0000 147 19.0000 47 19.0000 17.0000 17.0000 680 446 17.0714 2 680 446 17.0714 213 19.0000 13 19.0000 17.0000 17.0000 690 454 17.5000 1 690 454 17.5000 186 19.0000 86 19.0000 17.0000 17.0000

slide-45
SLIDE 45

45

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(concluded)

Nodes Nodes Cuts/ Cuts/ Node Left Objective Node Left Objective IInf Best Integer Best Node IInf Best Integer Best Node 700 461 17.1364 2 700 461 17.1364 268 19.0000 68 19.0000 17.0000 17.0000 710 468 17.3117 2 710 468 17.3117 267 19.0000 67 19.0000 17.0000 17.0000 720 475 17.0000 2 720 475 17.0000 211 19.0000 11 19.0000 17.0000 17.0000 730 484 17.2652 2 730 484 17.2652 226 19.0000 26 19.0000 17.0000 17.0000 740 490 17.0000 1 740 490 17.0000 106 19.0000 06 19.0000 17.0000 17.0000 750 497 17.0000 750 497 17.0000 24 19.0000 24 19.0000 17.0000 17.0000 * 752 0 1 * 752 0 17.0000 0 7.0000 0 17.0000 17.0000 Times (seconds): Times (seconds): Input = 0.266667 Input = 0.266667 Solve = 864.733 Solve = 864.733 Output = 0.166667 Output = 0.166667 CPLEX 3.0: optimal integer CPLEX 3.0: optimal integer solution; objective 17 solution; objective 17 45621 simplex iterations 45621 simplex iterations 752 branch-and-bound nodes 752 branch-and-bound nodes

slide-46
SLIDE 46

46

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving for Minimum Variation

1054 variables: 1054 variables: 1000 binary variables 1000 binary variables 54 linear variables 54 linear variables 560 constraints, all 560 constraints, all linear; 12200 nonzeros linear; 12200 nonzeros 1 linear objective; 54 nonzeros. 1 linear objective; 54 nonzeros. CPLEX 9.0.0: CPLEX 9.0.0: Clique table members: 100 Clique table members: 100 MIP emphasis: balance op MIP emphasis: balance optimality and feasibility timality and feasibility Nodes Nodes Cuts/ Cuts/ Node Left Objective Node Left Objective IInf Best Integer Best Node IInf Best Integer Best Node 0 0 17.0000 0 0 17.0000 212 212 17.0000 17.0000 17.0000 228 17.0000 228 Fract: 49 Fract: 49 * 0+ 0 * 0+ 0 0 0 19.0000 17.0000 19.0000 17.0000 1 1 17.0000 1 1 1 17.0000 183 19.0000 83 19.0000 17.0000 17.0000 2 2 17.0000 1 2 2 17.0000 146 19.0000 46 19.0000 17.0000 17.0000 3 3 17.0000 1 3 3 17.0000 170 19.0000 70 19.0000 17.0000 17.0000 4 4 17.0000 1 4 4 17.0000 153 19.0000 53 19.0000 17.0000 17.0000 5 5 17.0000 1 5 5 17.0000 103 19.0000 03 19.0000 17.0000 17.0000 6 6 17.0000 6 6 17.0000 81 19.0000 81 19.0000 17.0000 17.0000 7 7 17.0000 7 7 17.0000 72 19.0000 72 19.0000 17.0000 17.0000

slide-47
SLIDE 47

47

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solving for Minimum Variation

8 8 17.0000 8 8 17.0000 88 19.0000 88 19.0000 17.0000 17.0000 9 9 17.0000 9 9 17.0000 69 19.0000 69 19.0000 17.0000 17.0000 10 10 17.0000 10 10 17.0000 69 19.0000 69 19.0000 17.0000 17.0000 11 11 17.0000 11 11 17.0000 77 19.0000 77 19.0000 17.0000 17.0000 12 12 17.0000 12 12 17.0000 73 19.0000 73 19.0000 17.0000 17.0000 13 13 17.0000 13 13 17.0000 68 19.0000 68 19.0000 17.0000 17.0000 14 14 17.0000 14 14 17.0000 99 19.0000 99 19.0000 17.0000 17.0000 15 15 17.0000 15 15 17.0000 98 19.0000 98 19.0000 17.0000 17.0000 16 16 17.0000 1 16 16 17.0000 128 19.0000 28 19.0000 17.0000 17.0000 17 17 17.0000 1 17 17 17.0000 140 19.0000 40 19.0000 17.0000 17.0000 18 18 17.0000 18 18 17.0000 95 19.0000 95 19.0000 17.0000 17.0000 * 19 1 * 19 1 0 17 0 17.0000 17.0000 .0000 17.0000 Gomory fractional c Gomory fractional cuts applied: 10 uts applied: 10 Times (seconds): Times (seconds): Input = 0.02 Input = 0.02 Solve = 16.844 Solve = 16.844 Output = 0.02 Output = 0.02 CPLEX 9.0.0: optimal integer CPLEX 9.0.0: optimal integer solution; objective 17 solution; objective 17 5624 MIP simplex iterations 5624 MIP simplex iterations 19 branch-and-bound nodes 19 branch-and-bound nodes

slide-48
SLIDE 48

48

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Summary of Results

Total Max Total same- vari- vari- Time Original ness ation ation Greedy 1762 3 45 seconds Quadratic 1744 2 39 4.7 min Min total variation 1706 1 17 14.4 min New Quadr continuous 1752 2 44 4.07 sec Quadr integer 1720 2 27 107 min * Min total variation 1706 1 17 16.8 sec

slide-49
SLIDE 49

49

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Scaling Up

Model is more complicated

! Rooms hold from 20–25 to 50–55 people ! Must avoid isolating assignments:

a person is “isolated” in a group that contains no one from the same location with the same or “adjacent” title

Problem is too big

! Aggregate people who match in all categories (986 people, but only 287 different kinds) ! Solve first for title and location only, then for refinement to department and sex ! Stop at first feasible solution to title-location problem

slide-50
SLIDE 50

50

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Full “Location-Rank” Model

set PEOPLE ordered; set PEOPLE ordered; param title {PEOPLE} symbolic; param title {PEOPLE} symbolic; param loc {PEOPLE} symbolic; param loc {PEOPLE} symbolic; set TITLE ordered; set TITLE ordered; check {i in PEOPLE}: title[i] in TITLE; check {i in PEOPLE}: title[i] in TITLE; set LOC = setof {i in PEOPLE} loc[i]; set LOC = setof {i in PEOPLE} loc[i]; set TYPE2 = setof {i in set TYPE2 = setof {i in PEOPLE} (title[i],loc[i]); PEOPLE} (title[i],loc[i]); param number2 {(i1, param number2 {(i1,i2) in TYPE2} = i2) in TYPE2} = card {i in PEOPLE: titl card {i in PEOPLE: title[i]=i1 and loc[i]=i2}; e[i]=i1 and loc[i]=i2}; set REST ordered; set REST ordered; param loDine {REST} param loDine {REST} integer > 10; integer > 10; param hiDine {j in REST} param hiDine {j in REST} integer >= loDine[j]; integer >= loDine[j]; param loCap := sum {j param loCap := sum {j in REST} loDine[j]; in REST} loDine[j]; param hiCap := sum {j param hiCap := sum {j in REST} hiDine[j]; in REST} hiDine[j]; param loFudge := ceil ((loCap less param loFudge := ceil ((loCap less card {PEOPLE}) / card {REST}); card {PEOPLE}) / card {REST}); param hiFudge := ceil ((card {PEO param hiFudge := ceil ((card {PEOPLE} less hiCap) / card {REST}); PLE} less hiCap) / card {REST});

slide-51
SLIDE 51

51

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(variables)

param frac2title {i1 in TITLE} param frac2title {i1 in TITLE} = sum {(i1,i2) in TYPE2} = sum {(i1,i2) in TYPE2} number2[i1,i2] / card {PEOPLE}; number2[i1,i2] / card {PEOPLE}; param frac2loc {i2 in LOC} param frac2loc {i2 in LOC} = sum {(i1,i2) in TYPE2} = sum {(i1,i2) in TYPE2} number2[i1,i2] / card {PEOPLE}; number2[i1,i2] / card {PEOPLE}; param expDine {j in REST} param expDine {j in REST} = if loFudge > 0 t = if loFudge > 0 then loDine[j] else hen loDine[j] else if hiFudge > 0 then hiDine[j] if hiFudge > 0 then hiDine[j] else (loDine[j] + hiDine[j]) / 2; else (loDine[j] + hiDine[j]) / 2; param loTargetTitle {i1 in param loTargetTitle {i1 in TITLE, j in REST} := TITLE, j in REST} := floor (round (frac2titl floor (round (frac2title[i1] * expDine[j], 6)); e[i1] * expDine[j], 6)); param hiTargetTitle {i1 in param hiTargetTitle {i1 in TITLE, j in REST} := TITLE, j in REST} := ceil (round (frac2title ceil (round (frac2title[i1] * expDine[j], 6)); [i1] * expDine[j], 6)); param loTargetLoc {i2 in param loTargetLoc {i2 in LOC, j in REST} := LOC, j in REST} := floor (round (frac2loc[i2] * expDine[j], 6)); floor (round (frac2loc[i2] * expDine[j], 6)); param hiTargetLoc {i2 in param hiTargetLoc {i2 in LOC, j in REST} := LOC, j in REST} := ceil (round (frac2loc[i2] * expDine[j], 6)); ceil (round (frac2loc[i2] * expDine[j], 6));

slide-52
SLIDE 52

52

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(variables, objective, assign constraints)

var Assign2 {TYPE2,REST} integer >= 0; var Assign2 {TYPE2,REST} integer >= 0; var Dev2Title {TITLE} >= 0; var Dev2Title {TITLE} >= 0; var Dev2Loc {LOC} >= 0; var Dev2Loc {LOC} >= 0; minimize Deviation: minimize Deviation: sum {i1 in TITLE} Dev sum {i1 in TITLE} Dev2Title[i1] + sum {i2 2Title[i1] + sum {i2 in LOC} Dev2Loc[i2]; in LOC} Dev2Loc[i2]; subject to Assign2Type subject to Assign2Type {(i1,i2) in TYPE2}: {(i1,i2) in TYPE2}: sum {j in REST} Assign2[i sum {j in REST} Assign2[i1,i2,j] = number2[i1,i2]; 1,i2,j] = number2[i1,i2]; subject to Assign2Rest {j in REST}: subject to Assign2Rest {j in REST}: loDine[j] - loDine[j] - loFudge

  • Fudge

<= sum {(i1,i2) in T <= sum {(i1,i2) in TYPE2} Assign2[i1,i2,j] YPE2} Assign2[i1,i2,j] <= hiDine[j] + hiFudge; <= hiDine[j] + hiFudge;

slide-53
SLIDE 53

53

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(constraints to define “variation”)

subject to Lo2TitleDefn subject to Lo2TitleDefn {i1 in TITLE, j in REST}: {i1 in TITLE, j in REST}: Dev2Title[i1] >= Dev2Title[i1] >= loTargetTitle[i1,j] - loTargetTitle[i1,j] - sum {(i1,i sum {(i1,i2) in TYPE2} Assign2[i1,i2,j]; 2) in TYPE2} Assign2[i1,i2,j]; subject to Hi2TitleDefn subject to Hi2TitleDefn {i1 in TITLE, j in REST}: {i1 in TITLE, j in REST}: Dev2Title[i1] >= Dev2Title[i1] >= sum {(i1,i2) in TYPE2} Assign2[i sum {(i1,i2) in TYPE2} Assign2[i1,i2,j] - 1,i2,j] - hiTargetTitle[i1,j]; iTargetTitle[i1,j]; subject to Lo2LocDefn {i2 in LOC, j in REST}: subject to Lo2LocDefn {i2 in LOC, j in REST}: Dev2Loc[i2] >= Dev2Loc[i2] >= loTargetLoc[i2,j] - loTargetLoc[i2,j] - sum {(i1, sum {(i1,i2) in TYPE2} i2) in TYPE2} Assign2[i1,i2,j]; Assign2[i1,i2,j]; subject to Hi2LocDefn {i2 in LOC, j in REST}: subject to Hi2LocDefn {i2 in LOC, j in REST}: Dev2Loc[i2] >= Dev2Loc[i2] >= sum {(i1,i2) in TYPE2} Assign sum {(i1,i2) in TYPE2} Assign2[i1,i2,j] - 2[i1,i2,j] - hiTargetLoc[i2,j]; iTargetLoc[i2,j];

slide-54
SLIDE 54

54

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(parameters for ruling out “isolation”)

set ADJACENT {i1 in TITLE} = set ADJACENT {i1 in TITLE} = (if i1 <> first(TITLE) then (if i1 <> first(TITLE) then {prev(i1)} else {}) union {prev(i1)} else {}) union (if i1 <> last(TITLE) then (if i1 <> last(TITLE) then {next(i1)} else {}); {next(i1)} else {}); set ISO = {(i1,i2) in TYPE2: (i2 <> "Unknown") and set ISO = {(i1,i2) in TYPE2: (i2 <> "Unknown") and ((number2[i1,i2] >= 2) or ((number2[i1,i2] >= 2) or (number2[i1,i2] = 1 and (number2[i1,i2] = 1 and sum {ii1 in ADJACENT[i1]: sum {ii1 in ADJACENT[i1]: (ii1,i2) in TYPE2} (ii1,i2) in TYPE2} number2[ii1,i2] > 0)) }; number2[ii1,i2] > 0)) }; param give {ISO} default 2; param give {ISO} default 2; param giveTitle { param giveTitle {TITLE} default 2; TITLE} default 2; param giveLoc {LOC} default 2; param giveLoc {LOC} default 2; param upperbnd {(i1,i2) in param upperbnd {(i1,i2) in ISO, j in REST} = ISO, j in REST} = min (ceil((number2[i1,i min (ceil((number2[i1,i2]/card {PEOPLE}) * h 2]/card {PEOPLE}) * hiDine[j]) + give[i1,i2], iDine[j]) + give[i1,i2], hiTargetTitle[i1,j] hiTargetTitle[i1,j] + giveTitle[i1], + giveTitle[i1], hiTargetLoc[i2,j] + giveLoc[i2], hiTargetLoc[i2,j] + giveLoc[i2], number2[i1,i2]); number2[i1,i2]);

slide-55
SLIDE 55

55

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

(constraints to rule out “isolation”)

var Lone {(i1,i2) in var Lone {(i1,i2) in ISO, j in REST} binary; ISO, j in REST} binary; subj to Isolation1 {(i1, subj to Isolation1 {(i1,i2) in ISO, j in REST}: i2) in ISO, j in REST}: Assign2[i1,i2,j] <= upper Assign2[i1,i2,j] <= upperbnd[i1,i2,j] * Lone[i1,i2,j]; bnd[i1,i2,j] * Lone[i1,i2,j]; subj to Isolation2a {(i1,i subj to Isolation2a {(i1,i2) in ISO, j in REST}: 2) in ISO, j in REST}: Assign2[i1,i2,j] + Assign2[i1,i2,j] + sum {ii1 in ADJACENT[i1]: (ii1,i sum {ii1 in ADJACENT[i1]: (ii1,i2) in TYPE2} Assign2[ii1,i2,j] 2) in TYPE2} Assign2[ii1,i2,j] >= 2 * Lone[i1,i2,j]; >= 2 * Lone[i1,i2,j]; subj to Isolation2b {(i1,i subj to Isolation2b {(i1,i2) in ISO, j in REST}: 2) in ISO, j in REST}: Assign2[i1,i2,j] >= Lone[i1,i2,j]; Assign2[i1,i2,j] >= Lone[i1,i2,j];

slide-56
SLIDE 56

56

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Success

First problem

! using OSL: 128 “supernodes”, 6.7 hours ! using CPLEX 2.1: took too long

Second problem

! using CPLEX 2.1: 864 nodes, 3.6 hours ! using OSL: 853 nodes, 4.3 hours

Finish

! Refine to individual assignments: a trivial LP ! Make table of assignments using AMPL printf printf command ! Ship table to client, who imports to database

slide-57
SLIDE 57

57

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #5

Clients can invent and change the rules as they wish Assignment of people is a social, not physical, problem

slide-58
SLIDE 58

58

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

“Oh, we forgot to mention . . .”

One more complication

! No group may have only 1 woman

Not a problem, though

! Women are between 18% and 22%

  • f every group in solution already sent!

. . . client’s ad hoc solutions must have been pretty bad

slide-59
SLIDE 59

59

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Solver Improvements

CPLEX 3.0

! First problem: 1200 nodes, 1.1 hours ! Second problem: 1021 nodes, 1.3 hours

CPLEX 4.0

! First problem: 517 nodes, 5.4 minutes ! Second problem: 1021 nodes, 21.8 minutes

CPLEX 9.0

! First problem: 560 nodes, 83.1 seconds ! Second problem: 0 nodes, 17.9 seconds

slide-60
SLIDE 60

60

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

More Recent Cases

Balanced series of assignments Sequence of workshop assignments Balanced class seat assignments

slide-61
SLIDE 61

61

Robert Fourer, Assigning People in Practice, CORS/INFORMS Int’l Meeting, Banff, May 16-19, 2004

Observation #6

Subsequent problems may get harder But they may just as well get easier