Maximizing a set of data with constraints Eight athletes 1, 2, 3, 4, 5, 6, 7, and 8 participate as a team in a multidisciplinary competition.
The four disciplines involved are labeled A, B, C, and D.
The participation constraints for a team are:


*

*Each discipline must have four athletes.

*Each athlete must compete in two different disciplines.  


Athletes' performances in their assigned disciplines are given scores between 0 and 7 inclusive (That is, an athlete may score a minimum of 0 and a maximum of 14 points).
Each athlete has an expected score for each discipline. Given the four expected scores (one per discipline) for each of the eight athletes, how does the team maximize its expected score while meeting the participation constraints?
 A: Let $\mathbb{D} := \{A,B,C,D\}$ be the set of disciplines and $\mathbb{A}:=\{1,...,8\}$ be the set of athletes.
Let $E_{ij}$ be the expected score for athelete $i$ in discipline $j$. 
Define $x_{ij}$ as a binary variable defined as follows:
$$x_{ij} = \cases{1,~ \text{if athlete i competes in discipline j}\\
0, \text{ otherwise}}$$
The objective funtion that is to be maximized is $\sum_{i \in \mathbb{A}}\sum_{j \in \mathbb{D}} x_{ij}E_{ij}$. 
Now we have to add the constraints. The first constraint requires us to have four athletes in each discipline. So, for every discipline $j$ the following must hold:
$$\sum_{i \in \mathbb{A}} x_{ij} =4$$
This makes sure that for discipline $j$ exactly 4 players are chosen from the set of athletes.
Constraint 2 requires that each athlete $i$ competes in exactly two discipline. Hence,
$$\sum_{j \in \mathbb{D}} x_{ij} =2$$
I am not sure about the last constraint as there is not enough information about it yet. I will include it as soon as you edit the question with more information. So far, the optimization problem that needs to be solved is the following:
$$\max \sum_{i \in \mathbb{A}}\sum_{j \in \mathbb{D}} x_{ij}E_{ij}$$
$$s.t. \sum_{i \in \mathbb{A}} x_{ij} =4 ~~~~~\forall j \in \mathbb{D}$$
$$\sum_{j \in \mathbb{D}} x_{ij} =2 ~~~~~\forall i \in \mathbb{A}$$
$$x_{ij} \in \{0,1\} ~~~~~\forall i \in \mathbb{A}~~\forall j \in \mathbb{D}$$
