mpec with optimization algorithm