A look at the vector a, should make this problem much easier to solve.
So your objective function becomes
and your constraints are only the ones that apply to the variables in the objective function.
for
I am not sure how you're supposed to solve the problem, but I'm pretty sure this set up is correct.