Qiran Wu

  • Gurobi-versary
  • First Comment
  • First Question
  • Total activity 6
  • Last activity
  • Member since
  • Following 0 users
  • Followed by 0 users
  • Votes 0
  • Subscriptions 1

Activity overview

Latest activity by Qiran Wu
  • Qiran Wu commented,

    Great! Thank you!

  • Qiran Wu commented,

    Hi Jaromił,   Model.write() is helpful, Thank you! For this constraint,  y <= c*(1-x) what I want is  y[0] <= c[0]*(1-x[0])y[1] <= c[1]*(1-x[1])y[2] <= c[2]*(1-x[2])... I know I can write  m.addCon...

  • Qiran Wu commented,

    Thanks, Jaromił. This works. And I want to know if Gurobipy supports broadcast and element-wise multiplication. For example, I want to add a constraint m.addConstr(y <= c*(1-x)) where `y` and `x` a...

  • Qiran Wu commented,

    Hi Jaromił,   I forgot to specify in the last layer the `W`'s shape is `(50,)`. Sorry for the misleading. Hope this code makes it more clear. output = m.addVar()m.addConstr(W[2] @ y[2] + b[2] == ou...

  • Qiran Wu created a post,

    Incompatible dimensions in Python

    Answered

    Hi, I'm using Gurobi in Python to solve a Mixed Integer Programming. This is a reformulation of a Neural Network problem.  My `x` is a 1-D vector of 200 variables. The first layer has 50 neurons.  ...