Logic constraint function for 'round' function
조회 수: 8 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Precision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!