[SCIP] isModelCons in Orbisack -- Crash

Christopher Hojny c.hojny at tue.nl
Tue Feb 9 08:14:21 CET 2021


Hi Gleb,

thanks for the example. It seems that we have missed to implement
parsing routines for orbisacks (and symresacks). My apologies for the
inconveniences. I will put it on my TODO list.

Until the missing feature has been added, you can still add orbisacks
indirectly via orbitopes (which are generalizations of orbisacks and for
which parsing routines are available). I have modified your cip file
slightly, see below, and it seems to work.

Best,
Christopher

========================================================
STATISTICS
  Problem name     : mzn_scip
  Variables        : 11 (10 binary, 1 integer, 0 implicit integer, 0
continuous)
  Constraints      : 0 initial, 1 maximal
OBJECTIVE
  Sense            : minimize
VARIABLES
  [binary] <X_INTRODUCED_0_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_1_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_2_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_3_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_4_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_5_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_6_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_7_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_8_>: obj=0, original bounds=[0,1]
  [binary] <X_INTRODUCED_9_>: obj=0, original bounds=[0,1]
  [integer] <objective>: obj=0, original bounds=[2,2]
CONSTRAINTS
  [orbitope] <p_lex_lesseq__orbisack_0>:
fullOrbitope(<X_INTRODUCED_0_>,<X_INTRODUCED_1_>.<X_INTRODUCED_2_>,<X_INTRODUCED_3_>.<X_INTRODUCED_4_>,<X_INTRODUCED_5_>.<X_INTRODUCED_6_>,<X_INTRODUCED_7_>.<X_INTRODUCED_8_>,<X_INTRODUCED_9_>);
END
============================================================



On 08-02-2021 14:19, Gleb Belov wrote:
> Hi Christopher,
>  
> here is a small example:
>  
> =============================
> STATISTICS
>   Problem name     : mzn_scip
>   Variables        : 11 (10 binary, 1 integer, 0 implicit integer, 0
> continuous)
>   Constraints      : 0 initial, 1 maximal
> OBJECTIVE
>   Sense            : minimize
> VARIABLES
>   [binary] <X_INTRODUCED_0_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_1_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_2_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_3_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_4_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_5_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_6_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_7_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_8_>: obj=0, original bounds=[0,1]
>   [binary] <X_INTRODUCED_9_>: obj=0, original bounds=[0,1]
>   [integer] <objective>: obj=0, original bounds=[2,2]
> CONSTRAINTS
>   [orbisack] <p_lex_lesseq__orbisack_0>:
> orbisack(X_INTRODUCED_0_,X_INTRODUCED_1_.X_INTRODUCED_2_,X_INTRODUCED_3_.X_INTRODUCED_4_,X_INTRODUCED_5_.X_INTRODUCED_6_,X_INTRODUCED_7_.X_INTRODUCED_8_,X_INTRODUCED_9_;
> END
> =============================
>  
> However when I tried to read it in SCIP I got message:
> WARNING: constraint handler <orbisack> does not support parsing constraints
>  
> The .cip model was exported using C API, and the model created too, from
> MiniZinc.
>  
> Stack trace (gcc 9.3.0, Ubuntu 20.04):
> =============================
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff16367ea in SCIPconsTransform (origcons=0x555555eab350,
> blkmem=0x555555ddf070, set=0x555555dd47a0, transcons=0x7fffffffce98)
>     at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/cons.c:6439
> 6439          (*transcons)->transorigcons = origcons;
> (gdb) where
> #0  0x00007ffff16367ea in SCIPconsTransform (origcons=0x555555eab350,
> blkmem=0x555555ddf070, set=0x555555dd47a0, transcons=0x7fffffffce98)
>     at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/cons.c:6439
> #1  0x00007ffff18646cf in SCIPprobTransform (source=0x555555c7a290,
> blkmem=0x555555ddf070, set=0x555555dd47a0, stat=0x555555f793c0,
> primal=0x555555c8d9e0,
>     tree=0x555555e51630, reopt=0x0, lp=0x555555cefd60,
> branchcand=0x555555e2a0c0, eventfilter=0x555555ef10c0,
> eventqueue=0x555555e24bc0, conflictstore=0x555555f831b0,
>     target=0x555555dbb518) at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/prob.c:584
> #2  0x00007ffff19043ea in SCIPtransformProb (scip=0x555555dbb470)
>     at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/scip_solve.c:407
> #3  0x00007ffff190e4ff in SCIPpresolve (scip=0x555555dbb470)
>     at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/scip_solve.c:2390
> #4  0x00007ffff190f1f6 in SCIPsolve (scip=0x555555dbb470)
>     at
> /home/bg25/Downloads/Software/Solvers/compiled_packages/SCIP/scipoptsuite-7.0.2/scip/src/scip/scip_solve.c:2620
> #5  0x000055555567120c in MIPScipWrapper::solveSCIP() ()
> #6  0x0000555555660dca in
> MiniZinc::MIPSolverinstance<MIPScipWrapper>::solve() ()
> #7  0x00005555555bfd2e in MiniZinc::MznSolver::solve() ()
> #8  0x00005555555c874e in
> MiniZinc::MznSolver::run(std::vector<std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> > > > const&, std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&,
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&, std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&) ()
> #9  0x00005555555bb2cd in main ()
> =============================
>  
>  
> I guess should be easiest to go from here, but if you want to reproduce,
> need MiniZinc @ 4802031dc17742e6978fc683ef68324c73a66796 and the
> following command:
>  
>  minizinc -v -s --solver scip
> challenge_from_2012/mznc2017_probs/opd/opd__reduce_find_SCIPbug.mzn
> challenge_from_2012/mznc2017_probs/opd/small_bibd_06_50_25__reduced.dzn
> --writeModel opd__verySmall.cip
>  
> with the .mzn and .dzn as follows (reduced from original ones in MZN
> Challenge 2017):
> .MZN:
> include "lex_greatereq.mzn";
> %------------------------------------------------------------------------------%
> % Parameters
> int: v;                     % Number of rows
> int: b;                     % Number of columns
> int: r;                     % Row sum
> set of int: rows = 1..v;    % Set of rows
> set of int: cols = 1..b;    % Set of columns
> %------------------------------------------------------------------------------%
> % Lower bound computation for lambda
> int: rv = r*v;
> int: rvmodb = rv mod b;
> int: floorrv = rv div b;
> int: ceilrv = rv div b + bool2int(rv mod b != 0);
> int: num = (ceilrv*ceilrv*rvmodb+floorrv*floorrv*(b-rvmodb)-rv);
> int: denom = v*(v-1);
> int: lb_lambda = num div denom + bool2int( num mod denom !=0);
> %------------------------------------------------------------------------------%
> % This line is there for debugging purposes, it can be safely removed
> %int: tmp = trace("% Computed lower bound for lambda:
> "++show(lb_lambda)++"\n",lb_lambda);
> %------------------------------------------------------------------------------%
> % Variables
> array [rows, cols] of var 0..1: m;
> var lb_lambda..b: objective;        % The 'lambda' variable
> constraint symmetry_breaking_constraint(
>     forall(j in {min(cols), min(cols)+1} diff {max(cols)})(
>         lex_greatereq([m[i, j] | i in rows], [m[i, j+1] | i in rows])
>     )
> );
>  
> .DZN:
> v =  5;
> b = 2;
> r = 2;
>  
>  
> I also tried compiling current scipoptsuite/master but my ssh seems to
> invalid for gcg, and then cmake canot find CMakeLists.txt for soplex for
> example.
>  
> Best regards,
> Gleb
>  
> *Gesendet:* Freitag, 05. Februar 2021 um 22:01 Uhr
> *Von:* "Christopher Hojny" <c.hojny at tue.nl>
> *An:* scip at zib.de
> *Betreff:* Re: [SCIP] isModelCons in Orbisack -- Crash
> Hi Gleb,
> 
> you are right. If you want to use orbisacks to "just" handle symmetries
> in your problem, you should set the "isModelCons" flag to FALSE. In this
> case, SCIP will also except solutions that do not adhere to the orbisack
> constraint. Only in case you want to enforce that a solution adheres to
> the orbisack structure, the "isModelCons" flag should be set to TRUE. If
> SCIP detects orbisacks on its own, it always adds them with the flag
> being FALSE to not hinder heuristics to find solutions.
> 
> Regarding your crash report, it is difficult to find the reason without
> further information. Could you provide further information on how you
> add orbisacks, a stack trace of the fail, or a minimum crashing example
> please?
> 
> Best,
> Christopher
> 
> 
> 
> On 05-02-2021 06:49, Gleb Belov wrote:
>> Hi,
>>  
>> I have a model where anti-symmetry constraints use orbisacks. When
>> setting isModelCons==0, SCIP 7.0.2 crashes i SCIPconsTransform(). Do I
>> understand correctly that pure anti-symmetry constraints should set
>> isModelCons==0?
>>  
>> Cheers,
>> Gleb
>>  
>>  
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.zib.de%2Fmailman%2Flistinfo%2Fscip&data=04%7C01%7C%7C626785edf96840c9b5b308d8cc3485cb%7Ccc7df24760ce4a0f9d75704cf60efc64%7C1%7C0%7C637483873252578462%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=5BfGlxui22qs1pCgs8btUzlMSqmXE%2BoL7g1VMYelhgg%3D&reserved=0>
>>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.zib.de%2Fmailman%2Flistinfo%2Fscip&data=04%7C01%7C%7C626785edf96840c9b5b308d8cc3485cb%7Ccc7df24760ce4a0f9d75704cf60efc64%7C1%7C0%7C637483873252578462%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=5BfGlxui22qs1pCgs8btUzlMSqmXE%2BoL7g1VMYelhgg%3D&reserved=0>
>  
>  
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 


More information about the Scip mailing list