<div dir="ltr"><div>Hi all,</div><div><br></div><div>I recently ran into an issue with SCIPinferBinvarProp. Admittedly, one that would have been caught by enabling assertions, but it took me far too long to track the logical error down, and I didn't have them enabled...<br></div><div><br></div><div>SCIPinferBinvarProp takes a SCIP_Bool as the value to fix a binary variable to. It then does several things that you're not really "supposed" to do in C: it checks "if( fixedval == TRUE )" and uses "(SCIP_Real)fixedval" to convert to a 0/1 value. This is technically correct given the assertion at the front, "assert(fixedval == TRUE || fixedval == FALSE);", which would complain if the value wasn't 0 or 1.</div><div><br></div><div>This was my mistake, I was using an FFI and my boolean true got converted to -1, and got counted as false.</div><div><br></div><div>Is this a wontfix kind of situation, where SCIP just says that users really must 0 or 1 everywhere? While that's perfectly fine if so, it would be nice if it was explicitly stated some more obvious place(s), especially considering that some standard C functions like islower don't use the convention either. :)</div><div><br></div><div>If SCIP aims to support non-0/1 bools, then I guess this is a bug report instead. Either way, not a big deal, just wanted to bring a bit of awareness.<br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- Alexander Meiburg<br></div></div></div></div></div>