added chebpack and nlopt code to Optimize.c