[SCIP] problems with "infinity"

Marc Pfetsch pfetsch at mathematik.tu-darmstadt.de
Sat Sep 30 13:09:44 CEST 2023


Hi James,

thanks for pointing this out. We need to discuss how to take care of 
infinite coefficients in linear constraints or whether we want to forbid 
them.

Best

Marc


On 28/09/2023 17:07, James Cussens wrote:
> Hi,
> 
> I have a linear constraint:
> 
>   [linear] <scoreub>: <score>[C] -1e+20<ch#0>[B] -1e+20<ch#1>[B] 
> -1e+20<ch#2>[B] -1e+20<ch#3>[B] -1e+20<ch#4>[B] -1e+20<ch#5>[B] 
> -1e+20<ch#6>[B] <= 0;
> 
> which (in debug mode) is causing the following problem:
> 
> gobnilp: src/scip/set.c:6168: SCIPsetIsEQ: Assertion 
> `((!SCIPsetIsInfinity(set, val1) || !SCIPsetIsInfinity(set, val2)) && 
> (!SCIPsetIsInfinity(set, -val1) || !SCIPsetIsInfinity(set, -val2))) || 
> val1 == val2' failed.
> 
> Thread 1 "gobnilp" received signal SIGABRT, Aborted.
> __pthread_kill_implementation (no_tid=0, signo=6, 
> threadid=140737350973376) at ./nptl/pthread_kill.c:44
> 44    ./nptl/pthread_kill.c: No such file or directory.
> (gdb) bt
> #0  __pthread_kill_implementation (no_tid=0, signo=6, 
> threadid=140737350973376) at ./nptl/pthread_kill.c:44
> #1  __pthread_kill_internal (signo=6, threadid=140737350973376) at 
> ./nptl/pthread_kill.c:78
> #2  __GI___pthread_kill (threadid=140737350973376, signo=signo at entry=6) 
> at ./nptl/pthread_kill.c:89
> #3  0x00007ffff6a42476 in __GI_raise (sig=sig at entry=6) at 
> ../sysdeps/posix/raise.c:26
> #4  0x00007ffff6a287f3 in __GI_abort () at ./stdlib/abort.c:79
> #5  0x00007ffff6a2871b in __assert_fail_base (fmt=0x7ffff6bdd150 
> "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
>      assertion=0x555559676ce0 "((!SCIPsetIsInfinity(set, val1) || 
> !SCIPsetIsInfinity(set, val2)) && (!SCIPsetIsInfinity(set, -val1) || 
> !SCIPsetIsInfinity(set, -val2))) || val1 == val2", file=0x55555966f220 
> "src/scip/set.c", line=6168, function=<optimised out>) at 
> ./assert/assert.c:92
> #6  0x00007ffff6a39e96 in __GI___assert_fail (
>      assertion=0x555559676ce0 "((!SCIPsetIsInfinity(set, val1) || 
> !SCIPsetIsInfinity(set, val2)) && (!SCIPsetIsInfinity(set, -val1) || 
> !SCIPsetIsInfinity(set, -val2))) || val1 == val2", file=0x55555966f220 
> "src/scip/set.c", line=6168, function=0x555559678098 
> <__PRETTY_FUNCTION__.72> "SCIPsetIsEQ")
>      at ./assert/assert.c:101
> #7  0x0000555557a873d8 in SCIPsetIsEQ (set=0x55555b42fc70, 
> val1=-2.6911787705190607e+22, val2=-1e+20) at src/scip/set.c:6168
> #8  0x00005555578f6775 in SCIPisEQ (scip=0x55555b28f340, 
> val1=-2.6911787705190607e+22, val2=-1e+20) at src/scip/scip_numerics.c:454
> #9  0x0000555556e3fe2f in checkEqualObjective (scip=0x55555b28f340, 
> consdata=0x55555b3fd7f8, scale=0x7fffffffaad8, offset=0x7fffffffaad0)
>      at src/scip/cons_linear.c:10322
> 
> so it looks like the problem is caused by checkEqualObjective generating 
> a value ( -2.6911787705190607e+22 ) which is less than -1+e20 (ie less 
> than "negative infinity"). I can easily get round this (and indeed 
> should do since constraints with infinite coefficients aren't a great 
> idea!) but it might be worth adding some sort of check for "infinite" 
> coefficients in linear constraints.
> 
> James
> 
> James Cussens
> Room MVB 3.26
> School of Computer Science, University of Bristol
> Phone: +44 (0)117 455 8723
> https://jcussens.github.io/ <https://jcussens.github.io/>
> Funded PhDs available in Bristol in the following areas: Data Science 
> <http://www.bristol.ac.uk/cdt/compass/>, Interactive AI 
> <http://www.bristol.ac.uk/cdt/interactive-ai/>, Cyber Security 
> <http://www.bristol.ac.uk/cdt/cyber-security/> or Digital Health 
> <http://www.bristol.ac.uk/cdt/digital-health/>.
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip


More information about the Scip mailing list