Logic constraint function for 'round' function
7 views (last 30 days)
Show older comments
Hello,
I am solving an optimisation problem. And I have a constraint (x-round(x))*(y-round(y))=0, which means, at least one variable of x and y should be Integer. I would like to introduce other variables to force it. The logic is as follows: -100*b1<=x-e1<=100*b1, -100*b2<=y-e2<=100*b2, b1+b2<=1; where e1 and e2 are integers and b1 and b2 are binary variables.
If I use this for MIQP solver, it works. But it just takes a long time because of e1 and e2 have a large integer options from 1 to 10. Therefore, I would like to ask whether there are other logic constraints to describe 'round' function to reduce the size of the problem.
Best
0 Comments
Answers (0)
See Also
Categories
Find more on Precision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!