Quantcast
Channel: Rounding Non-LinearExpr with google or-tools SAT solver - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Laurent Perron for Rounding Non-LinearExpr with google or-tools SAT...

Let's rephraseyou have an integer variable e with a value between 0 and 300.You want to round it to the nearest multiple of 50if you do:(e div 50) * 50you will get the max multiple of 50 less or equal...

View Article



Answer by Laurent Perron for Rounding Non-LinearExpr with google or-tools SAT...

if a and b are positive thena div b >= qis equivalent toa >= q * bnow, your example does not specify how to round (nearest or down)if you want to round downq * (x + y + z + k + p + v) <= (50x...

View Article

Rounding Non-LinearExpr with google or-tools SAT solver

Using CP-SAT of google or-tools I'm trying to write this constraint:q >= (50x + 100y + 150z + 200k + 250p + 300v) / (x + y + z + k + p + v)Where q is a simple integer.The thing is I need to round...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images