Sha256: a5946e99f8a63a7c6ccbafd20a1521cf6d382c0b6bd9a7af729ec8124fdc007e
Contents?: true
Size: 536 Bytes
Versions: 1
Compression:
Stored size: 536 Bytes
Contents
a = Variable.new("a", Domain.new([1, 2, 3].to_set)) b = Variable.new("b", Domain.new([1, 2, 3].to_set)) c = Variable.new("c", Domain.new([1, 2, 3].to_set)) d = Variable.new("d", Domain.new([1, 2, 3].to_set)) alldiff = AllDifferentConstraint.new([a, b, c, d], 0.1) rel = BinaryRelation.new("<") b1 = BinaryConstraint.new(a, b, rel, 0.5) b2 = BinaryConstraint.new(b, c, rel, 0.5) b3 = BinaryConstraint.new(c, d, rel, 0.5) problem = Problem.new([a, b, c, d], ConstraintList.new([alldiff, b1, b2, b3]), {}, false, 1) puts solve(problem)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ConstraintSolver-0.1 | examples/soft.rb |