Re: Nonconvex nonlinear optimization problems
AnsweredI 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

Hi Dhiraj,
The API for nonlinear 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
Please sign in to leave a comment.
Comments
2 comments