Coverage for docs/source/examples/tight_constraintsets.py: 100%
7 statements
« prev ^ index » next coverage.py v6.4.2, created at 2022-07-28 11:52 -0400
« prev ^ index » next coverage.py v6.4.2, created at 2022-07-28 11:52 -0400
1"Example Tight ConstraintSet usage"
2from gpkit import Variable, Model
3from gpkit.constraints.tight import Tight
5Tight.reltol = 1e-2 # set the global tolerance of Tight
6x = Variable('x')
7x_min = Variable('x_{min}', 2)
8m = Model(x, [Tight([x >= 1], reltol=1e-3), # set the specific tolerance
9 x >= x_min])
10m.solve(verbosity=0) # prints warning