Hello,

I am trying to use CVXR to solve my optimization problem, the code I have written is :

```
w = Variable(nrow(sigma))
n = Int(nrow(pweights))
objective = Minimize(quad_form(w,sigma-diag(specRisk^2)))
constraints1 = list(w+maxTradeSize*n >= pweights$pctEquity, #Constraint 1
w-maxTradeSize*n <= pweights$pctEquity, #Constraint 2
w*sign(pweights$pctEquity) >= 0, #Constraint 3
sum_entries(n)<=numTrades, #Constraint 4
sum_entries(sign(pweights$pctEquity)*w)<=1.01*grossExposure, #Constraint 5
sum_entries(sign(pweights$pctEquity)*w)>=.99*grossExposure, #Constraint 6
quad_form(w,sigma) <= volTarget, #Constraint 7
n<=1, #Constraint 8
n>=0) #Constraint 9
problem = Problem(objective, constraints1)
result <- psolve(problem, MAXIT=as.integer(2000))
result$status
```

This gives me the status as optimal but when I check the output Constraint 7 is not satisfied at all.

I Tried the following code with lesser constraints (Here constraint 7 from the previous code has been made 1st) :

```
w = Variable(nrow(sigma))
n = Int(nrow(pweights))
objective = Minimize(quad_form(w,sigma-diag(specRisk^2)))
constraints2 = list(quad_form(w,sigma) <= volTarget, #Constraint 1
sum_entries(sign(pweights$pctEquity)*w)<=1.01*grossExposure, #Constraint 2
sum_entries(sign(pweights$pctEquity)*w)>=.99*grossExposure) #Constraint 3
problem = Problem(objective, constraints1)
result <- psolve(problem, MAXIT=as.integer(2000))
result$status
```

This gives me an optimal output with the constraint being satisfied. I can not seem to figure out what the issue is.

Any help on this would be highly appreciated.