This is the resource allocation of Bank TTServices with 4 managers. Each manager is responsible for 20 servicecenters. Each manager can request the manpower of supervisors to run the TTServices. The maximum numbers of supervisor is 12 for each manager. However mangers have a priority right to ask for more resources to run TTServices based on their previous sales performance and their present sales target weight.

library(prioritizr)
library(gurobi)
library(Matrix)

The Multi-objective Optimization with Gurobi :

Define Primitive Data

nmanager = 4
servicecenter = 20
nsupervisor = 12
SetObjPriority = c(3, 2, 5, 1)
SetObjWeight = c(1, 0.45, 1.25, 2)
TTsevice = list(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0), c(0, 
    1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1), c(0, 1, 0, 1, 1, 0, 
    1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0), c(0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 
    1, 0, 0, 0, 1, 1, 1, 0, 0))

Initialize Model

model = list()
model$modelsense = "max"
model$modelname = "multiobj"

Set Binary Variables

model$vtype = "B"
model$lb = 0
model$ub = 1
model$varnames = paste(rep("SCl", servicecenter), 1:servicecenter, sep = "")

Build Constraint Matrix

model$A = spMatrix(1, servicecenter, i = rep(1, servicecenter), j = 1:servicecenter, 
    x = rep(1, servicecenter))
model$rhs = c(nsupervisor)
model$sense = c("<=")
model$constrnames = c("nsupervisor")

Set Multi-Objectives

model$multiobj = list()
for (m in 1:nmanager) {
    model$multiobj[[m]] = list()
    model$multiobj[[m]]$objn = TTsevice[[m]]
    model$multiobj[[m]]$priority = SetObjPriority[m]
    model$multiobj[[m]]$weight = SetObjWeight[m]
    model$multiobj[[m]]$abstol = m
    model$multiobj[[m]]$reltol = 0.05
    model$multiobj[[m]]$name = sprintf("TTsevice%d", m)
    model$multiobj[[m]]$con = 0
}

Save Model

gurobi_write(model, "multiobj_R.lp")
NULL

Set Parameters

params = list()
params$PoolSolutions = 100

Optimize The Model

gurobi(model, params)
Gurobi Optimizer version 9.0.0 build v9.0.0rc2 (win64)
Optimize a model with 1 rows, 20 columns and 20 nonzeros
Model fingerprint: 0xf7aa4168
Variable types: 0 continuous, 20 integer (20 binary)
Coefficient statistics:
  Matrix range     [1e+00, 1e+00]
  Objective range  [1e+00, 1e+00]
  Bounds range     [1e+00, 1e+00]
  RHS range        [1e+01, 1e+01]

---------------------------------------------------------------------------
Multi-objectives: starting optimization with 4 objectives ... 
---------------------------------------------------------------------------

Multi-objectives: applying initial presolve ...
---------------------------------------------------------------------------

Presolve time: 0.00s
Presolved: 1 rows and 20 columns
---------------------------------------------------------------------------

Multi-objectives: optimize objective 1 (TTsevice3) ...
---------------------------------------------------------------------------

Found heuristic solution: objective 11.2500000

Explored 0 nodes (0 simplex iterations) in 0.00 seconds
Thread count was 1 (of 8 available processors)

Solution count 1: 11.25 

Optimal solution found (tolerance 1.00e-04)
Best objective 1.125000000000e+01, best bound 1.125000000000e+01, gap 0.0000%
---------------------------------------------------------------------------

Multi-objectives: optimize objective 2 (TTsevice1) ...
---------------------------------------------------------------------------


Loaded user MIP start with objective 7

Presolve removed 2 rows and 20 columns
Presolve time: 0.00s
Presolve: All rows and columns removed

Explored 0 nodes (0 simplex iterations) in 0.00 seconds
Thread count was 1 (of 8 available processors)

Solution count 2: 12 

Optimal solution found (tolerance 1.00e-04)
Best objective 1.200000000000e+01, best bound 1.200000000000e+01, gap 0.0000%
---------------------------------------------------------------------------

Multi-objectives: optimize objective 3 (TTsevice2) ...
---------------------------------------------------------------------------


Loaded user MIP start with objective 1.75

Presolve removed 3 rows and 20 columns
Presolve time: 0.00s
Presolve: All rows and columns removed

Explored 0 nodes (0 simplex iterations) in 0.00 seconds
Thread count was 1 (of 8 available processors)

Solution count 2: 2.25 

Optimal solution found (tolerance 1.00e-04)
Best objective 2.250000000000e+00, best bound 2.250000000000e+00, gap 0.0000%
---------------------------------------------------------------------------

Multi-objectives: optimize objective 4 (TTsevice4) ...
---------------------------------------------------------------------------


Loaded user MIP start with objective 16

Presolve removed 4 rows and 20 columns
Presolve time: 0.00s
Presolve: All rows and columns removed

Explored 0 nodes (0 simplex iterations) in 0.00 seconds
Thread count was 1 (of 8 available processors)

Solution count 1: 16 

Optimal solution found (tolerance 1.00e-04)
Best objective 1.600000000000e+01, best bound 1.600000000000e+01, gap 0.0000%

---------------------------------------------------------------------------
Multi-objectives: solved in 0.00 seconds, solution count 4
$status
[1] "OPTIMAL"

$runtime
[1] 0.002990723

$itercount
[1] 0

$baritercount
[1] 0

$nodecount
[1] 0

$objval
[1] 11  8  7  8

$x
 [1] 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0

$pool
$pool[[1]]
$pool[[1]]$objval
[1] 11  8  7  8

$pool[[1]]$xn
 [1] 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0


$pool[[2]]
$pool[[2]]$objval
[1] 11  9  8  8

$pool[[2]]$xn
 [1] 0 1 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0


$pool[[3]]
$pool[[3]]$objval
[1] 12  7  7  6

$pool[[3]]$xn
 [1] 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0


$pool[[4]]
$pool[[4]]$objval
[1] 7 5 9 5

$pool[[4]]$xn
 [1] 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 1 0 0



$slack
[1] 0