Skip to main content

Linear expression with MAX

Answered

Comments

2 comments

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Shesha,

    This can be done with the help of some auxiliary variables.

    • Define auxiliary variables Z[i][j], add constraints Z[i][j] = XXX[i][j] +YYY[i][j] *W[i].
    • Define another auxiliary variable ZZZ, and set it to max of Z[i][j]  variables using the general constraint helper functions max_()
    • If you want the max value to be at most KEYWIDTH, set the upper bound of the ZZZ variable to KEYWIDTH.

    Best regards,
    Simran

    0
  • Shesha Sreenivasamurthy
    Curious
    Conversationalist

    Thanks a lot for the information

    0

Please sign in to leave a comment.