Xin Zhi

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

Activity overview

Latest activity by Xin Zhi
  • Xin Zhi commented,

    import pandas as pd data = { "Column3": [2, 56, 3, 3, 2, 6, 8, 8, 43, 32, 2, 3, 6, 34, 2, 6], "Y1": [1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1], "Column4_Vars": [1, 1, 1, 1,...

  • Xin Zhi commented,

    Hi, Yes your understanding is correct, but I didn't design the numerical example such that it adds up. but it is what you described

  • Xin Zhi commented,

    so in the end I need to find X and Column4_Vars at the same time  

  • Xin Zhi commented,

    Hi Ronald, Thanks a lot for your reply. My problem becomes more complicated than this. Since, Column4_Vars can take values in 1,2,3,4, in the end I have four subsets based on this problem.  for exa...

  • Xin Zhi commented,

     

  • Xin Zhi created a post,

    Gurobi add an if condition

    Ongoing

    The following is my code, what I wanted to add is that: indices named 'idx' such that column4 == 1, add constraint such that the sum([df.loc[i, "Column3"] * Y_actual[i] for i in idx]) == 6. The fo...