Hello everybody,
i have some expressions (linear and non-linear) stored in a "Gecode::LinExpr"
object.
Know i want to post a global constraint on them.
So, expressions for example:
//pseudocode
LinExpr var1 = a+b*c;
LinExpr var2 = 4-7
and i want the results of them to be allDifferent (distinct)
IntVarArray z(home,2);
z[0] = var1.post(home);
z[1] = var2.post(home);
distinct(home,z);
1: Is this the right way to do this?
2: I do branching on the variables a,b,c.
2.1: Can it happen that some of the temporary variables z[i] stay unassigned
(regarding any linear or non-linear expression)?
2.2: Does it make an advantage to branch on {a,b,c,z[1..n]} instead of
{a,b,c} ? Can this decrease complexity, as it is the case with conjunctions in
SAT.
3: If i post the constraint a*b==0 a\in{0..2} and b\in{0..2} and i do branch on
{a}, do i get 3 or 6 solutions. (So, are my solutions really projected on the
branching variables?)
Thanks a lot in advance,
Max
--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users