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

How can I construct an optimization problem inside another optimization problem?

回答済み

コメント

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

    It is not possible to have one variable being attached to more than 1 model. What you could do is to introduce separate variables \(N_{m1}\), solve model \(\texttt{m1}\), extract the solution value for variable \(N_{m1}\) via its X attribute, and finally add a constraint setting \(N = X_{N_{m1}}\).

    Best regards, 
    Jaromił

    0

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