Coverage for docs\source\examples\migp.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 choice variable usage"
2import numpy as np
3from gpkit import Variable, Model
5x = Variable("x", choices=range(1, 4))
6num = Variable("numerator", np.linspace(0.5, 7, 11))
8m = Model(x + num/x)
9sol = m.solve(verbosity=0)
11print(sol.table())