You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a variable using an arithmetic expression, the variable would be more identifiable in output if it could be named for a problem domain concept.
Expected behavior
ArExpression.intVar accepts an optional name argument, that is used instead of the generated name.
Actual behavior
Currently ArExpression.intVar implementations generate a name based on the arithmetic operator being used, which makes it hard to trace in output.
Context
When using a model with multiple arithmetic constraints using the same arithmetic operator, it is unclear in any output which variable was generated by which constraint.
The text was updated successfully, but these errors were encountered:
So, inputing a String to this method will replace sum_exp or sub_exp by the given name (or a default one, even less clear if none is given). I can live with that.
What I'm not clear with is the calls to e1.intVar(); and e2.intVar(); at the beginning of the method.
When e1 and e2 were created outside (like in my example) there is problem, but what if one of those is an expression itself. Like:
In that case, no name can be passed to y.sub(w) which will, thought, be turned into an IntVar on the call to intVar() on z.
Now, I'm ok with adding a new API with an optional name but internal calls will still rely on default naming and I'm afraid the lack of clarity remains or even increases.
What do you think ?
When creating a variable using an arithmetic expression, the variable would be more identifiable in output if it could be named for a problem domain concept.
Expected behavior
ArExpression.intVar accepts an optional
name
argument, that is used instead of the generated name.Actual behavior
Currently ArExpression.intVar implementations generate a name based on the arithmetic operator being used, which makes it hard to trace in output.
Context
When using a model with multiple arithmetic constraints using the same arithmetic operator, it is unclear in any output which variable was generated by which constraint.
The text was updated successfully, but these errors were encountered: