An Optimization Study on the Control of NOx and Particulate Emissions from Diesel Engines