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

There may be a bug for "addGenConstrLog"

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Silke Horn
    • Gurobi Staff

    The logarithm function only takes positive arguments. Hence the x-variable may not be negative here.

    0
  • 冠冠 李
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks for your answer.

    Although x is free, I have a constrait

    model.addConstrs(Cost_Non[i]-(Cost_Tra[i]+C_e[i])>=0 for i in range(N_i) )

    to satisfy x>=0. However, it doesn't work on "x". I'm confused on it.

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    The check whether the variable \(x\) in \(\log(x)\) is \(\geq 0\) is done before the presolving step. Thus, it is required to explicitly set the lower bound of the \(x\) variable to 0. Moreover, it is a good modelling style to provide all bounds they are known.

    Best regards,
    Jaromił

    0

投稿コメントは受け付けていません。