Skip to content

Commit

Permalink
Again some more UEnc
Browse files Browse the repository at this point in the history
Do it when N different values in comparisons > 1/3 card(domain)
  • Loading branch information
glebbelov committed Oct 30, 2023
1 parent 37f1f6f commit eb38ec2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/mp/flat/redef/MIP/converter_mip.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ class MIPFlatConverter
return false;
}

bool DontNeedEqEncForVar(int , const SingleVarEqConstMap& map) {
bool DontNeedEqEncForVar(int var, const SingleVarEqConstMap& map) {
if (3 * map.size() // Use UEnc if we have >1/3 of the domain values
> MPCD(ub(var))-MPCD(lb(var)))
return false;
int nNegCtx = 0;
const auto& ck = GET_CONSTRAINT_KEEPER(CondLinConEQ);
for (const auto& el: map) {
Expand Down

0 comments on commit eb38ec2

Please sign in to comment.