Piecewise Linear when objective function depends on two variables
AnsweredHi,
I've been using PWLObj for my model when the nonlinear function depends on only a single decision variable. My current function is f(x) = u*x+k*sigma*sqrt(x).
Now, I had to adapt the model and the function depends on two decision variables,
e.g f(x, t)=u(t)*x+k*sigma(t)*sqrt(x).
Is there any way to set a PWLObj for a tuple of decision variables?
Thanks a lot for any help.
Cheers,
Janis

Hello Janis,
currently (v9.0) we have no automated mechanism that enables the multivariate PW linear objectives. One option is to build one yourself using, say, triangulation of the 3D surface corresponding to the function graph (only for completeness, I am adding this link, https://en.wikipedia.org/wiki/Surface_triangulation ). Here you would keep track of which "supporting triangle" you are in using binary inductors.
However, starting with the present version we also support general bilinear expressions, and pw linear constraints (https://www.gurobi.com/documentation/9.0/refman/constraints.html) so this could be another route. Namely, you can introduce an auxiliary pair of variables, (t', x'), and connect those to nonlinear expressions using pw approximation, while the objective would have a bilinear term x' * t'.
Personally I would start with the later approach as it is less labour expensive, to see if this would suffice.
Hope this helps.
0
Please sign in to leave a comment.
Comments
1 comment