Optimization interface added.

Added the file to implement the optimization interface and the test for optimization interface.