# Surya Narayanan Hari

• Total activity 25
• Last activity
• Member since
• Following 0 users
• Followed by 0 users
• Subscriptions 7

## Activity overview

Latest activity by Surya Narayanan Hari
• Surya Narayanan Hari created a post,

### @ operator for 2 Mvars

Is it possible to do the following with broadcasting in a constraint? (A and B are 2D MVars) $$A @ B \leq \overrightarrow{1}$$

• Surya Narayanan Hari created a post,

### Division between float and grb variable

I am trying to add a constraint on the inverse of the variable of the form  $$1/x[i, j] + a^Ty + b \leq c$$ but I get the message that div does not support float and MVar. Is this currently suppor...

• Surya Narayanan Hari commented,

Hi, it did. Thank you for helping.

• Surya Narayanan Hari commented,

Sure,    x = 4 y = 3 gurobi_model = gp.Model("price_mechanism") p = gurobi_model.addMVar((y, 1), name='p') m = gurobi_model.addMVar((x, y), name='m') u = np.array([[100, 1, 0], [0, 1, 100], [0...

• Surya Narayanan Hari created a post,

### TypeError: only size-1 arrays can be converted to Python scalars

I am trying to index into a Vector p, which is an MVar to perform the following operation.  p[j] * u[i] @ m[i] Note u is a scalar matrix, and m is a matrix of variables.  However, I get the error m...

• Surya Narayanan Hari commented,

I tried doing 1 / p_inv[i] but division is not supported between an int and an MVar. I am using version 9.0.2. Can you suggest if it is not supported for MVars yet?

• Surya Narayanan Hari created a post,

### Modeling quadratic constraints in different variables

I saw on the website that one can write quadratic constraints of the form x*x + y*y <= c, but Is it possible to write a constraint of the form x^T y <= c where x and y are vectors?

• Surya Narayanan Hari created a post,