Python Constrained Optimization Problem Example