メインコンテンツへスキップ

Linear expression with MAX

回答済み

コメント

2件のコメント

  • 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

サインインしてコメントを残してください。