Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"Example Loose ConstraintSet usage"
2from gpkit import Variable, Model
3from gpkit.constraints.loose import Loose
5Loose.reltol = 1e-4 # set the global tolerance of Loose
6x = Variable('x')
7x_min = Variable('x_{min}', 1)
8m = Model(x, [Loose([x >= 2], senstol=1e-4), # set the specific tolerance
9 x >= x_min])
10m.solve(verbosity=0) # prints warning