I am studying Cplex CP in Python, and I have two integer variables x and y.
I do some calculations and I find x's value, for example:
y = ..some calculations..
x = 3600 / y
I want to do this, If the x is lower than the 200(limit of x), x is 3600 / y. But, If the x is higher than the 200, x is 200.
I tried these expressions:
1:
((x >= limit_x) == limit_x ) or ((x <= limit_x) == 3600 / y )
1.revised:
((x >= limit_x) == limit_x ) and ((x <= limit_x) == 3600 / y )
2:
x == 3600 / y
x <= limit_x
3:
(x <= limit_x) == 3600 / y
I couldn't find any solution. I need your bits of help.
Best regards,