[gecode-users] LDSB : symmetries on value tuples and depending symmetries

Chris Mears chris at cmears.id.au
Fri Apr 26 03:00:31 CEST 2013


On Tue, 23 Apr 2013 10:55:08 +0200
Martin Mann <mmann at informatik.uni-freiburg.de> wrote:

> I have a symmetry function "s" that can generate for each solution
> "a" the set of symmetric assignments on X1 and on X2 (independently).
> The problem is defined in a way that all symmetries from X1 are 
> theoretically combineable with symmetric assignments on X2.
> 
> Thus I would like to do something like that:
> 
> - for each assignment a1 on X1
>   + find assignment a2 on X2
>   + ensure during remaining search implication
>     if(a1) --> [X2 not s(a2)] for all symmetries of a2
>   + ensure during remaining search
>     [X1 not s(a1)] for all symmetries of a1
>   + continue search

Hi Martin,

I'm not sure I understand exactly what you are trying to do.  Say you
have a model like this:

class TwoPhase : public Script {
protected:
  IntVarArray x;
  IntVarArray y;
public:
  TwoPhase(const Options&)
    : x(*this,2,1,2), y(*this,3,1,3) {

    Symmetries sx;
    sx << ValueSymmetry(IntArgs(2,1,2));

    Symmetries sy;
    sy << ValueSymmetry(IntArgs(3,1,2,3));

    branch(*this, x, INT_VAR_NONE(), INT_VAL_MIN(), sx);
    branch(*this, y, INT_VAR_NONE(), INT_VAL_MIN(), sy);
  }
  // ...
}

You would get these solutions:

x: 1 1	y: 1 1 1
x: 1 1	y: 1 1 2
x: 1 1	y: 1 2 1
x: 1 1	y: 1 2 2
x: 1 1	y: 1 2 3
x: 1 2	y: 1 1 1
x: 1 2	y: 1 1 2
x: 1 2	y: 1 2 1
x: 1 2	y: 1 2 2
x: 1 2	y: 1 2 3

i.e. the symmetry is broken within the "x" and "y" independently.  If
this is not what you are looking for, could you please explain a bit
more?

Cheers,
Chris



More information about the users mailing list