This is something like assignment problem, we have 2 group of people, first contains $n$ person and second contains $m$ person. we have a matrix $C$ which is an $n \times m$ matrix and our goal is to find an assignment matrix $A$ which is again an $n \times m$ binary matrix (contains ones and zeros) and if $A_{ij}$ is $1$ it shows $i$-th person from first group has assigned to $j$-th person of second group, and maximize $\displaystyle\sum_{i}\sum_{j} C_{ij}A_{ij}$, subject to following constraints:
$$ 1)\;\; \forall i: \;\; \displaystyle\sum_{j} A_{ij} = 1 \\ 2)\;\; \forall j: \;\; \displaystyle\sum_{i} A_{ij} \le 2 $$
how should I solve this problem?
*how should we solve if we have another matrix $D$ and we also want $\displaystyle\sum_{i} D_{ij}A_{ij} \le constant$ ?