Saeid Ghafouri

  • Gurobi-versary
  • Curious
  • Conversationalist
  • Total activity 22
  • Last activity
  • Member since
  • Following 0 users
  • Followed by 0 users
  • Votes 0
  • Subscriptions 8

Activity overview

Latest activity by Saeid Ghafouri
  • Saeid Ghafouri created a post,

    cast multiplication of floats to integer

    Answered

    Is there a way to cast a multiplication (of two floating points) result to integer inside a gurobi constraint definition?

  • Saeid Ghafouri commented,

    Hi, Thank you for your response, It was very helpful. I faced another problem implementing that. Actually, instead of 0 we want check_v to be 1 if both the conditions (v > 0 and |v-p| > 0) are true...

  • Saeid Ghafouri created a post,

    How to add conditions in objective functions?

    Answered

    Hi Gurobi team, I want to implement some conditions in my objective function. I know adding conditions to constraints is possible through addGenConstrIndicator() but I don't know how I can add cond...

  • Saeid Ghafouri created a post,

    How to check conditional constraints added to the model?

    Answered

    Hi Gurobi Community, I want to know how I can check constraints like https://www.gurobi.com/documentation/current/refman/py_model_agc_indicator.html in my model using something like model.disply() ...

  • Saeid Ghafouri commented,

    Just a quick fix to the above example, what I want as the constraint is the following (I want it to equal to two instead one - that I have in the above): constr = model.addConstr((x + y == 2) >> (z...

  • Saeid Ghafouri created a post,

    Using indicator constraint with two variables

    Answered

    Hi Gurobi team, I want to use the sum of two binary decision variables (when their sum equals to one) as the condition of Model.AddGenConstrIndicator https://www.gurobi.com/documentation/current/re...

  • Saeid Ghafouri commented,

    Hi Simon, Thank you for your response. I have a set of constants with different values depending on the chosen value for variable x, exactly like the above case, for now I have stored them in a dic...

  • Saeid Ghafouri commented,

    Hi Jaromil, Thank you! That's exactly what I was looking for. Best, Saeid

  • Saeid Ghafouri created a post,

    How to use Gurobi variables as a dictionary index in Gurobipy

    Answered

    Hello Gurobi team, I want to model a problem that one of my variables needs to be used as an index of a dictionary in my constraints. Here is a minimal code that shows an example situation: import ...

  • Saeid Ghafouri commented,

    Hi Jaromil, Thank you for your answer. Actually, that's not what I'm looking for. What I want is that for a single variable like x I want all its values be selected from a set of values like e.g.  ...