Error in addition of absolute values of variables.
回答済みHi,
I am trying to add the absolute values of 16 variables. But gurobipy is throwing the following error:
TypeError: unsupported operand type(s) for +: 'GenExprAbs' and 'GenExprAbs'
How can I sum up the absolute values of variables?
0
-
正式なコメント
As I mentioned in my reply in the support request, the typical way to do this is to use auxiliary variables. Please see How to add a constraint which is the absolute value is smaller than a constant? for a similar question and explanation.
-
正式なコメント
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 try Gurobot, our chatbot interface offering instant, expert-level support.
投稿コメントは受け付けていません。
コメント
2件のコメント