The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
import pycarl from pycarl.formula import Relation from configurations import PackageSelector
class TestConstraint(PackageSelector): def test_init_bool(self, package): constraint = package.formula.Constraint(True) assert constraint.relation == Relation.EQ assert constraint.lhs == 0
def test_init_var(self, package): pycarl.clear_pools() var = pycarl.Variable("x") bound = package.Rational(3) constraint = package.formula.Constraint(var, Relation.GREATER, bound) assert constraint.relation == Relation.LESS
def test_init_pol(self, package): pycarl.clear_pools() var = pycarl.Variable("x") pol = var * var + package.Integer(2) constraint = package.formula.Constraint(pol, Relation.LEQ) assert constraint.relation == Relation.LESS
|