Dear IBM Community,
Thank you so much for your time reading this!
I'm using docplex in order to solve a model in Python. I would like to add a constraint as follows:
where x
i is a binary variable in our Model, and M
i,j is a matrix of zeros and ones (it is a constant). x = x
1, x
2, ... x
m should be a list of zeros and ones corresponding to the above constraint. The addition and multiplication operations are actually bitwise addition and multiplication (computed with operators ^ and & in Python).
I'm having difficulties in understanding how I should write this expression. Specifically:
- It is supported to use ^ and & operators or we have a workaround for this?
- It is mandatory to have this expression written inline or we have other methods to pass this expression?
Can you please let me know what is a good approach to write this constraint?
Thank you!
------------------------------
Andrada Denisa
------------------------------
#DecisionOptimization