I needed to create the VarRef::ONE variable in order to fix all issues.
In particular, it was not possible to return an InvalidUpdate in the set_ub() function.
The InvalidUpdate needs a literal which is formed with the SignedVar and the upper bound.
However, in the case of a constant term, there was no variable and so no SignedVar.
With this new variable always equals to 1, all terms of a linear sum can be treated the same way.
I needed to create the
VarRef::ONE
variable in order to fix all issues.In particular, it was not possible to return an
InvalidUpdate
in theset_ub()
function. TheInvalidUpdate
needs a literal which is formed with theSignedVar
and the upper bound. However, in the case of a constant term, there was no variable and so noSignedVar
.With this new variable always equals to 1, all terms of a linear sum can be treated the same way.