Currently, I'm using a primal-dual method to minimize a quadratic problem with simple linear constraints (specifically, x >= 0). For the termination condition, I'm currently using the standard: ie error "e" term must be less than a threshold value.
However, to compute the "e" term is relatively expensive, as I need to evaluate the full quadratic function. Is it possible to have a simpler/faster termination condition, such as one the following:
1) if the sum of all the changes in x is below a certain threshold, then terminate; or, 2) if the max change in x is below a certain threshold, then terminate?
Intuitively, that makes sense to me, but I've found that my intuition is wrong half the time with these minimization problems, so I'm not sure if my intuition is theoretically sound or not....
For the termination condition, I'm currently using the standard: ie error "e" term must be less than a threshold value.
Aren't you assuming, that the objective can be pushed to 0 here? How do you determine this threshold a-priori?
1) if the sum of all the changes in x is below a certain threshold, then terminate
2) if the max change in x is below a certain threshold, then terminate
You should look into the Karush–Kuhn–Tucker conditions (first-order necessary conditions for a solution)
Remark: your problem is a box-constrained QP which is actually simpler than inequality-constrained QP! This is important!
Now this might effect in some heavy theory-work followed by some implementation. Consider using tools already available!
Have a look at box-constrained QP-solvers (convex or non-convex; depending on your problem). These should be available and will save you trouble!
You could even use the nearly everywhere available LBFGS-B which might already hard to beat, if you give it gradients (opposed to numerical-differentiation). Although it's much more general, it's often very powerful! (in python, using scipy, using this would be a few lines)
L-BFGS-B is a limited-memory quasi-Newton code for bound-constrained optimization, i.e. for problems where the only constraints are of the form l<= x <= u.
There are probably other already available alternatives too. Trust Region Reflective and co.
(Side-note: i wonder how the evaluation-cost can be that costly, as you describe, compared to the other operations in your primal-dual (IPM?) algorithm)