示例#1
0
 def testHeurSel(self):
     
     var1 = Variable(0, 3)
     var2 = Variable(0, 5)
     var3 = Variable(1,2)
     
     model = NativeModel()
     
     model.add(var1 == var2)
     model.add(var1 != var3)
      
     solver = Solver(model)
     
     solver.setHeuristic("RandomVar", "RandomVal")
     
     assert(solver.solve())
示例#2
0
    def testHeurSel(self):

        var1 = Variable(0, 3)
        var2 = Variable(0, 5)
        var3 = Variable(1, 2)

        model = NativeModel()

        model.add(var1 == var2)
        model.add(var1 != var3)

        solver = Solver(model)

        solver.setHeuristic("RandomVar", "RandomVal")

        assert (solver.solve())