Пример #1
0
ConstraintAlLDiff
ConstraintElement
ConstraintCardinality
ConstraintGlobalCardinality
ConstraintIfThen
ConstraintMax
ConstraintMin
*/
$int1 = new VarInt();
$int1->setValue(range(1, 10));
$int2 = new VarInt();
$int2->setValue(range(1, 10));
$res = $int1->plus($int2);
var_dump($res->getValue());
$p = new Problem();
$a = $p->variable('A', 1, 10);
$b = $p->variable('B', 1, 10);
$c = $a->plus($b);
$p->postAllDiff($c);
$p->post($c, "<", 15);
class DomainType
{
    const DOMAIN_SMALL = 1;
    const DOMAIN_MIN_MAX = 2;
    const DOMAIN_SPARSE = 3;
    const DOMAIN_OTHER = 4;
}
abstract class Constraint
{
}
class AllDifferentConstraint extends Constraint