added functions to set and get the optimization result.

These functions will be used when the evaluation() is invoked.
If the evaluation result is determined, evaluation() can return
it immediately without the actual evaluation.