Coverage for docs\source\examples\tight_constraintsets.py: 0%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
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