-
|
I have a code-base where I often use What is the recommended approach to add terms to constraints now? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
@MBradbury may know this one |
Beta Was this translation helpful? Give feedback.
-
|
My advice would be to treat the constraint as immutable, if you need to change it you can do: If you really want to modify the constraint with
@pchtsp I think making |
Beta Was this translation helpful? Give feedback.
My advice would be to treat the constraint as immutable, if you need to change it you can do:
If you really want to modify the constraint with
addterm, just access the underlying LpAffineExpression:addtermreally seems like an implementation detail, so really should be avoided. For example,LpAffineExpression.addInPlaceis much more flexible. AlsoaddInPlaceis implement…