Coverage for docs/source/examples/primal_infeasible_ex2.py: 100%

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

6 statements  

1"Another simple primal infeasible example" 

2from gpkit import Variable, Model 

3 

4x = Variable("x") 

5y = Variable("y", 2) 

6 

7constraints = [ 

8 x >= 1, 

9 0.5 <= x*y, 

10 x*y <= 1.5 

11 ] 

12 

13objective = x*y 

14m = Model(objective, constraints) 

15 

16# raises UnknownInfeasible on cvxopt and PrimalInfeasible on mosek 

17# m.solve()