Upper bound on summation is to be optimised
回答済みHi,
I have a constraint like
a < = (summation from 1 to c[j]) f(j) # constraint
where
summation of c[j] = 100 (say) for all j # constraint
So, basically I need to find the optimal number of c for each j such that total c = 100. I have tried some ways but it is not clear till now. Any idea or help on how to model this condition will be highly appreciated. Thanks,
With Regards
Sourav
-
正式なコメント
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?. -
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 -
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 -
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 -
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
投稿コメントは受け付けていません。
コメント
5件のコメント