Add flags to use optimal value

Now there is the option to use the optimal values, instead of the exit flag.
The use of the optimal values is described in the article
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.9388