Re: Non-convex non-linear optimization problems
回答済みI have one query regarding the use of softmax function into my gurobi model. For example, I want to add constraint like
Pij[i, j] = exp(-theta[i]*T[i,j] + beta_dash[i,j]*V[i])/(sum(exp(-theta[l]*T[l,j] + beta_dash[l,j]*V[l]) for l in range(0,n)) for i in range(0,n) for j in range(0,m)
into my gurobi model. The question is how do i do that?
0
-
正式なコメント
This post is more than two 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. -
Hi Dhiraj,
The API for non-linear functions is grouped under "General constraints" in our documentation. For composite functions like the one you describe, you would add auxiliary variables for intermediate results, e.g. have a variable to represent -theta[i]*T[i,j]+beta_dash[i,j]*V[i] and then another one to calculate the exp() of that first auxiliary variable.
Kind regards,
Ronald0 -
Thanks Ronald van der Velden. It was quite helpful and now I am able to solve the issue.
Best,
Dhiraj
0
投稿コメントは受け付けていません。
コメント
3件のコメント