### 6.6.9 Converting box constraints from matrix to interval form

The box_constraints command can convert bounds of given variables from the matrix form to interval form.

- box_constraints takes two mandatory arguments:
  - vars, a list of variables [x1,x2,…,xn].
  - bnds, a matrix with n rows and two columns in which the kth row contains the lower and upper bound lk and uk of xk, respectively.
- box_constraints(vars,bnds) returns (x1=l1..u1,x2=l2..u2,…,xn=ln..un), i.e. the variables and their ranges contained in a single sequence.

#### Example

box_constraints([x,y],[[-2,2],[-5,5]])

x=−2 .. 2,y=−5 .. 5 |  |  |  |  |  |  |  |  |  |