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

Non-linear problem with non_linear constraints

回答済み

コメント

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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Hi Bruna,

    You can set the linear part of quadratic constraints via the \(\texttt{q}\) vector, cf. The model argument. In the bilinear example, you could set the linear part of the bilinear equality via

    m.quadcon(2).q = [1,2,3];

    Also, is it possible to have both bilinear objective function and constraints?

    Yes, you can set the \(\texttt{Q}\), \(\texttt{obj}\), and \(\texttt{quadcon}\) fields.

    how should I build the model? 

    gurobi_write(model, 'qcp.lp');or
    gurobi_write(model, 'qp.lp');
    ?

    The \(\texttt{gurobi_write}\) function writes an lp file and does not build it. Model building takes place before the \(\texttt{gurobi_write}\) function is called.

    Best regards, 
    Jaromił

    0

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