How to create constraints for Mixed integer linear problem?
You have the constraint:

$\sum_{k=t}^{t+H_{i,j}}$ $(x_{t,i,j}+y_{t,i,j}+z_{t,i,j})$ $\geq$ $H_{i,j} (x_{t,i,j}+y_{t,i,j}+z_{t,i,j})$

I presume your iteration variable is $t$. In that case this says that the amount of energy used in the task is at least the expected amount of energy based on its first slot multiplied by task length. This doesn't guarantee using correct type of energy etc.

Assuming you use all required types of energy in the first slot of the task and that you need to use exactly two of them, you should have the following:


Exactly two types of energy used in first slot:


$$x_{t, i, j} + y_{t, i, j} + z_{t, i ,j} = 2$$


If you use some energy in first slot, you need to use it until the end of the task, so in each step variable indicating use of some energy type has the same value as in the first step of the task:


$$ \forall_{t'=t}^{t + H_{i,j}} x_{t', i, j} = x_{t, i, j} $$

Same goes for $y$ and $z$ variables.