<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div>

<div> </div>

<div>the original problem is that when creating that model with C API and isModelCons==FALSE, there is a crash... Do you need a small C API source or can you follow my steps from previous email?</div>

<div> </div>

<div>Cheers,
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 09. Februar 2021 um 18:14 Uhr<br/>
<b>Von:</b> "Christopher Hojny" <c.hojny@tue.nl><br/>
<b>An:</b> scip@zib.de<br/>
<b>Betreff:</b> Re: [SCIP] isModelCons in Orbisack -- Crash</div>

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

<div> </div>

<div class="signature"> </div></div></body></html>