To specify an optimization problem one first defines the optimization variables (see section 9.1), and then defines the objective and constraint functions using linear operations (vector addition and subtraction, matrix-vector multiplication, indexing and slicing) and nested evaluations of max(), min(), abs() and sum() (see section 9.2).