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

How to model exponential relations between two variables?

回答済み

コメント

2件のコメント

  • 正式なコメント
    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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi Jessica,

    The default lower bound for variables in Gurobi is set to 0. However, in the exponential formulation, the variable \(\texttt{help_2}\) can become negative. Thus, setting

    help_2 = m.addVar(vtype=GRB.CONTINUOUS, name="help_2", lb=-GRB.INFINITY)

    should resolve the issue. Additionally, you should set an upper bound on variable \(\texttt{price}\). This is because a piecewise-linear approximation can only be performed correctly, if there are finite bounds given. Setting an upper bound of \(100\) for variable \(\texttt{price}\) seems good enough. 

    Best regards, 
    Jaromił

    0

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