Using Activity Analysis to Identify Relevant Constraintsin Optimal Reasoning