Rahul Mitra
- Total activity 10
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 0
- Subscriptions 3
Activity overview
Latest activity by Rahul Mitra-
Rahul Mitra created a post,
Round all the elements in a gurobi MVar
AnsweredI'm trying to set a gurobi MVar to a list of integers. In particular, in the code below model.addConstr(d1_dtheta == (d1 @ dtheta)) d1_dtheta is an MVar, d1 is a numpy matrix and dtheta is a guro...
-
Rahul Mitra commented,
Thank you! This was really helpful! Rahul
-
Rahul Mitra created a post,
Can I print values of integer variable during optimization?
AnsweredCurrently in my model, I have an integer variable, k. I can obviously print the value of k once the optimization is "complete". However, my model is fairly complex and never seems to converge. I've...
-
Rahul Mitra commented,
Hi Jaromil, I think your comments regarding the non-convexity and pre-solve make sense. They are not the exact same model, as one of them is an L-1 norm minimization and the other is a L-2 norm min...
-
Rahul Mitra commented,
Hi Jaromil, Sure thing, it's hard for me to share a small example as when the model is small, they both perform the same, as expected. It's when the model scales that I really notice the difference...
-
Rahul Mitra commented,
Hi Jaromil, Thanks for your response. I solved the issue by using auxiliary constraints. In particular, I set model.addConstr(diff_1 == mvar_a - mvar_b) and then, in my objective, I minimize diff...
-
Rahul Mitra created a post,
Matrix multiplication in objective function. "TypeError: 'MLinExpr' object is not subscriptable"
AnsweredHello, I'm trying to solve this mixed integer problem and running into issues in specifying my objective function. My code is below. #set the objective functionmodel.setObjective(sum((dtheta[i] - ...