|
Project
|
The weight updater algorithm is responsible for updating the weight associated to each Criterion and the lambda (majority threshold) of the problem. The weight updater algorithm is divided in two main components (C++ classes): the LinearSolver and the WeightUpdater.
The weightUpdater is responsible of computing the constraint matrix and pass it to the linear solver before updating the MRSortModel with the new weights and lambda.
The datastructre of the matrix constraint is a 3-dimension boolean tensor. The first dimension represent a profile, se second an alternative and the third a criteria. Thus a constrain matrix is a tensor of dimension : n_prof x n_alt x n_crit.
For a specific profile and alternative, the booleans denote the presence or absence of the criterion in the constraint.
For example, given {w0, ..., w4} weights of 5 different criterion:
is represented by
The linear solver makes an interface between our algorithm and the way we solve the linear problem. Therefore, if at some point the way of solving the linear problem is changed (changing the library for example), no modification in the WeightUpdater class will be needed.
The linear solver takes as input the constraint matrix and the variables of the problem to solve, instantiates a model solver and computes the new weights and lambda.
Delta: small value to transform strict equalities into non strict ones - default = 0.0001. AlternativesPerformance - dataset of the global problem Config - Global config of the application
min(sum(x_ap+y_ap, for a in {0,…,n_alt}))