and returns the solution vector. Q and P are assembled
form the cost termss, while A, b, Aeq and beq are assembled
from the constraint terms, with inequality terms contributing
to A and b and equality terms contributing to Aeq and beq.
costTerms - terms used to assemble Q and p
constraintTerms - terms used to assemble A, b, Aeq and beq.