I would like to define the following constraint in Pyomo $$W^\top{\bf 1}\le\hat w=\begin{bmatrix}\hat{w}_1&\hat{w}_2&\ldots&\hat{w}_N\end{bmatrix}^\top$$ where $W$ is a $2\times4$ matrix. Can I define the scalar constraints using the entries of $\hat w$ and put these constraints as a list in Pyomo?
## First constraint START ##
m.c1 = []
for k in range(N):
c1_exp = np.matmul((W_var).T,ones_W)[k][0] <= w_hat[k][0]
m.c1.append(Constraint(expr= c1_exp))
print(m.c1[k])
## First constraint END ##
The output is as follows:
Does this mean the constraints are created correctly?