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

Upper bound on summation is to be optimised

回答済み

コメント

5件のコメント

  • 正式なコメント
    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 Sourav,

    Could you elaborate a bit more on your intention?

    Do you want to model something like

    \[\begin{align*}
    a &\leq \sum_{i=1}^{c_j} f_i \\
    \sum_j c_j &= 100
    \end{align*}\]

    So, do you want to model a sum where the upper bound index is an optimization variable?

    Best regards,
    Jaromił

    0
  • SOURAV DAS
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Jaromił, 

    Thanks for replying to my query. These are the exact constraints which you have mentioned.

    Cj is a decision variable and optimal values of Cj s for each j will be decided by the model. So, yes the upper bound index is an optimization variable. 

    Also, here the function can be best expressed by fij, as the value is to be calculated for each j.

    The function fij is multiplication of one binary variable and one continuous variable. fi = Zjc*P(i) 

    Zjc = 1 if Cj units are there in j ; and 0 otherwise. 

    P(i) is a coefficient dependent on value of i. I hope I could explain it properly, if you still have any issue with my explanation kindly tell me. 

    Best Regards,

    Sourav

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Sourav,

    In this case, you should have a look at the Community post Is Gurobi able to handle a decision variable in the index as a boundary in a sum. This should answer your question.

    Best regards,
    Jaromił

    1
  • SOURAV DAS
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Jaromił,

    Thanks for your response. I will definitely go through the post you suggested, and would ask you if any further clarification is needed. 

    Best Regards

    Sourav 

    0

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