Logic constraint function for 'round' function

7 ビュー (過去 30 日間)
Jingjie Jiang
Jingjie Jiang 2018 年 8 月 20 日
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 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by