Function optimizing matrix under the constraints (vector)
Afficher commentaires plus anciens
I'm having problem with finding a function that optimizes a matrix under specific constraints. In my task I have two matrices (K and C) of the same dimensions (SxP).The K matrix has test results in the range of 0 to 10 while Matrix c is a zero-one matrix, selecting the best result in the matrix K. The C matrix has two constraints:
a)

Where SP is the vector representing the maximum number of selected results in a given row
b)

My main task is to choose the best results in the matrix:

Réponses (1)
Once you have your objective and constraints expressed as matrix-vector multiplications, the problem is a straightforward application of intlinprog().
Summation along columns of C can be expressed as a matrix-vector multiplication A*C(:) where A=kron(eye(S),ones(1,P)). Summation along rows can be expressed the same way with A=kron(ones(1,S),eye(P)). The double summation for Q can be epxressed can be expressed K(:).'(C(:)).
2 commentaires
Torsten
le 18 Mai 2017
A = [1 1 1 0 0 0 ; 0 0 0 1 1 1]
Best wishes
Torsten.
Catégories
En savoir plus sur Optimization Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


