added nlopt; also perform ybaseline before optimization to satisfy constraints